rename adminPanel to dashboard and adminFrontend and adminBackend to frontend and backend. Fix JWT secrets
This commit is contained in:
parent
18276be75d
commit
80c2f776d3
12 changed files with 268 additions and 258 deletions
|
|
@ -2,7 +2,7 @@
|
|||
{{/*
|
||||
Create the name of the service account to use
|
||||
*/}}
|
||||
{{- define "adminPanel.serviceAccountName" -}}
|
||||
{{- define "dashboard.serviceAccountName" -}}
|
||||
{{- if .Values.serviceAccount.create -}}
|
||||
{{ default (include "common.names.fullname" .) .Values.serviceAccount.name }}
|
||||
{{- else -}}
|
||||
|
|
@ -13,15 +13,15 @@ Create the name of the service account to use
|
|||
{{/*
|
||||
Return the proper Docker image registry secret names
|
||||
*/}}
|
||||
{{- define "adminPanel.imagePullSecrets" -}}
|
||||
{{- define "dashboard.imagePullSecrets" -}}
|
||||
{{ include "common.images.pullSecrets" (dict "images" (list .Values.image) "global" .Values.global) }}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return true if a secret object for Admin-frontend should be created
|
||||
*/}}
|
||||
{{- define "adminBackend.createSecret" -}}
|
||||
{{- if or (not .Values.adminBackend.existingSecret) (and (not .Values.adminBackend.smtp.existingSecret) .Values.adminBackend.smtp.password .Values.adminBackend.smtp.enabled) }}
|
||||
{{- define "backend.createSecret" -}}
|
||||
{{- if or (not .Values.backend.existingSecret) (and (not .Values.backend.smtp.existingSecret) .Values.backend.smtp.password .Values.backend.smtp.enabled) }}
|
||||
{{- true -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
|
@ -29,30 +29,30 @@ Return true if a secret object for Admin-frontend should be created
|
|||
{{/*
|
||||
Return the Admin-backend secret name
|
||||
*/}}
|
||||
{{- define "adminBackend.secretName" -}}
|
||||
{{- if .Values.adminBackend.existingSecret }}
|
||||
{{- printf "%s" .Values.adminBackend.existingSecret -}}
|
||||
{{- define "backend.secretName" -}}
|
||||
{{- if .Values.backend.existingSecret }}
|
||||
{{- printf "%s" .Values.backend.existingSecret -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s-admin-backend" (include "common.names.fullname" .) -}}
|
||||
{{- printf "%s-backend" (include "common.names.fullname" .) -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the Admin-backend SMTP secret name
|
||||
*/}}
|
||||
{{- define "adminBackend.smtp.secretName" -}}
|
||||
{{- if .Values.adminBackend.smtp.existingSecret }}
|
||||
{{- printf "%s" .Values.adminBackend.smtp.existingSecret -}}
|
||||
{{- define "backend.smtp.secretName" -}}
|
||||
{{- if .Values.backend.smtp.existingSecret }}
|
||||
{{- printf "%s" .Values.backend.smtp.existingSecret -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s-admin-backend" (include "common.names.fullname" .) -}}
|
||||
{{- printf "%s-backend" (include "common.names.fullname" .) -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return true if Admin-backend SMTP uses password authentication
|
||||
*/}}
|
||||
{{- define "adminBackend.smtp.password.enabled" -}}
|
||||
{{- if and (or .Values.adminBackend.smtp.password .Values.adminBackend.smtp.existingSecret) .Values.adminBackend.smtp.enabled }}
|
||||
{{- define "backend.smtp.password.enabled" -}}
|
||||
{{- if and (or .Values.backend.smtp.password .Values.backend.smtp.existingSecret) .Values.backend.smtp.enabled }}
|
||||
{{- true -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
|
@ -61,11 +61,11 @@ Return true if Admin-backend SMTP uses password authentication
|
|||
Get the user defined LoadBalancerIP for this release
|
||||
Note, returns 127.0.0.1 if using ClusterIP.
|
||||
*/}}
|
||||
{{- define "adminFrontend.serviceIP" -}}
|
||||
{{- if eq .Values.adminFrontend.service.type "ClusterIP" -}}
|
||||
{{- define "frontend.serviceIP" -}}
|
||||
{{- if eq .Values.frontend.service.type "ClusterIP" -}}
|
||||
127.0.0.1
|
||||
{{- else -}}
|
||||
{{- .Values.adminFrontend.service.loadBalancerIP | default "" -}}
|
||||
{{- .Values.frontend.service.loadBalancerIP | default "" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
|
|
@ -73,22 +73,22 @@ Note, returns 127.0.0.1 if using ClusterIP.
|
|||
Gets the host to be used for this application.
|
||||
If not using ClusterIP, or if a host or LoadBalancerIP is not defined, the value will be empty
|
||||
*/}}
|
||||
{{- define "adminFrontend.host" -}}
|
||||
{{- $host := .Values.adminFrontend.host | default "" -}}
|
||||
{{- default (include "adminFrontend.serviceIP" .) $host -}}
|
||||
{{- define "frontend.host" -}}
|
||||
{{- $host := .Values.frontend.host | default "" -}}
|
||||
{{- default (include "frontend.serviceIP" .) $host -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Service name for the backend service
|
||||
*/}}
|
||||
{{- define "adminBackend.serviceName" -}}
|
||||
{{- define "backend.serviceName" -}}
|
||||
{{ include "common.names.fullname" . }}-backend
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Service name for the frontend service
|
||||
*/}}
|
||||
{{- define "adminFrontend.serviceName" -}}
|
||||
{{- define "frontend.serviceName" -}}
|
||||
{{ include "common.names.fullname" . }}-frontend
|
||||
{{- end -}}
|
||||
|
||||
|
|
@ -96,11 +96,11 @@ Service name for the frontend service
|
|||
Get the user defined LoadBalancerIP for this release
|
||||
Note, returns 127.0.0.1 if using ClusterIP.
|
||||
*/}}
|
||||
{{- define "adminBackend.serviceIP" -}}
|
||||
{{- if eq .Values.adminBackend.service.type "ClusterIP" -}}
|
||||
{{- define "backend.serviceIP" -}}
|
||||
{{- if eq .Values.backend.service.type "ClusterIP" -}}
|
||||
127.0.0.1
|
||||
{{- else -}}
|
||||
{{- .Values.adminBackend.service.loadBalancerIP | default "" -}}
|
||||
{{- .Values.backend.service.loadBalancerIP | default "" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
|
|
@ -108,27 +108,27 @@ Note, returns 127.0.0.1 if using ClusterIP.
|
|||
Gets the host to be used for this application.
|
||||
If not using ClusterIP, or if a host or LoadBalancerIP is not defined, the value will be empty
|
||||
*/}}
|
||||
{{- define "adminBackend.host" -}}
|
||||
{{- $host := .Values.adminBackend.host | default "" -}}
|
||||
{{- default (include "adminBackend.serviceIP" .) $host -}}
|
||||
{{- define "backend.host" -}}
|
||||
{{- $host := .Values.backend.host | default "" -}}
|
||||
{{- default (include "backend.serviceIP" .) $host -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the proper Admin-frontend image name
|
||||
*/}}
|
||||
{{- define "adminFrontend.image" -}}
|
||||
{{ include "common.images.image" (dict "imageRoot" .Values.adminFrontend.image "global" .Values.global) }}
|
||||
{{- define "frontend.image" -}}
|
||||
{{ include "common.images.image" (dict "imageRoot" .Values.frontend.image "global" .Values.global) }}
|
||||
{{- end -}}
|
||||
{{/*
|
||||
Return the proper Admin-backend image name
|
||||
*/}}
|
||||
{{- define "adminBackend.image" -}}
|
||||
{{ include "common.images.image" (dict "imageRoot" .Values.adminBackend.image "global" .Values.global) }}
|
||||
{{- define "backend.image" -}}
|
||||
{{ include "common.images.image" (dict "imageRoot" .Values.backend.image "global" .Values.global) }}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the proper Storage Class
|
||||
*/}}
|
||||
{{- define "adminPanel.storageClass" -}}
|
||||
{{- define "dashboard.storageClass" -}}
|
||||
{{- include "common.storage.class" (dict "persistence" .Values.persistence "global" .Values.global) -}}
|
||||
{{- end -}}
|
||||
|
|
|
|||
|
|
@ -1,42 +1,42 @@
|
|||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ include "adminBackend.serviceName" . }}
|
||||
name: {{ include "backend.serviceName" . }}
|
||||
labels: {{- include "common.labels.standard" . | nindent 4 }}
|
||||
{{- if .Values.commonLabels }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- if or .Values.adminBackend.service.annotations .Values.commonAnnotations}}
|
||||
{{- if or .Values.backend.service.annotations .Values.commonAnnotations}}
|
||||
annotations:
|
||||
{{- if .Values.adminBackend.service.annotations }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.adminBackend.service.annotations "context" $) | nindent 4 }}
|
||||
{{- if .Values.backend.service.annotations }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.backend.service.annotations "context" $) | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- if .Values.commonAnnotations }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.commonAnnotations "context" $) | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
spec:
|
||||
type: {{ .Values.adminBackend.service.type }}
|
||||
{{- if (or (eq .Values.adminBackend.service.type "LoadBalancer") (eq .Values.adminBackend.service.type "NodePort")) }}
|
||||
externalTrafficPolicy: {{ .Values.adminBackend.service.externalTrafficPolicy | quote }}
|
||||
type: {{ .Values.backend.service.type }}
|
||||
{{- if (or (eq .Values.backend.service.type "LoadBalancer") (eq .Values.backend.service.type "NodePort")) }}
|
||||
externalTrafficPolicy: {{ .Values.backend.service.externalTrafficPolicy | quote }}
|
||||
{{- end }}
|
||||
{{- if (and (eq .Values.adminBackend.service.type "LoadBalancer") (not (empty .Values.adminBackend.service.loadBalancerIP))) }}
|
||||
loadBalancerIP: {{ .Values.adminBackend.service.loadBalancerIP }}
|
||||
{{- if (and (eq .Values.backend.service.type "LoadBalancer") (not (empty .Values.backend.service.loadBalancerIP))) }}
|
||||
loadBalancerIP: {{ .Values.backend.service.loadBalancerIP }}
|
||||
{{- end }}
|
||||
{{- if (and (eq .Values.adminBackend.service.type "LoadBalancer") .Values.adminBackend.service.loadBalancerSourceRanges) }}
|
||||
{{- if (and (eq .Values.backend.service.type "LoadBalancer") .Values.backend.service.loadBalancerSourceRanges) }}
|
||||
loadBalancerSourceRanges:
|
||||
{{ toYaml .Values.adminBackend.service.loadBalancerSourceRanges | nindent 4 }}
|
||||
{{ toYaml .Values.backend.service.loadBalancerSourceRanges | nindent 4 }}
|
||||
{{- end }}
|
||||
ports:
|
||||
- name: http
|
||||
port: {{ .Values.adminBackend.service.port }}
|
||||
port: {{ .Values.backend.service.port }}
|
||||
targetPort: backend-http
|
||||
{{- if (and (or (eq .Values.adminBackend.service.type "NodePort") (eq .Values.adminBackend.service.type "LoadBalancer")) (not (empty .Values.adminBackend.service.nodePorts.http))) }}
|
||||
nodePort: {{ .Values.adminBackend.service.nodePorts.http }}
|
||||
{{- else if eq .Values.adminBackend.service.type "ClusterIP" }}
|
||||
{{- if (and (or (eq .Values.backend.service.type "NodePort") (eq .Values.backend.service.type "LoadBalancer")) (not (empty .Values.backend.service.nodePorts.http))) }}
|
||||
nodePort: {{ .Values.backend.service.nodePorts.http }}
|
||||
{{- else if eq .Values.backend.service.type "ClusterIP" }}
|
||||
nodePort: null
|
||||
{{- end }}
|
||||
{{- if .Values.adminBackend.service.extraPorts }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.adminBackend.service.extraPorts "context" $) | nindent 4 }}
|
||||
{{- if .Values.backend.service.extraPorts }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.backend.service.extraPorts "context" $) | nindent 4 }}
|
||||
{{- end }}
|
||||
selector: {{- include "common.labels.matchLabels" . | nindent 4 }}
|
||||
|
|
|
|||
|
|
@ -10,21 +10,24 @@ metadata:
|
|||
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
data:
|
||||
# ADMIN_FRONTEND_HOST: "{{ include "adminFrontend.host" . }}"
|
||||
# ADMIN_BACKEND_HOST: "{{ include "adminBackend.host" . }}"
|
||||
SECRET_KEY: {{ .Values.backend.secretKey }}
|
||||
FLASK_APP: app.py
|
||||
FLASK_ENV: {{ .Values.backend.flaskEnv }}
|
||||
# ADMIN_FRONTEND_HOST: "{{ include "frontend.host" . }}"
|
||||
# ADMIN_BACKEND_HOST: "{{ include "backend.host" . }}"
|
||||
# Probably needed in the future:
|
||||
# ADMIN_BACKEND_USERNAME: {{ .Values.adminBackend.username | quote }}
|
||||
# ADMIN_BACKEND_EMAIL: {{ .Values.adminBackend.email | quote }}
|
||||
# {{- if .Values.adminBackend.smtp.enabled }}
|
||||
# ADMIN_BACKEND_SMTP_HOST: {{ .Values.adminBackend.smtp.host | quote }}
|
||||
# ADMIN_BACKEND_SMTP_PORT: {{ .Values.adminBackend.smtp.port | quote }}
|
||||
# {{- if .Values.adminBackend.smtp.user }}
|
||||
# ADMIN_BACKEND_SMTP_USER: {{ .Values.adminBackend.smtp.user | quote }}
|
||||
# ADMIN_BACKEND_USERNAME: {{ .Values.backend.username | quote }}
|
||||
# ADMIN_BACKEND_EMAIL: {{ .Values.backend.email | quote }}
|
||||
# {{- if .Values.backend.smtp.enabled }}
|
||||
# ADMIN_BACKEND_SMTP_HOST: {{ .Values.backend.smtp.host | quote }}
|
||||
# ADMIN_BACKEND_SMTP_PORT: {{ .Values.backend.smtp.port | quote }}
|
||||
# {{- if .Values.backend.smtp.user }}
|
||||
# ADMIN_BACKEND_SMTP_USER: {{ .Values.backend.smtp.user | quote }}
|
||||
# {{- end }}
|
||||
# {{- if .Values.adminBackend.smtp.protocol }}
|
||||
# ADMIN_BACKEND_SMTP_PROTOCOL: {{ .Values.adminBackend.smtp.protocol | quote }}
|
||||
# {{- if .Values.backend.smtp.protocol }}
|
||||
# ADMIN_BACKEND_SMTP_PROTOCOL: {{ .Values.backend.smtp.protocol | quote }}
|
||||
# {{- end }}
|
||||
# {{- if .Values.adminBackend.smtp.auth }}
|
||||
# ADMIN_BACKEND_SMTP_AUTH: {{ .Values.adminBackend.smtp.auth | quote }}
|
||||
# {{- if .Values.backend.smtp.auth }}
|
||||
# ADMIN_BACKEND_SMTP_AUTH: {{ .Values.backend.smtp.auth | quote }}
|
||||
# {{- end }}
|
||||
# {{- end }}
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
{{- if include "adminFrontend.host" . -}}
|
||||
{{- if include "frontend.host" . -}}
|
||||
apiVersion: {{ template "common.capabilities.deployment.apiVersion" . }}
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ template "common.names.fullname" . }}
|
||||
labels: {{- include "common.labels.standard" . | nindent 4 }}
|
||||
component: adminPanel
|
||||
component: dashboard
|
||||
{{- if .Values.commonLabels }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
|
|
@ -15,14 +15,14 @@ spec:
|
|||
replicas: {{ .Values.replicaCount }}
|
||||
selector:
|
||||
matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }}
|
||||
component: adminPanel
|
||||
component: dashboard
|
||||
{{- if .Values.updateStrategy }}
|
||||
strategy: {{- toYaml .Values.updateStrategy | nindent 4 }}
|
||||
{{- end }}
|
||||
template:
|
||||
metadata:
|
||||
labels: {{- include "common.labels.standard" . | nindent 8 }}
|
||||
component: adminPanel
|
||||
component: dashboard
|
||||
{{- if .Values.podLabels }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.podLabels "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
|
|
@ -30,7 +30,7 @@ spec:
|
|||
annotations: {{- include "common.tplvalues.render" (dict "value" .Values.podAnnotations "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- include "adminPanel.imagePullSecrets" . | nindent 6 }}
|
||||
{{- include "dashboard.imagePullSecrets" . | nindent 6 }}
|
||||
{{- if .Values.hostAliases }}
|
||||
hostAliases: {{- include "common.tplvalues.render" (dict "value" .Values.hostAliases "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
|
|
@ -48,148 +48,148 @@ spec:
|
|||
{{- if .Values.tolerations }}
|
||||
tolerations: {{- include "common.tplvalues.render" (dict "value" .Values.tolerations "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
serviceAccountName: {{ include "adminPanel.serviceAccountName" . }}
|
||||
serviceAccountName: {{ include "dashboard.serviceAccountName" . }}
|
||||
securityContext: {{- toYaml .Values.podSecurityContext | nindent 8 }}
|
||||
initContainers:
|
||||
{{- if .Values.initContainers }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.initContainers "context" $) | nindent 8 }}
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: admin-frontend
|
||||
securityContext: {{- toYaml .Values.adminFrontend.containerSecurityContext | nindent 12 }}
|
||||
image: {{ template "adminFrontend.image" . }}
|
||||
- name: frontend
|
||||
securityContext: {{- toYaml .Values.frontend.containerSecurityContext | nindent 12 }}
|
||||
image: {{ template "frontend.image" . }}
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
|
||||
{{- if .Values.adminFrontend.command }}
|
||||
command: {{- include "common.tplvalues.render" (dict "value" .Values.adminFrontend.command "context" $) | nindent 12 }}
|
||||
{{- if .Values.frontend.command }}
|
||||
command: {{- include "common.tplvalues.render" (dict "value" .Values.frontend.command "context" $) | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.adminFrontend.args }}
|
||||
args: {{- include "common.tplvalues.render" (dict "value" .Values.adminFrontend.args "context" $) | nindent 12 }}
|
||||
{{- if .Values.frontend.args }}
|
||||
args: {{- include "common.tplvalues.render" (dict "value" .Values.frontend.args "context" $) | nindent 12 }}
|
||||
{{- end }}
|
||||
env:
|
||||
{{- if .Values.adminFrontend.extraEnvVars }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.adminFrontend.extraEnvVars "context" $) | nindent 12 }}
|
||||
{{- if .Values.frontend.extraEnvVars }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.frontend.extraEnvVars "context" $) | nindent 12 }}
|
||||
{{- end }}
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: {{ include "common.names.fullname" . }}
|
||||
{{- if .Values.adminFrontend.extraEnvVarsCM }}
|
||||
{{- if .Values.frontend.extraEnvVarsCM }}
|
||||
- configMapRef:
|
||||
name: {{ .Values.adminFrontend.extraEnvVarsCM }}
|
||||
name: {{ .Values.frontend.extraEnvVarsCM }}
|
||||
{{- end }}
|
||||
{{- if .Values.adminFrontend.extraEnvVarsSecret }}
|
||||
{{- if .Values.frontend.extraEnvVarsSecret }}
|
||||
- secretRef:
|
||||
name: {{ .Values.adminFrontend.extraEnvVarsSecret }}
|
||||
name: {{ .Values.frontend.extraEnvVarsSecret }}
|
||||
{{- end }}
|
||||
ports:
|
||||
- name: frontend-http
|
||||
containerPort: 80
|
||||
protocol: TCP
|
||||
{{- if .Values.adminFrontend.livenessProbe.enabled }}
|
||||
{{- if .Values.frontend.livenessProbe.enabled }}
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: frontend-http
|
||||
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 }}
|
||||
initialDelaySeconds: {{ .Values.frontend.livenessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.frontend.livenessProbe.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.frontend.livenessProbe.timeoutSeconds }}
|
||||
successThreshold: {{ .Values.frontend.livenessProbe.successThreshold }}
|
||||
failureThreshold: {{ .Values.frontend.livenessProbe.failureThreshold }}
|
||||
{{- else if .Values.frontend.customLivenessProbe }}
|
||||
livenessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.frontend.customLivenessProbe "context" $) | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.adminFrontend.readinessProbe.enabled }}
|
||||
{{- if .Values.frontend.readinessProbe.enabled }}
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: frontend-http
|
||||
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 }}
|
||||
initialDelaySeconds: {{ .Values.frontend.readinessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.frontend.readinessProbe.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.frontend.readinessProbe.timeoutSeconds }}
|
||||
successThreshold: {{ .Values.frontend.readinessProbe.successThreshold }}
|
||||
failureThreshold: {{ .Values.frontend.readinessProbe.failureThreshold }}
|
||||
{{- else if .Values.frontend.customReadinessProbe }}
|
||||
readinessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.frontend.customReadinessProbe "context" $) | nindent 12 }}
|
||||
{{- end }}
|
||||
volumeMounts:
|
||||
{{- if .Values.adminFrontend.extraVolumeMounts }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.adminFrontend.extraVolumeMounts "context" $) | nindent 12 }}
|
||||
{{- if .Values.frontend.extraVolumeMounts }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.frontend.extraVolumeMounts "context" $) | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.adminFrontend.resources }}
|
||||
resources: {{- toYaml .Values.adminFrontend.resources | nindent 12 }}
|
||||
{{- if .Values.frontend.resources }}
|
||||
resources: {{- toYaml .Values.frontend.resources | nindent 12 }}
|
||||
{{- end }}
|
||||
- name: admin-backend
|
||||
securityContext: {{- toYaml .Values.adminBackend.containerSecurityContext | nindent 12 }}
|
||||
image: {{ template "adminBackend.image" . }}
|
||||
- name: backend
|
||||
securityContext: {{- toYaml .Values.backend.containerSecurityContext | nindent 12 }}
|
||||
image: {{ template "backend.image" . }}
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
|
||||
{{- if .Values.adminBackend.command }}
|
||||
command: {{- include "common.tplvalues.render" (dict "value" .Values.adminBackend.command "context" $) | nindent 12 }}
|
||||
{{- if .Values.backend.command }}
|
||||
command: {{- include "common.tplvalues.render" (dict "value" .Values.backend.command "context" $) | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.adminBackend.args }}
|
||||
args: {{- include "common.tplvalues.render" (dict "value" .Values.adminBackend.args "context" $) | nindent 12 }}
|
||||
{{- if .Values.backend.args }}
|
||||
args: {{- include "common.tplvalues.render" (dict "value" .Values.backend.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: {{ include "backend.secretName" . }}
|
||||
key: backend-password
|
||||
{{- if (include "backend.smtp.password.enabled" .) }}
|
||||
- name: ADMIN_PANEL_SMTP_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ include "adminBackend.smtp.secretName" . }}
|
||||
name: {{ include "backend.smtp.secretName" . }}
|
||||
key: smtp-password
|
||||
{{- end }}
|
||||
{{- if .Values.adminBackend.extraEnvVars }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.adminBackend.extraEnvVars "context" $) | nindent 12 }}
|
||||
{{- if .Values.backend.extraEnvVars }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.backend.extraEnvVars "context" $) | nindent 12 }}
|
||||
{{- end }}
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: {{ include "common.names.fullname" . }}
|
||||
{{- if .Values.adminBackend.extraEnvVarsCM }}
|
||||
{{- if .Values.backend.extraEnvVarsCM }}
|
||||
- configMapRef:
|
||||
name: {{ .Values.adminBackend.extraEnvVarsCM }}
|
||||
name: {{ .Values.backend.extraEnvVarsCM }}
|
||||
{{- end }}
|
||||
{{- if .Values.adminBackend.extraEnvVarsSecret }}
|
||||
{{- if .Values.backend.extraEnvVarsSecret }}
|
||||
- secretRef:
|
||||
name: {{ .Values.adminBackend.extraEnvVarsSecret }}
|
||||
name: {{ .Values.backend.extraEnvVarsSecret }}
|
||||
{{- end }}
|
||||
ports:
|
||||
- name: backend-http
|
||||
containerPort: 5000
|
||||
protocol: TCP
|
||||
{{- if .Values.adminBackend.livenessProbe.enabled }}
|
||||
{{- if .Values.backend.livenessProbe.enabled }}
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: backend-http
|
||||
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 }}
|
||||
initialDelaySeconds: {{ .Values.backend.livenessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.backend.livenessProbe.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.backend.livenessProbe.timeoutSeconds }}
|
||||
successThreshold: {{ .Values.backend.livenessProbe.successThreshold }}
|
||||
failureThreshold: {{ .Values.backend.livenessProbe.failureThreshold }}
|
||||
{{- else if .Values.backend.customLivenessProbe }}
|
||||
livenessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.backend.customLivenessProbe "context" $) | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.adminBackend.readinessProbe.enabled }}
|
||||
{{- if .Values.backend.readinessProbe.enabled }}
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: backend-http
|
||||
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 }}
|
||||
initialDelaySeconds: {{ .Values.backend.readinessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.backend.readinessProbe.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.backend.readinessProbe.timeoutSeconds }}
|
||||
successThreshold: {{ .Values.backend.readinessProbe.successThreshold }}
|
||||
failureThreshold: {{ .Values.backend.readinessProbe.failureThreshold }}
|
||||
{{- else if .Values.backend.customReadinessProbe }}
|
||||
readinessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.backend.customReadinessProbe "context" $) | nindent 12 }}
|
||||
{{- end }}
|
||||
volumeMounts:
|
||||
{{- if .Values.adminBackend.extraVolumeMounts }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.adminBackend.extraVolumeMounts "context" $) | nindent 12 }}
|
||||
{{- if .Values.backend.extraVolumeMounts }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.backend.extraVolumeMounts "context" $) | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.adminBackend.resources }}
|
||||
resources: {{- toYaml .Values.adminBackend.resources | nindent 12 }}
|
||||
{{- if .Values.backend.resources }}
|
||||
resources: {{- toYaml .Values.backend.resources | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.sidecars }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.sidecars "context" $) | nindent 8 }}
|
||||
|
|
|
|||
|
|
@ -1,42 +1,42 @@
|
|||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ include "adminFrontend.serviceName" . }}
|
||||
name: {{ include "frontend.serviceName" . }}
|
||||
labels: {{- include "common.labels.standard" . | nindent 4 }}
|
||||
{{- if .Values.commonLabels }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- if or .Values.adminFrontend.service.annotations .Values.commonAnnotations}}
|
||||
{{- if or .Values.frontend.service.annotations .Values.commonAnnotations}}
|
||||
annotations:
|
||||
{{- if .Values.adminFrontend.service.annotations }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.adminFrontend.service.annotations "context" $) | nindent 4 }}
|
||||
{{- if .Values.frontend.service.annotations }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.frontend.service.annotations "context" $) | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- if .Values.commonAnnotations }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.commonAnnotations "context" $) | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
spec:
|
||||
type: {{ .Values.adminFrontend.service.type }}
|
||||
{{- if (or (eq .Values.adminFrontend.service.type "LoadBalancer") (eq .Values.adminFrontend.service.type "NodePort")) }}
|
||||
externalTrafficPolicy: {{ .Values.adminFrontend.service.externalTrafficPolicy | quote }}
|
||||
type: {{ .Values.frontend.service.type }}
|
||||
{{- if (or (eq .Values.frontend.service.type "LoadBalancer") (eq .Values.frontend.service.type "NodePort")) }}
|
||||
externalTrafficPolicy: {{ .Values.frontend.service.externalTrafficPolicy | quote }}
|
||||
{{- end }}
|
||||
{{- if (and (eq .Values.adminFrontend.service.type "LoadBalancer") (not (empty .Values.adminFrontend.service.loadBalancerIP))) }}
|
||||
loadBalancerIP: {{ .Values.adminFrontend.service.loadBalancerIP }}
|
||||
{{- if (and (eq .Values.frontend.service.type "LoadBalancer") (not (empty .Values.frontend.service.loadBalancerIP))) }}
|
||||
loadBalancerIP: {{ .Values.frontend.service.loadBalancerIP }}
|
||||
{{- end }}
|
||||
{{- if (and (eq .Values.adminFrontend.service.type "LoadBalancer") .Values.adminFrontend.service.loadBalancerSourceRanges) }}
|
||||
{{- if (and (eq .Values.frontend.service.type "LoadBalancer") .Values.frontend.service.loadBalancerSourceRanges) }}
|
||||
loadBalancerSourceRanges:
|
||||
{{ toYaml .Values.adminFrontend.service.loadBalancerSourceRanges | nindent 4 }}
|
||||
{{ toYaml .Values.frontend.service.loadBalancerSourceRanges | nindent 4 }}
|
||||
{{- end }}
|
||||
ports:
|
||||
- name: http
|
||||
port: {{ .Values.adminFrontend.service.port }}
|
||||
port: {{ .Values.frontend.service.port }}
|
||||
targetPort: frontend-http
|
||||
{{- if (and (or (eq .Values.adminFrontend.service.type "NodePort") (eq .Values.adminFrontend.service.type "LoadBalancer")) (not (empty .Values.adminFrontend.service.nodePorts.http))) }}
|
||||
nodePort: {{ .Values.adminFrontend.service.nodePorts.http }}
|
||||
{{- else if eq .Values.adminFrontend.service.type "ClusterIP" }}
|
||||
{{- if (and (or (eq .Values.frontend.service.type "NodePort") (eq .Values.frontend.service.type "LoadBalancer")) (not (empty .Values.frontend.service.nodePorts.http))) }}
|
||||
nodePort: {{ .Values.frontend.service.nodePorts.http }}
|
||||
{{- else if eq .Values.frontend.service.type "ClusterIP" }}
|
||||
nodePort: null
|
||||
{{- end }}
|
||||
{{- if .Values.adminFrontend.service.extraPorts }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.adminFrontend.service.extraPorts "context" $) | nindent 4 }}
|
||||
{{- if .Values.frontend.service.extraPorts }}
|
||||
{{- include "common.tplvalues.render" (dict "value" .Values.frontend.service.extraPorts "context" $) | nindent 4 }}
|
||||
{{- end }}
|
||||
selector: {{- include "common.labels.matchLabels" . | nindent 4 }}
|
||||
|
|
|
|||
|
|
@ -40,13 +40,13 @@ spec:
|
|||
{{- if eq "true" (include "common.ingress.supportsPathType" .) }}
|
||||
pathType: {{ .Values.ingress.pathType }}
|
||||
{{- end }}
|
||||
backend: {{- include "common.ingress.backend" (dict "serviceName" (include "adminFrontend.serviceName" .) "servicePort" "frontend-http" "context" $) | nindent 14 }}
|
||||
backend: {{- include "common.ingress.backend" (dict "serviceName" (include "frontend.serviceName" .) "servicePort" "frontend-http" "context" $) | nindent 14 }}
|
||||
# Forward API calls to the back-end container
|
||||
- path: {{ .Values.ingress.path }}api/v1
|
||||
{{- if eq "true" (include "common.ingress.supportsPathType" .) }}
|
||||
pathType: {{ .Values.ingress.pathType }}
|
||||
{{- end }}
|
||||
backend: {{- include "common.ingress.backend" (dict "serviceName" (include "adminBackend.serviceName" .) "servicePort" "backend-http" "context" $) | nindent 14 }}
|
||||
backend: {{- include "common.ingress.backend" (dict "serviceName" (include "backend.serviceName" .) "servicePort" "backend-http" "context" $) | nindent 14 }}
|
||||
{{- end }}
|
||||
{{- range .Values.ingress.extraHosts }}
|
||||
- host: {{ .name }}
|
||||
|
|
@ -56,11 +56,11 @@ spec:
|
|||
{{- if eq "true" (include "common.ingress.supportsPathType" $) }}
|
||||
pathType: {{ default "ImplementationSpecific" .pathType }}
|
||||
{{- end }}
|
||||
backend: {{- include "common.ingress.backend" (dict "serviceName" (include "adminFrontend.serviceName" $) "servicePort" "frontend-http" "context" $) | nindent 14 }}
|
||||
backend: {{- include "common.ingress.backend" (dict "serviceName" (include "frontend.serviceName" $) "servicePort" "frontend-http" "context" $) | nindent 14 }}
|
||||
- path: {{ default "/" .path }}api/v1
|
||||
{{- if eq "true" (include "common.ingress.supportsPathType" $) }}
|
||||
pathType: {{ default "ImplementationSpecific" .pathType }}
|
||||
{{- end }}
|
||||
backend: {{- include "common.ingress.backend" (dict "serviceName" (include "adminBackend.serviceName" .) "servicePort" "backend-http" "context" $) | nindent 14 }}
|
||||
backend: {{- include "common.ingress.backend" (dict "serviceName" (include "backend.serviceName" .) "servicePort" "backend-http" "context" $) | nindent 14 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
# Disabled by default because the current admin panel does not need persistence
|
||||
{{- if and (include "adminFrontend.host" .) .Values.persistence.enabled (not .Values.persistence.existingClaim) }}
|
||||
# Disabled by default because the current dashboard does not need persistence
|
||||
{{- if and (include "frontend.host" .) .Values.persistence.enabled (not .Values.persistence.existingClaim) }}
|
||||
kind: PersistentVolumeClaim
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
|
|
@ -17,7 +17,7 @@ spec:
|
|||
resources:
|
||||
requests:
|
||||
storage: {{ .Values.persistence.size | quote }}
|
||||
{{ include "adminPanel.storageClass" . }}
|
||||
{{ include "dashboard.storageClass" . }}
|
||||
{{- if .Values.persistence.selector }}
|
||||
selector: {{- include "common.tplvalues.render" (dict "value" .Values.persistence.selector "context" $) | nindent 4 }}
|
||||
{{- end -}}
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
{{- if (include "adminBackend.createSecret" .) }}
|
||||
{{- if (include "backend.createSecret" .) }}
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: {{ include "adminBackend.secretName" . }}
|
||||
name: {{ include "backend.secretName" . }}
|
||||
labels: {{- include "common.labels.standard" . | nindent 4 }}
|
||||
{{- if .Values.commonLabels }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
|
||||
|
|
@ -12,12 +12,12 @@ metadata:
|
|||
{{- end }}
|
||||
type: Opaque
|
||||
data:
|
||||
{{- if and (.Values.adminBackend.password) (not .Values.adminBackend.existingSecret) }}
|
||||
adminBackend-password: {{ .Values.adminBackend.password | b64enc | quote }}
|
||||
{{- else if not .Values.adminBackend.existingSecret }}
|
||||
adminBackend-password: {{ randAlphaNum 10 | b64enc | quote }}
|
||||
{{- if and (.Values.backend.password) (not .Values.backend.existingSecret) }}
|
||||
backend-password: {{ .Values.backend.password | b64enc | quote }}
|
||||
{{- else if not .Values.backend.existingSecret }}
|
||||
backend-password: {{ randAlphaNum 10 | b64enc | quote }}
|
||||
{{- end }}
|
||||
{{- if and (.Values.adminBackend.smtp.password) (.Values.adminBackend.smtp.enabled) (not .Values.adminBackend.smtp.existingSecret) }}
|
||||
smtp-password: {{ .Values.adminBackend.smtp.password | b64enc | quote }}
|
||||
{{- if and (.Values.backend.smtp.password) (.Values.backend.smtp.enabled) (not .Values.backend.smtp.existingSecret) }}
|
||||
smtp-password: {{ .Values.backend.smtp.password | b64enc | quote }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: {{ include "adminPanel.serviceAccountName" . }}
|
||||
name: {{ include "dashboard.serviceAccountName" . }}
|
||||
labels: {{- include "common.labels.standard" . | nindent 4 }}
|
||||
{{- if .Values.commonLabels }}
|
||||
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
|
||||
|
|
|
|||
Reference in a new issue