add admin backend stuff
This commit is contained in:
parent
4087d1b0d3
commit
82abc9b73d
9 changed files with 362 additions and 261 deletions
|
|
@ -2,7 +2,7 @@
|
|||
{{/*
|
||||
Create the name of the service account to use
|
||||
*/}}
|
||||
{{- define "adminFrontend.serviceAccountName" -}}
|
||||
{{- define "adminPanel.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 "adminFrontend.imagePullSecrets" -}}
|
||||
{{- define "adminPanel.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 "adminFrontend.createSecret" -}}
|
||||
{{- if or (not .Values.adminFrontend.existingSecret) (and (not .Values.adminFrontend.smtp.existingSecret) .Values.adminFrontend.smtp.password .Values.adminFrontend.smtp.enabled) }}
|
||||
{{- define "adminPanel.createSecret" -}}
|
||||
{{- if or (not .Values.adminPanel.existingSecret) (and (not .Values.adminPanel.smtp.existingSecret) .Values.adminPanel.smtp.password .Values.adminPanel.smtp.enabled) }}
|
||||
{{- true -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
|
@ -29,30 +29,30 @@ Return true if a secret object for Admin-frontend should be created
|
|||
{{/*
|
||||
Return the Admin-frontend secret name
|
||||
*/}}
|
||||
{{- define "adminFrontend.secretName" -}}
|
||||
{{- if .Values.adminFrontend.existingSecret }}
|
||||
{{- printf "%s" .Values.adminFrontend.existingSecret -}}
|
||||
{{- define "adminPanel.secretName" -}}
|
||||
{{- if .Values.adminPanel.existingSecret }}
|
||||
{{- printf "%s" .Values.adminPanel.existingSecret -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s-adminFrontend" (include "common.names.fullname" .) -}}
|
||||
{{- printf "%s-adminPanel" (include "common.names.fullname" .) -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the Admin-frontend SMTP secret name
|
||||
*/}}
|
||||
{{- define "adminFrontend.smtp.secretName" -}}
|
||||
{{- if .Values.adminFrontend.smtp.existingSecret }}
|
||||
{{- printf "%s" .Values.adminFrontend.smtp.existingSecret -}}
|
||||
{{- define "adminPanel.smtp.secretName" -}}
|
||||
{{- if .Values.adminPanel.smtp.existingSecret }}
|
||||
{{- printf "%s" .Values.adminPanel.smtp.existingSecret -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s-adminFrontend" (include "common.names.fullname" .) -}}
|
||||
{{- printf "%s-adminPanel" (include "common.names.fullname" .) -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return true if Admin-frontend SMTP uses password authentication
|
||||
*/}}
|
||||
{{- define "adminFrontend.smtp.password.enabled" -}}
|
||||
{{- if and (or .Values.adminFrontend.smtp.password .Values.adminFrontend.smtp.existingSecret) .Values.adminFrontend.smtp.enabled }}
|
||||
{{- define "adminPanel.smtp.password.enabled" -}}
|
||||
{{- if and (or .Values.adminPanel.smtp.password .Values.adminPanel.smtp.existingSecret) .Values.adminPanel.smtp.enabled }}
|
||||
{{- true -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
|
@ -61,7 +61,7 @@ Return true if Admin-frontend SMTP uses password authentication
|
|||
Get the user defined LoadBalancerIP for this release
|
||||
Note, returns 127.0.0.1 if using ClusterIP.
|
||||
*/}}
|
||||
{{- define "adminFrontend.serviceIP" -}}
|
||||
{{- define "adminPanel.serviceIP" -}}
|
||||
{{- if eq .Values.service.type "ClusterIP" -}}
|
||||
127.0.0.1
|
||||
{{- else -}}
|
||||
|
|
@ -73,21 +73,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 "adminFrontend.host" -}}
|
||||
{{- $host := .Values.adminFrontend.host | default "" -}}
|
||||
{{- default (include "adminFrontend.serviceIP" .) $host -}}
|
||||
{{- define "adminPanel.host" -}}
|
||||
{{- $host := .Values.adminPanel.host | default "" -}}
|
||||
{{- default (include "adminPanel.serviceIP" .) $host -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the proper Admin-frontend image name
|
||||
*/}}
|
||||
{{- define "adminFrontend.image" -}}
|
||||
{{ include "common.images.image" (dict "imageRoot" .Values.image "global" .Values.global) }}
|
||||
{{ include "common.images.image" (dict "imageRoot" .Values.adminFrontend.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) }}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the proper Storage Class
|
||||
*/}}
|
||||
{{- define "adminFrontend.storageClass" -}}
|
||||
{{- define "adminPanel.storageClass" -}}
|
||||
{{- include "common.storage.class" (dict "persistence" .Values.persistence "global" .Values.global) -}}
|
||||
{{- end -}}
|
||||
|
|
|
|||
Reference in a new issue