rename adminPanel to dashboard and adminFrontend and adminBackend to frontend and backend. Fix JWT secrets

This commit is contained in:
Maarten de Waard 2021-10-05 16:39:47 +02:00
parent 18276be75d
commit 80c2f776d3
No known key found for this signature in database
GPG key ID: 1D3E893A657CC8DA
12 changed files with 268 additions and 258 deletions

View file

@ -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 -}}