9
9
selector :
10
10
matchLabels :
11
11
{{- include "flux-image-gen.selectorLabels" . | nindent 6 }}
12
+ {{- include "flux-image-gen.uiLabels" . | nindent 6 }}
12
13
template :
13
14
metadata :
14
15
{{- with .Values.ui.podAnnotations }}
17
18
{{- end }}
18
19
labels :
19
20
{{- include "flux-image-gen.labels" . | nindent 8 }}
21
+ {{- include "flux-image-gen.uiLabels" . | nindent 8 }}
20
22
{{- with .Values.ui.podLabels }}
21
23
{{- toYaml . | nindent 8 }}
22
24
{{- end }}
35
37
imagePullPolicy : {{ .Values.image.pullPolicy }}
36
38
command :
37
39
- python
38
- - gradio_ui.py
39
- args :
40
- - --models
41
- - {{ .Values.models | join "," }}
42
- {{- if .Values.ui.extraArgs }}
43
- {{- .Values.ui.extraArgs | toYaml | nindent 10 }}
44
- {{- end }}
40
+ - stackhpc-app/gradio_ui.py
45
41
ports :
46
42
- name : http
47
43
containerPort : {{ .Values.ui.service.port }}
@@ -58,26 +54,29 @@ spec:
58
54
readinessProbe :
59
55
{{- toYaml .Values.ui.readinessProbe | nindent 12 }}
60
56
{{- end }}
61
- {{- with .Values.ui.volumeMounts }}
62
57
volumeMounts :
58
+ - name : app-config
59
+ mountPath : /etc/gradio-app/
60
+ {{- with .Values.ui.volumeMounts }}
61
+ {{- if . -}}
63
62
{{- toYaml . | nindent 12 }}
63
+ {{- end -}}
64
64
{{- end }}
65
65
# Make stdout from python visible in k8s logs
66
66
tty : true
67
67
env :
68
68
- name : PYTHONUNBUFFERED
69
69
value : " 1"
70
- - name : HELM_RELEASE_NAME
71
- value : {{ include "flux-image-gen.fullname" . }}
72
- - name : HELM_RELEASE_NAMESPACE
73
- value : {{ .Release.Namespace }}
74
- {{- with .Values.ui.envFrom }}
75
- envFrom :
76
- {{- toYaml . | nindent 12 }}
77
- {{- end }}
78
- {{- with .Values.ui.volumes }}
70
+ - name : GRADIO_SERVER_NAME
71
+ value : 0.0.0.0
79
72
volumes :
73
+ - name : app-config
74
+ configMap :
75
+ name : {{ .Release.Name }}-ui-config
76
+ {{- with .Values.ui.volumes }}
77
+ {{- if . -}}
80
78
{{- toYaml . | nindent 8 }}
79
+ {{- end -}}
81
80
{{- end }}
82
81
{{- with .Values.ui.nodeSelector }}
83
82
nodeSelector :
0 commit comments