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:
Felix Kunde
2022-08-29 15:00:25 +02:00
committed by GitHub
parent 89375186b3
commit 4c07494ac7
13 changed files with 51 additions and 68 deletions
+2 -10
View File
@@ -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')