Skip to content

Commit 5076789

Browse files
author
sd109
committed
Add global toggle for disabling web UI
1 parent 31f64ac commit 5076789

File tree

7 files changed

+19
-6
lines changed

7 files changed

+19
-6
lines changed

chart/Chart.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,5 @@ annotations:
3131
dependencies:
3232
- name: reloader
3333
version: 1.0.63
34-
repository: https://stakater.github.io/stakater-charts
34+
repository: https://stakater.github.io/stakater-charts
35+
condition: ui.enabled

chart/templates/ui/app-config-map.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{{- if .Values.ui.enabled -}}
12
apiVersion: v1
23
kind: ConfigMap
34
metadata:
@@ -8,3 +9,4 @@ data:
89
{{ (.Files.Glob "web-app/*").AsConfig | nindent 2 }}
910
settings.yml: |
1011
{{- .Values.ui.appSettings | toYaml | nindent 4 }}
12+
{{- end -}}

chart/templates/ui/deployment.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{{- if .Values.ui.enabled -}}
12
apiVersion: apps/v1
23
kind: Deployment
34
metadata:
@@ -10,7 +11,7 @@ metadata:
1011
spec:
1112
replicas: 1
1213
selector:
13-
matchLabels:
14+
matchLabels:
1415
{{- include "azimuth-llm.ui-selectorLabels" . | nindent 6 }}
1516
strategy:
1617
{{- .Values.ui.updateStrategy | toYaml | nindent 4 }}
@@ -29,7 +30,7 @@ spec:
2930
volumeMounts:
3031
- name: app
3132
mountPath: /etc/web-app
32-
command:
33+
command:
3334
- python
3435
args:
3536
- {{ .Values.ui.entrypoint }}
@@ -44,4 +45,5 @@ spec:
4445
volumes:
4546
- name: app
4647
configMap:
47-
name: {{ .Release.Name }}-web-app
48+
name: {{ .Release.Name }}-web-app
49+
{{- end -}}

chart/templates/ui/service.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{{- if .Values.ui.enabled -}}
12
apiVersion: v1
23
kind: Service
34
metadata:
@@ -12,4 +13,5 @@ spec:
1213
targetPort: ui
1314
type: {{ .Values.ui.service.type }}
1415
selector:
15-
{{- include "azimuth-llm.ui-selectorLabels" . | nindent 4 }}
16+
{{- include "azimuth-llm.ui-selectorLabels" . | nindent 4 }}
17+
{{- end -}}

chart/templates/ui/ui-zenith-client.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{{- if .Values.ui.enabled -}}
12
{{- if .Values.ui.service.zenith.enabled -}}
23
apiVersion: zenith.stackhpc.com/v1alpha1
34
kind: Client
@@ -11,4 +12,5 @@ spec:
1112
serviceName: {{ .Values.ui.service.name }}
1213
auth:
1314
skip: {{ .Values.ui.service.zenith.skipAuth }}
14-
{{- end -}}
15+
{{- end -}}
16+
{{- end -}}

chart/templates/ui/ui-zenith-reservation.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{{- if .Values.ui.enabled -}}
12
{{- if .Values.ui.service.zenith.enabled -}}
23
apiVersion: zenith.stackhpc.com/v1alpha1
34
kind: Reservation
@@ -13,4 +14,5 @@ metadata:
1314
{{- end }}
1415
spec:
1516
credentialSecretName: {{ .Release.Name }}-ui-zenith-credential
17+
{{- end -}}
1618
{{- end -}}

chart/values.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ api:
6464

6565
# Configuration for the frontend web interface
6666
ui:
67+
# Toggles installation of the gradio web UI
68+
enabled: true
6769
# The file from the UI config map to execute as the entrypoint to the frontend app
6870
entrypoint: app.py
6971
# The values to be written to settings.yml for parsing as frontend app setting

0 commit comments

Comments
 (0)