mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-10-22 10:24:58 +02:00
deprecate ClusterName field of Postgresql type and remove team from REST endpoints (#2015)
* deprecate ClusterName field of Postgresql type * remove for teamId from operator API endpints /status /logs /history * update dns_format_string and yaml template in UI
This commit is contained in:
+2
-10
@@ -321,7 +321,7 @@ DEFAULT_UI_CONFIG = {
|
||||
'databases_visible': True,
|
||||
'resources_visible': RESOURCES_VISIBLE,
|
||||
'postgresql_versions': ['11','12','13','14'],
|
||||
'dns_format_string': '{0}.{1}.{2}',
|
||||
'dns_format_string': '{0}.{1}',
|
||||
'pgui_link': '',
|
||||
'static_network_whitelist': {},
|
||||
'read_only_mode': READ_ONLY_MODE,
|
||||
@@ -981,15 +981,7 @@ def get_operator_get_logs(worker: int):
|
||||
@app.route('/operator/clusters/<namespace>/<cluster>/logs')
|
||||
@authorize
|
||||
def get_operator_get_logs_per_cluster(namespace: str, cluster: str):
|
||||
team, cluster_name = cluster.split('-', 1)
|
||||
# team id might contain hyphens, try to find correct team name
|
||||
user_teams = get_teams_for_user(session.get('user_name', ''))
|
||||
for user_team in user_teams:
|
||||
if cluster.find(user_team + '-') == 0:
|
||||
team = cluster[:len(user_team)]
|
||||
cluster_name = cluster[len(user_team + '-'):]
|
||||
break
|
||||
return proxy_operator(f'/clusters/{team}/{namespace}/{cluster_name}/logs/')
|
||||
return proxy_operator(f'/clusters/{namespace}/{cluster}/logs/')
|
||||
|
||||
|
||||
@app.route('/login')
|
||||
|
||||
Reference in New Issue
Block a user