@@ -55,11 +55,74 @@ spec:
5555 securityContext :
5656 {{- toYaml . | nindent 12 }}
5757 {{- end }}
58- command : [ "/bin/sh","-c" ]
59- # Run npm run build and then npm run start everytime the container starts
60- args : [ "npm run build ; npm run start" ]
58+ {{- with .Values.webui.command }}
59+ command :
60+ {{- toYaml . | nindent 12 }}
61+ {{- end }}
62+ {{- with .Values.webui.args }}
63+ args :
64+ {{- toYaml . | nindent 12 }}
65+ {{- end }}
6166 image : " {{ .Values.webui.image.repository }}:{{ .Values.webui.image.tag | default .Chart.AppVersion }}"
6267 imagePullPolicy : {{ .Values.webui.image.pullPolicy }}
68+ env :
69+ - name : HOST
70+ value : " 0.0.0.0"
71+ - name : PORT
72+ value : {{ .Values.webui.port | quote }}
73+ - name : NITRO_HOST
74+ value : " 0.0.0.0"
75+ - name : NITRO_PORT
76+ value : {{ .Values.webui.port | quote }}
77+ # Nuxt 3 runtimeConfig.public.<KEY> is overridden at runtime by env
78+ # var NUXT_PUBLIC_<KEY>. We keep the original names too because some
79+ # libs (nuxt-auth, sidebase) read AUTH_ORIGIN / NEXTAUTH_URL directly
80+ # from process.env.
81+ - name : NUXT_PUBLIC_NUXT_ZOO_BASEURL
82+ value : {{ $hosturl | quote }}
83+ - name : NUXT_ZOO_BASEURL
84+ value : {{ $hosturl | quote }}
85+ - name : NUXT_PUBLIC_NUXT_OIDC_ISSUER
86+ value : {{ .Values.webui.oidc.issuer | quote }}
87+ - name : NUXT_OIDC_ISSUER
88+ value : {{ .Values.webui.oidc.issuer | quote }}
89+ - name : NUXT_PUBLIC_NUXT_OIDC_CLIENT_ID
90+ value : {{ .Values.webui.oidc.clientId | quote }}
91+ - name : NUXT_OIDC_CLIENT_ID
92+ value : {{ .Values.webui.oidc.clientId | quote }}
93+ {{- with .Values.webui.oidc.clientSecret }}
94+ - name : NUXT_OIDC_CLIENT_SECRET
95+ value : {{ . | quote }}
96+ {{- end }}
97+ - name : NUXT_PUBLIC_AUTH_ORIGIN
98+ value : {{ .Values.webui.url | quote }}
99+ - name : AUTH_ORIGIN
100+ value : {{ .Values.webui.url | quote }}
101+ - name : NUXT_PUBLIC_NEXTAUTH_URL
102+ value : {{ .Values.webui.url | quote }}
103+ - name : NEXTAUTH_URL
104+ value : {{ .Values.webui.url | quote }}
105+ - name : NUXT_BASE_URL
106+ value : {{ .Values.webui.url | quote }}
107+ - name : NUXT_AUTH_SECRET
108+ value : {{ default "client_secret_basic" .Values.webui.authSecret | quote }}
109+ - name : NUXT_PUBLIC_ZOO_OGCAPI_REQUIRES_BEARER_TOKEN
110+ value : {{ default "true" .Values.webui.requiresBearerToken | quote }}
111+ - name : ZOO_OGCAPI_REQUIRES_BEARER_TOKEN
112+ value : {{ default "true" .Values.webui.requiresBearerToken | quote }}
113+ - name : NUXT_PUBLIC_SUBSCRIBERURL
114+ value : " http://{{ .Release.Name }}-service/cgi-bin/publish.py"
115+ - name : SUBSCRIBERURL
116+ value : " http://{{ .Release.Name }}-service/cgi-bin/publish.py"
117+ - name : NODE_TLS_REJECT_UNAUTHORIZED
118+ value : {{ default "0" .Values.webui.nodeTlsRejectUnauthorized | quote }}
119+ {{- with .Values.webui.extraEnv }}
120+ {{- toYaml . | nindent 12 }}
121+ {{- end }}
122+ {{- with .Values.webui.envFrom }}
123+ envFrom :
124+ {{- toYaml . | nindent 12 }}
125+ {{- end }}
63126 ports :
64127 - name : webui-http
65128 containerPort : {{ .Values.webui.port }}
@@ -81,20 +144,16 @@ spec:
81144 timeoutSeconds : 15
82145 failureThreshold : 3
83146 resources : {}
147+ {{- with .Values.webui.volumeMounts }}
84148 volumeMounts :
85- - name : bin-config
86- mountPath : /usr/src/app/.env
87- subPath : env_nuxt.sample
88- - name : bin-config
89- mountPath : /usr/src/app/env_sample
90- subPath : env_nuxt.sample
149+ {{- toYaml . | nindent 12 }}
150+ {{- end }}
91151
92152 restartPolicy : Always
153+ {{- with .Values.webui.volumes }}
93154 volumes :
94- - name : bin-config
95- configMap :
96- name : {{ .Release.Name }}-bin-config
97- defaultMode : 0777
155+ {{- toYaml . | nindent 8 }}
156+ {{- end }}
98157
99158status : {}
100159{{- end }}
0 commit comments