@@ -198,8 +198,8 @@ spec:
198198 image : {{ template "qtodo.image" (dict "value" .Values.app.images.main "context" $ "useRegistry" true) }}
199199 imagePullPolicy : {{ .Values.app.images.main.pullPolicy }}
200200 ports :
201- - containerPort : 8080
202- name : http
201+ - containerPort : {{ template "qtodo.app.port" . }}
202+ name : {{ if (include "qtodo.isSecureTermination" .) }}https{{ else }} http{{ end }}
203203 protocol : TCP
204204 envFrom :
205205 - configMapRef :
@@ -219,7 +219,17 @@ spec:
219219 - name : QUARKUS_HTTP_HOST
220220 value : ' 0.0.0.0'
221221 - name : QUARKUS_HTTP_PORT
222- value : ' 8080'
222+ value : {{ .Values.app.port | quote }}
223+ {{- if include "qtodo.isSecureTermination" . }}
224+ - name : QUARKUS_HTTP_SSL_PORT
225+ value : {{ .Values.app.securePort | quote }}
226+ - name : QUARKUS_TLS_KEY_STORE_PEM_QTODO_CERT
227+ value : /certs/tls.crt
228+ - name : QUARKUS_TLS_KEY_STORE_PEM_QTODO_KEY
229+ value : /certs/tls.key
230+ - name : QUARKUS_HTTP_INSECURE_REQUESTS
231+ value : ' disabled'
232+ {{- end }}
223233 - name : QUARKUS_HIBERNATE_ORM_SCHEMA_MANAGEMENT_STRATEGY
224234 value : ' drop-and-create'
225235{{- if not .Values.app.spire.enabled }}
@@ -273,6 +283,11 @@ spec:
273283 - name : ztvp-trusted-ca
274284 mountPath : /etc/pki/ca-trust/extracted/pem
275285 readOnly : true
286+ {{- end }}
287+ {{- if include "qtodo.isSecureTermination" . }}
288+ - name : tls-certs
289+ mountPath : /certs
290+ readOnly : true
276291{{- end }}
277292 resources : {}
278293 serviceAccountName : qtodo
@@ -304,4 +319,9 @@ spec:
304319 configMap :
305320 name : qtodo-truststore-java
306321{{- end }}
322+ {{- if include "qtodo.isSecureTermination" . }}
323+ - name : tls-certs
324+ secret :
325+ secretName : {{ .Values.app.tls.secret }}
326+ {{- end }}
307327{{- end }}
0 commit comments