2021-10-04 13:53:13 +02:00
|
|
|
{{- if include "adminFrontend.host" . -}}
|
2021-09-30 14:37:30 +02:00
|
|
|
apiVersion: {{ template "common.capabilities.deployment.apiVersion" . }}
|
|
|
|
kind: Deployment
|
|
|
|
metadata:
|
|
|
|
name: {{ template "common.names.fullname" . }}
|
|
|
|
labels: {{- include "common.labels.standard" . | nindent 4 }}
|
2021-09-30 16:03:54 +02:00
|
|
|
component: adminPanel
|
2021-09-30 14:37:30 +02:00
|
|
|
{{- if .Values.commonLabels }}
|
|
|
|
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
|
|
|
|
{{- end }}
|
|
|
|
{{- if .Values.commonAnnotations }}
|
|
|
|
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
|
|
|
{{- end }}
|
|
|
|
spec:
|
|
|
|
replicas: {{ .Values.replicaCount }}
|
|
|
|
selector:
|
|
|
|
matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }}
|
2021-09-30 16:03:54 +02:00
|
|
|
component: adminPanel
|
2021-09-30 14:37:30 +02:00
|
|
|
{{- if .Values.updateStrategy }}
|
|
|
|
strategy: {{- toYaml .Values.updateStrategy | nindent 4 }}
|
|
|
|
{{- end }}
|
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels: {{- include "common.labels.standard" . | nindent 8 }}
|
2021-09-30 16:03:54 +02:00
|
|
|
component: adminPanel
|
2021-09-30 14:37:30 +02:00
|
|
|
{{- if .Values.podLabels }}
|
|
|
|
{{- include "common.tplvalues.render" (dict "value" .Values.podLabels "context" $) | nindent 8 }}
|
|
|
|
{{- end }}
|
|
|
|
{{- if .Values.podAnnotations }}
|
|
|
|
annotations: {{- include "common.tplvalues.render" (dict "value" .Values.podAnnotations "context" $) | nindent 8 }}
|
|
|
|
{{- end }}
|
|
|
|
spec:
|
2021-10-04 13:53:13 +02:00
|
|
|
{{- include "adminPanel.imagePullSecrets" . | nindent 6 }}
|
2021-09-30 14:37:30 +02:00
|
|
|
{{- if .Values.hostAliases }}
|
|
|
|
hostAliases: {{- include "common.tplvalues.render" (dict "value" .Values.hostAliases "context" $) | nindent 8 }}
|
|
|
|
{{- end }}
|
|
|
|
{{- if .Values.affinity }}
|
|
|
|
affinity: {{- include "common.tplvalues.render" (dict "value" .Values.affinity "context" $) | nindent 8 }}
|
|
|
|
{{- else }}
|
|
|
|
affinity:
|
|
|
|
podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.podAffinityPreset "context" $) | nindent 10 }}
|
|
|
|
podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.podAntiAffinityPreset "context" $) | nindent 10 }}
|
|
|
|
nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.nodeAffinityPreset.type "key" .Values.nodeAffinityPreset.key "values" .Values.nodeAffinityPreset.values) | nindent 10 }}
|
|
|
|
{{- end }}
|
|
|
|
{{- if .Values.nodeSelector }}
|
|
|
|
nodeSelector: {{- include "common.tplvalues.render" (dict "value" .Values.nodeSelector "context" $) | nindent 8 }}
|
|
|
|
{{- end }}
|
|
|
|
{{- if .Values.tolerations }}
|
|
|
|
tolerations: {{- include "common.tplvalues.render" (dict "value" .Values.tolerations "context" $) | nindent 8 }}
|
|
|
|
{{- end }}
|
2021-09-30 16:03:54 +02:00
|
|
|
serviceAccountName: {{ include "adminPanel.serviceAccountName" . }}
|
2021-09-30 14:37:30 +02:00
|
|
|
securityContext: {{- toYaml .Values.podSecurityContext | nindent 8 }}
|
|
|
|
initContainers:
|
|
|
|
{{- if .Values.initContainers }}
|
|
|
|
{{- include "common.tplvalues.render" (dict "value" .Values.initContainers "context" $) | nindent 8 }}
|
|
|
|
{{- end }}
|
|
|
|
containers:
|
2021-10-04 13:53:13 +02:00
|
|
|
- name: admin-frontend
|
2021-09-30 15:33:22 +02:00
|
|
|
securityContext: {{- toYaml .Values.adminFrontend.containerSecurityContext | nindent 12 }}
|
|
|
|
image: {{ template "adminFrontend.image" . }}
|
2021-09-30 14:37:30 +02:00
|
|
|
imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
|
2021-09-30 15:33:22 +02:00
|
|
|
{{- if .Values.adminFrontend.command }}
|
|
|
|
command: {{- include "common.tplvalues.render" (dict "value" .Values.adminFrontend.command "context" $) | nindent 12 }}
|
2021-09-30 14:37:30 +02:00
|
|
|
{{- end }}
|
2021-09-30 15:33:22 +02:00
|
|
|
{{- if .Values.adminFrontend.args }}
|
|
|
|
args: {{- include "common.tplvalues.render" (dict "value" .Values.adminFrontend.args "context" $) | nindent 12 }}
|
2021-09-30 14:37:30 +02:00
|
|
|
{{- end }}
|
|
|
|
env:
|
2021-09-30 15:33:22 +02:00
|
|
|
{{- if .Values.adminFrontend.extraEnvVars }}
|
|
|
|
{{- include "common.tplvalues.render" (dict "value" .Values.adminFrontend.extraEnvVars "context" $) | nindent 12 }}
|
2021-09-30 14:37:30 +02:00
|
|
|
{{- end }}
|
|
|
|
envFrom:
|
|
|
|
- configMapRef:
|
|
|
|
name: {{ include "common.names.fullname" . }}
|
2021-09-30 15:33:22 +02:00
|
|
|
{{- if .Values.adminFrontend.extraEnvVarsCM }}
|
2021-09-30 14:37:30 +02:00
|
|
|
- configMapRef:
|
2021-09-30 15:33:22 +02:00
|
|
|
name: {{ .Values.adminFrontend.extraEnvVarsCM }}
|
2021-09-30 14:37:30 +02:00
|
|
|
{{- end }}
|
2021-09-30 15:33:22 +02:00
|
|
|
{{- if .Values.adminFrontend.extraEnvVarsSecret }}
|
2021-09-30 14:37:30 +02:00
|
|
|
- secretRef:
|
2021-09-30 15:33:22 +02:00
|
|
|
name: {{ .Values.adminFrontend.extraEnvVarsSecret }}
|
2021-09-30 14:37:30 +02:00
|
|
|
{{- end }}
|
|
|
|
ports:
|
2021-10-04 13:53:13 +02:00
|
|
|
- name: frontend-http
|
|
|
|
containerPort: 80
|
2021-09-30 14:37:30 +02:00
|
|
|
protocol: TCP
|
2021-09-30 15:33:22 +02:00
|
|
|
{{- if .Values.adminFrontend.livenessProbe.enabled }}
|
2021-09-30 14:37:30 +02:00
|
|
|
livenessProbe:
|
|
|
|
httpGet:
|
|
|
|
path: /srv/status
|
2021-10-04 13:53:13 +02:00
|
|
|
port: frontend-http
|
2021-09-30 15:33:22 +02:00
|
|
|
initialDelaySeconds: {{ .Values.adminFrontend.livenessProbe.initialDelaySeconds }}
|
|
|
|
periodSeconds: {{ .Values.adminFrontend.livenessProbe.periodSeconds }}
|
|
|
|
timeoutSeconds: {{ .Values.adminFrontend.livenessProbe.timeoutSeconds }}
|
|
|
|
successThreshold: {{ .Values.adminFrontend.livenessProbe.successThreshold }}
|
|
|
|
failureThreshold: {{ .Values.adminFrontend.livenessProbe.failureThreshold }}
|
|
|
|
{{- else if .Values.adminFrontend.customLivenessProbe }}
|
|
|
|
livenessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.adminFrontend.customLivenessProbe "context" $) | nindent 12 }}
|
2021-09-30 14:37:30 +02:00
|
|
|
{{- end }}
|
2021-09-30 15:33:22 +02:00
|
|
|
{{- if .Values.adminFrontend.readinessProbe.enabled }}
|
2021-09-30 14:37:30 +02:00
|
|
|
readinessProbe:
|
|
|
|
httpGet:
|
|
|
|
path: /srv/status
|
2021-10-04 13:53:13 +02:00
|
|
|
port: frontend-http
|
2021-09-30 15:33:22 +02:00
|
|
|
initialDelaySeconds: {{ .Values.adminFrontend.readinessProbe.initialDelaySeconds }}
|
|
|
|
periodSeconds: {{ .Values.adminFrontend.readinessProbe.periodSeconds }}
|
|
|
|
timeoutSeconds: {{ .Values.adminFrontend.readinessProbe.timeoutSeconds }}
|
|
|
|
successThreshold: {{ .Values.adminFrontend.readinessProbe.successThreshold }}
|
|
|
|
failureThreshold: {{ .Values.adminFrontend.readinessProbe.failureThreshold }}
|
|
|
|
{{- else if .Values.adminFrontend.customReadinessProbe }}
|
|
|
|
readinessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.adminFrontend.customReadinessProbe "context" $) | nindent 12 }}
|
2021-09-30 14:37:30 +02:00
|
|
|
{{- end }}
|
|
|
|
volumeMounts:
|
2021-09-30 15:33:22 +02:00
|
|
|
{{- if .Values.adminFrontend.extraVolumeMounts }}
|
|
|
|
{{- include "common.tplvalues.render" (dict "value" .Values.adminFrontend.extraVolumeMounts "context" $) | nindent 12 }}
|
2021-09-30 14:37:30 +02:00
|
|
|
{{- end }}
|
2021-09-30 15:33:22 +02:00
|
|
|
{{- if .Values.adminFrontend.resources }}
|
|
|
|
resources: {{- toYaml .Values.adminFrontend.resources | nindent 12 }}
|
2021-09-30 14:37:30 +02:00
|
|
|
{{- end }}
|
2021-10-04 13:53:13 +02:00
|
|
|
- name: admin-backend
|
2021-09-30 16:03:54 +02:00
|
|
|
securityContext: {{- toYaml .Values.adminBackend.containerSecurityContext | nindent 12 }}
|
|
|
|
image: {{ template "adminBackend.image" . }}
|
|
|
|
imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
|
|
|
|
{{- if .Values.adminBackend.command }}
|
|
|
|
command: {{- include "common.tplvalues.render" (dict "value" .Values.adminBackend.command "context" $) | nindent 12 }}
|
|
|
|
{{- end }}
|
|
|
|
{{- if .Values.adminBackend.args }}
|
|
|
|
args: {{- include "common.tplvalues.render" (dict "value" .Values.adminBackend.args "context" $) | nindent 12 }}
|
|
|
|
{{- end }}
|
|
|
|
env:
|
|
|
|
- name: ADMIN_PANEL_PASSWORD
|
|
|
|
valueFrom:
|
|
|
|
secretKeyRef:
|
|
|
|
name: {{ include "adminBackend.secretName" . }}
|
|
|
|
key: adminBackend-password
|
|
|
|
{{- if (include "adminBackend.smtp.password.enabled" .) }}
|
|
|
|
- name: ADMIN_PANEL_SMTP_PASSWORD
|
|
|
|
valueFrom:
|
|
|
|
secretKeyRef:
|
|
|
|
name: {{ include "adminBackend.smtp.secretName" . }}
|
|
|
|
key: smtp-password
|
|
|
|
{{- end }}
|
|
|
|
{{- if .Values.adminBackend.extraEnvVars }}
|
|
|
|
{{- include "common.tplvalues.render" (dict "value" .Values.adminBackend.extraEnvVars "context" $) | nindent 12 }}
|
|
|
|
{{- end }}
|
|
|
|
envFrom:
|
|
|
|
- configMapRef:
|
|
|
|
name: {{ include "common.names.fullname" . }}
|
|
|
|
{{- if .Values.adminBackend.extraEnvVarsCM }}
|
|
|
|
- configMapRef:
|
|
|
|
name: {{ .Values.adminBackend.extraEnvVarsCM }}
|
|
|
|
{{- end }}
|
|
|
|
{{- if .Values.adminBackend.extraEnvVarsSecret }}
|
|
|
|
- secretRef:
|
|
|
|
name: {{ .Values.adminBackend.extraEnvVarsSecret }}
|
|
|
|
{{- end }}
|
|
|
|
ports:
|
2021-10-04 13:53:13 +02:00
|
|
|
- name: backend-http
|
|
|
|
containerPort: 5000
|
2021-09-30 16:03:54 +02:00
|
|
|
protocol: TCP
|
|
|
|
{{- if .Values.adminBackend.livenessProbe.enabled }}
|
|
|
|
livenessProbe:
|
|
|
|
httpGet:
|
|
|
|
path: /srv/status
|
2021-10-04 13:53:13 +02:00
|
|
|
port: backend-http
|
2021-09-30 16:03:54 +02:00
|
|
|
initialDelaySeconds: {{ .Values.adminBackend.livenessProbe.initialDelaySeconds }}
|
|
|
|
periodSeconds: {{ .Values.adminBackend.livenessProbe.periodSeconds }}
|
|
|
|
timeoutSeconds: {{ .Values.adminBackend.livenessProbe.timeoutSeconds }}
|
|
|
|
successThreshold: {{ .Values.adminBackend.livenessProbe.successThreshold }}
|
|
|
|
failureThreshold: {{ .Values.adminBackend.livenessProbe.failureThreshold }}
|
|
|
|
{{- else if .Values.adminBackend.customLivenessProbe }}
|
|
|
|
livenessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.adminBackend.customLivenessProbe "context" $) | nindent 12 }}
|
|
|
|
{{- end }}
|
|
|
|
{{- if .Values.adminBackend.readinessProbe.enabled }}
|
|
|
|
readinessProbe:
|
|
|
|
httpGet:
|
|
|
|
path: /srv/status
|
2021-10-04 13:53:13 +02:00
|
|
|
port: backend-http
|
2021-09-30 16:03:54 +02:00
|
|
|
initialDelaySeconds: {{ .Values.adminBackend.readinessProbe.initialDelaySeconds }}
|
|
|
|
periodSeconds: {{ .Values.adminBackend.readinessProbe.periodSeconds }}
|
|
|
|
timeoutSeconds: {{ .Values.adminBackend.readinessProbe.timeoutSeconds }}
|
|
|
|
successThreshold: {{ .Values.adminBackend.readinessProbe.successThreshold }}
|
|
|
|
failureThreshold: {{ .Values.adminBackend.readinessProbe.failureThreshold }}
|
|
|
|
{{- else if .Values.adminBackend.customReadinessProbe }}
|
|
|
|
readinessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.adminBackend.customReadinessProbe "context" $) | nindent 12 }}
|
|
|
|
{{- end }}
|
|
|
|
volumeMounts:
|
|
|
|
{{- if .Values.adminBackend.extraVolumeMounts }}
|
|
|
|
{{- include "common.tplvalues.render" (dict "value" .Values.adminBackend.extraVolumeMounts "context" $) | nindent 12 }}
|
|
|
|
{{- end }}
|
|
|
|
{{- if .Values.adminBackend.resources }}
|
|
|
|
resources: {{- toYaml .Values.adminBackend.resources | nindent 12 }}
|
|
|
|
{{- end }}
|
2021-09-30 14:37:30 +02:00
|
|
|
{{- if .Values.sidecars }}
|
|
|
|
{{- include "common.tplvalues.render" (dict "value" .Values.sidecars "context" $) | nindent 8 }}
|
|
|
|
{{- end }}
|
|
|
|
volumes:
|
|
|
|
{{- if .Values.extraVolumes }}
|
|
|
|
{{- include "common.tplvalues.render" (dict "value" .Values.extraVolumes "context" $) | nindent 8 }}
|
|
|
|
{{- end }}
|
|
|
|
{{- end }}
|