Skip to content
This repository was archived by the owner on Feb 14, 2024. It is now read-only.

Commit 8356ebf

Browse files
authored
Adds APP_URL as base tag href to enable loading via ui via ingress routes (zalando#2195)
1 parent 42e005f commit 8356ebf

File tree

4 files changed

+4
-2
lines changed

4 files changed

+4
-2
lines changed

charts/postgres-operator-ui/templates/deployment.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ spec:
4646
{{- toYaml .Values.resources | nindent 12 }}
4747
env:
4848
- name: "APP_URL"
49-
value: "http://localhost:8081"
49+
value: {{ .Values.envs.appUrl }}
5050
- name: "OPERATOR_API_URL"
5151
value: {{ .Values.envs.operatorApiUrl | quote }}
5252
- name: "OPERATOR_CLUSTER_NAME_LABEL"

charts/postgres-operator-ui/values.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ resources:
4141
envs:
4242
# IMPORTANT: While operator chart and UI chart are independent, this is the interface between
4343
# UI and operator API. Insert the service name of the operator API here!
44+
appUrl: "http://localhost:8081"
4445
operatorApiUrl: "http://postgres-operator:8080"
4546
operatorClusterNameLabel: "cluster-name"
4647
resourcesVisible: "False"

ui/operator_ui/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ def send_js(path):
311311
@app.route('/')
312312
@authorize
313313
def index():
314-
return render_template('index.html', google_analytics=GOOGLE_ANALYTICS)
314+
return render_template('index.html', google_analytics=GOOGLE_ANALYTICS, app_url=APP_URL)
315315

316316

317317
DEFAULT_UI_CONFIG = {

ui/operator_ui/templates/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
<html lang="en">
33
<head>
44
<meta charset="utf-8">
5+
<base href="{{app_url}}">
56
<title>PostgreSQL Operator UI</title>
67

78

0 commit comments

Comments
 (0)