2021-09-30 14:37:30 +02:00
|
|
|
|
|
|
|
{{/*
|
|
|
|
Create the name of the service account to use
|
|
|
|
*/}}
|
2021-09-30 15:33:22 +02:00
|
|
|
{{- define "adminFrontend.serviceAccountName" -}}
|
2021-09-30 14:37:30 +02:00
|
|
|
{{- if .Values.serviceAccount.create -}}
|
|
|
|
{{ default (include "common.names.fullname" .) .Values.serviceAccount.name }}
|
|
|
|
{{- else -}}
|
|
|
|
{{ default "default" .Values.serviceAccount.name }}
|
|
|
|
{{- end -}}
|
|
|
|
{{- end -}}
|
|
|
|
|
|
|
|
{{/*
|
|
|
|
Return the proper Docker image registry secret names
|
|
|
|
*/}}
|
2021-09-30 15:33:22 +02:00
|
|
|
{{- define "adminFrontend.imagePullSecrets" -}}
|
2021-09-30 14:37:30 +02:00
|
|
|
{{ include "common.images.pullSecrets" (dict "images" (list .Values.image) "global" .Values.global) }}
|
|
|
|
{{- end -}}
|
|
|
|
|
|
|
|
{{/*
|
2021-09-30 15:33:22 +02:00
|
|
|
Return true if a secret object for Admin-frontend should be created
|
2021-09-30 14:37:30 +02:00
|
|
|
*/}}
|
2021-09-30 15:33:22 +02:00
|
|
|
{{- define "adminFrontend.createSecret" -}}
|
|
|
|
{{- if or (not .Values.adminFrontend.existingSecret) (and (not .Values.adminFrontend.smtp.existingSecret) .Values.adminFrontend.smtp.password .Values.adminFrontend.smtp.enabled) }}
|
2021-09-30 14:37:30 +02:00
|
|
|
{{- true -}}
|
|
|
|
{{- end -}}
|
|
|
|
{{- end -}}
|
|
|
|
|
|
|
|
{{/*
|
2021-09-30 15:33:22 +02:00
|
|
|
Return the Admin-frontend secret name
|
2021-09-30 14:37:30 +02:00
|
|
|
*/}}
|
2021-09-30 15:33:22 +02:00
|
|
|
{{- define "adminFrontend.secretName" -}}
|
|
|
|
{{- if .Values.adminFrontend.existingSecret }}
|
|
|
|
{{- printf "%s" .Values.adminFrontend.existingSecret -}}
|
2021-09-30 14:37:30 +02:00
|
|
|
{{- else -}}
|
2021-09-30 15:33:22 +02:00
|
|
|
{{- printf "%s-adminFrontend" (include "common.names.fullname" .) -}}
|
2021-09-30 14:37:30 +02:00
|
|
|
{{- end -}}
|
|
|
|
{{- end -}}
|
|
|
|
|
|
|
|
{{/*
|
2021-09-30 15:33:22 +02:00
|
|
|
Return the Admin-frontend SMTP secret name
|
2021-09-30 14:37:30 +02:00
|
|
|
*/}}
|
2021-09-30 15:33:22 +02:00
|
|
|
{{- define "adminFrontend.smtp.secretName" -}}
|
|
|
|
{{- if .Values.adminFrontend.smtp.existingSecret }}
|
|
|
|
{{- printf "%s" .Values.adminFrontend.smtp.existingSecret -}}
|
2021-09-30 14:37:30 +02:00
|
|
|
{{- else -}}
|
2021-09-30 15:33:22 +02:00
|
|
|
{{- printf "%s-adminFrontend" (include "common.names.fullname" .) -}}
|
2021-09-30 14:37:30 +02:00
|
|
|
{{- end -}}
|
|
|
|
{{- end -}}
|
|
|
|
|
|
|
|
{{/*
|
2021-09-30 15:33:22 +02:00
|
|
|
Return true if Admin-frontend SMTP uses password authentication
|
2021-09-30 14:37:30 +02:00
|
|
|
*/}}
|
2021-09-30 15:33:22 +02:00
|
|
|
{{- define "adminFrontend.smtp.password.enabled" -}}
|
|
|
|
{{- if and (or .Values.adminFrontend.smtp.password .Values.adminFrontend.smtp.existingSecret) .Values.adminFrontend.smtp.enabled }}
|
2021-09-30 14:37:30 +02:00
|
|
|
{{- true -}}
|
|
|
|
{{- end -}}
|
|
|
|
{{- end -}}
|
|
|
|
|
|
|
|
{{/*
|
|
|
|
Get the user defined LoadBalancerIP for this release
|
|
|
|
Note, returns 127.0.0.1 if using ClusterIP.
|
|
|
|
*/}}
|
2021-09-30 15:33:22 +02:00
|
|
|
{{- define "adminFrontend.serviceIP" -}}
|
2021-09-30 14:37:30 +02:00
|
|
|
{{- if eq .Values.service.type "ClusterIP" -}}
|
|
|
|
127.0.0.1
|
|
|
|
{{- else -}}
|
|
|
|
{{- .Values.service.loadBalancerIP | default "" -}}
|
|
|
|
{{- end -}}
|
|
|
|
{{- end -}}
|
|
|
|
|
|
|
|
{{/*
|
|
|
|
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
|
|
|
|
*/}}
|
2021-09-30 15:33:22 +02:00
|
|
|
{{- define "adminFrontend.host" -}}
|
|
|
|
{{- $host := .Values.adminFrontend.host | default "" -}}
|
|
|
|
{{- default (include "adminFrontend.serviceIP" .) $host -}}
|
2021-09-30 14:37:30 +02:00
|
|
|
{{- end -}}
|
|
|
|
|
|
|
|
{{/*
|
2021-09-30 15:33:22 +02:00
|
|
|
Return the proper Admin-frontend image name
|
2021-09-30 14:37:30 +02:00
|
|
|
*/}}
|
2021-09-30 15:33:22 +02:00
|
|
|
{{- define "adminFrontend.image" -}}
|
2021-09-30 14:37:30 +02:00
|
|
|
{{ include "common.images.image" (dict "imageRoot" .Values.image "global" .Values.global) }}
|
|
|
|
{{- end -}}
|
|
|
|
|
|
|
|
{{/*
|
|
|
|
Return the proper Storage Class
|
|
|
|
*/}}
|
2021-09-30 15:33:22 +02:00
|
|
|
{{- define "adminFrontend.storageClass" -}}
|
2021-09-30 14:37:30 +02:00
|
|
|
{{- include "common.storage.class" (dict "persistence" .Values.persistence "global" .Values.global) -}}
|
|
|
|
{{- end -}}
|