remove all postgres and redis, rename everything to adminFrontend, remove other things we do not need

This commit is contained in:
Maarten de Waard 2021-09-30 15:33:22 +02:00
parent f0b0dd3e36
commit 44c020e37f
No known key found for this signature in database
GPG key ID: 1D3E893A657CC8DA
9 changed files with 109 additions and 594 deletions

View file

@ -1,165 +0,0 @@
{{- $secretName := include "discourse.secretName" . -}}
{{- $postgresqlSecretName := include "discourse.postgresql.secretName" . -}}
{{- $redisSecretName := include "discourse.redis.secretName" . -}}
{{- if or .Values.postgresql.enabled .Values.externalDatabase.host -}}
{{- if empty (include "discourse.host" .) -}}
###############################################################################
### ERROR: You did not provide an external host in your 'helm install' call ###
###############################################################################
This deployment will be incomplete until you configure Discourse with a resolvable host. To configure Discourse with the URL of your service:
1. Get the discourse URL by running:
{{- if contains "NodePort" .Values.service.type }}
export DISCOURSE_HOST=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}"):$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "common.names.fullname" . }} -o jsonpath="{.spec.ports[0].nodePort}")
{{- else if contains "LoadBalancer" .Values.service.type }}
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
Watch the status with: 'kubectl get svc --namespace {{ .Release.Namespace }} -w {{ template "common.names.fullname" . }}'
export DISCOURSE_HOST=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "common.names.fullname" . }} --template "{{ "{{ range (index .status.loadBalancer.ingress 0) }}{{ . }}{{ end }}" }}")
{{- end }}
{{ include "common.utils.secret.getvalue" (dict "secret" $secretName "field" "discourse-password" "context" $) }}
{{ include "common.utils.secret.getvalue" (dict "secret" $postgresqlSecretName "field" "postgresql-password" "context" $) }}
{{- if (include "discourse.redis.auth.enabled" .) }}
{{ include "common.utils.secret.getvalue" (dict "secret" $redisSecretName "field" "redis-password" "context" $) }}
{{- end }}
2. Complete your Discourse deployment by running:
{{- if .Values.postgresql.enabled }}
helm upgrade --namespace {{ .Release.Namespace }} {{ .Release.Name }} bitnami/{{ .Chart.Name }} \
--set discourse.host=$DISCOURSE_HOST \
--set discourse.password=$DISCOURSE_PASSWORD \
{{- if .Values.global }}{{- if .Values.global.imagePullSecrets }}
--set global.imagePullSecrets={{ .Values.global.imagePullSecrets }} \
{{- end }}{{- end }}
{{- if and .Values.redis.enabled .Values.redis.auth.enabled (not .Values.redis.auth.existingSecret) (not .Values.redis.auth.password) }}
--set redis.auth.password=$REDIS_PASSWORD \
{{- end }}
--set postgresql.postgresqlPassword=$POSTGRESQL_PASSWORD
{{- else }}
## PLEASE UPDATE THE EXTERNAL DATABASE CONNECTION PARAMETERS IN THE FOLLOWING COMMAND AS NEEDED ##
helm upgrade --namespace {{ .Release.Namespace }} {{ .Release.Name }} bitnami/{{ .Chart.Name }} \
--set discourse.host=$DISCOURSE_HOST \
--set discourse.password=$DISCOURSE_PASSWORD \
--set service.type={{ .Values.service.type }} \
--set externalDatabase.host={{ .Values.externalDatabase.host }} \
--set externalDatabase.port={{ .Values.externalDatabase.port }} \
--set externalDatabase.user={{ .Values.externalDatabase.user }} \
--set externalDatabase.password=$POSTGRESQL_PASSWORD \
--set externalDatabase.database={{ .Values.externalDatabase.database }} \
{{- if .Values.global }}{{- if .Values.global.imagePullSecrets }}
--set global.imagePullSecrets={{ .Values.global.imagePullSecrets }} \
{{- end }}{{- end }}
{{- if and .Values.redis.enabled .Values.redis.auth.enabled (not .Values.redis.auth.existingSecret) (not .Values.redis.auth.password) }}
--set redis.auth.password=$REDIS_PASSWORD \
{{- end }}
--set postgresql.enabled=false
{{- end }}
{{- else -}}
1. Get the Discourse URL by running:
Discourse URL : http://{{ include "discourse.host" . }}/
{{- if eq .Values.service.type "ClusterIP" }}
kubectl port-forward --namespace {{ .Release.Namespace }} svc/{{ template "common.names.fullname" . }} 80:{{ .Values.service.port }}
{{- end }}
2. Get your Discourse login credentials by running:
Username: {{ .Values.discourse.username }}
{{ include "common.utils.secret.getvalue" (dict "secret" $secretName "field" "discourse-password" "context" $) }}
{{ include "common.utils.secret.getvalue" (dict "secret" $postgresqlSecretName "field" "postgresql-password" "context" $) }}
{{- if (include "discourse.redis.auth.enabled" .) }}
{{ include "common.utils.secret.getvalue" (dict "secret" $redisSecretName "field" "redis-password" "context" $) }}
{{- end }}
{{- end }}
{{- else -}}
########################################################################################
### ERROR: You did not provide an external database host in your 'helm install' call ###
########################################################################################
This deployment will be incomplete until you configure Discourse with a resolvable database host. To configure Discourse to use and external database host:
1. Complete your Discourse deployment by running:
{{- if contains "NodePort" .Values.service.type }}
export DISCOURSE_HOST=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}"):$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "common.names.fullname" . }} -o jsonpath="{.spec.ports[0].nodePort}")
{{- else if contains "LoadBalancer" .Values.service.type }}
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
Watch the status with: 'kubectl get svc --namespace {{ .Release.Namespace }} -w {{ template "common.names.fullname" . }}'
export DISCOURSE_HOST=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "common.names.fullname" . }} --template "{{ "{{ range (index .status.loadBalancer.ingress 0) }}{{ . }}{{ end }}" }}")
{{- else }}
export DISCOURSE_HOST=127.0.0.1
{{- end }}
{{ include "common.utils.secret.getvalue" (dict "secret" $secretName "field" "discourse-password" "context" $) }}
{{ include "common.utils.secret.getvalue" (dict "secret" $postgresqlSecretName "field" "postgresql-password" "context" $) }}
{{- if (include "discourse.redis.auth.enabled" .) }}
{{ include "common.utils.secret.getvalue" (dict "secret" $redisSecretName "field" "redis-password" "context" $) }}
{{- end }}
## PLEASE UPDATE THE EXTERNAL DATABASE CONNECTION PARAMETERS IN THE FOLLOWING COMMAND AS NEEDED ##
helm upgrade --namespace {{ .Release.Namespace }} {{ .Release.Name }} bitnami/{{ .Chart.Name }} \
--set discourse.host=$DISCOURSE_HOST \
--set discourse.password=$DISCOURSE_PASSWORD \
--set postgresql.enabled=false \
{{- if not (empty .Values.externalDatabase.user) }}
--set externalDatabase.user={{ .Values.externalDatabase.user }} \
{{- end }}
{{- if not (empty .Values.externalDatabase.password) }}
--set externalDatabase.password=$POSTGRESQL_PASSWORD \
{{- end }}
{{- if not (empty .Values.externalDatabase.database) }}
--set externalDatabase.database={{ .Values.externalDatabase.database }}
{{- end }}
--set externalDatabase.host=YOUR_EXTERNAL_DATABASE_HOST \
{{- if .Values.global }}{{- if .Values.global.imagePullSecrets }}
--set global.imagePullSecrets={{ .Values.global.imagePullSecrets }} \
{{- end }}{{- end }}
{{- if and .Values.redis.enabled .Values.redis.auth.enabled (not .Values.redis.auth.existingSecret) (not .Values.redis.auth.password) }}
--set redis.auth.password=$REDIS_PASSWORD \
{{- end }}
--set service.type={{ .Values.service.type }}
{{- end }}
{{ if and .Values.postgresql.enabled (not .Values.postgresql.existingSecret) (eq .Values.postgresql.postgresqlPostgresPassword "bitnami") -}}
#####################################################################################
### WARNING: You did not change the default password for the PostgreSQL root user ###
#####################################################################################
{{- end }}
{{- include "common.warnings.rollingTag" .Values.image }}
{{- $passwordValidationErrors := list -}}
{{- if not .Values.discourse.existingSecret -}}
{{- $requiredDiscoursePassword := dict "valueKey" "discourse.password" "secret" $secretName "field" "discourse-password" "context" $ -}}
{{- $requiredDiscoursePasswordError := include "common.validations.values.single.empty" $requiredDiscoursePassword -}}
{{- $passwordValidationErrors = append $passwordValidationErrors $requiredDiscoursePasswordError -}}
{{- end -}}
{{- $postgresqlPasswordValidationErrors := include "common.validations.values.postgresql.passwords" (dict "secret" $postgresqlSecretName "subchart" true "context" $) -}}
{{- $passwordValidationErrors = append $passwordValidationErrors $postgresqlPasswordValidationErrors -}}
{{- if (include "discourse.redis.auth.enabled" .) }}
{{- $redisPasswordValidationErrors := include "common.validations.values.redis.passwords" (dict "secret" $redisSecretName "subchart" true "context" $) -}}
{{- $passwordValidationErrors = append $passwordValidationErrors $redisPasswordValidationErrors -}}
{{- end }}
{{- include "common.errors.upgrade.passwords.empty" (dict "validationErrors" $passwordValidationErrors "context" $) -}}

View file

@ -1,24 +1,8 @@
{{/*
Create a default fully qualified app name
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
*/}}
{{- define "postgresql.fullname" -}}
{{- printf "%s-%s" .Release.Name "postgresql" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
Create a default fully qualified app name
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
*/}}
{{- define "redis.fullname" -}}
{{- printf "%s-%s" .Release.Name "redis" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/* {{/*
Create the name of the service account to use Create the name of the service account to use
*/}} */}}
{{- define "discourse.serviceAccountName" -}} {{- define "adminFrontend.serviceAccountName" -}}
{{- if .Values.serviceAccount.create -}} {{- if .Values.serviceAccount.create -}}
{{ default (include "common.names.fullname" .) .Values.serviceAccount.name }} {{ default (include "common.names.fullname" .) .Values.serviceAccount.name }}
{{- else -}} {{- else -}}
@ -29,46 +13,46 @@ Create the name of the service account to use
{{/* {{/*
Return the proper Docker image registry secret names Return the proper Docker image registry secret names
*/}} */}}
{{- define "discourse.imagePullSecrets" -}} {{- define "adminFrontend.imagePullSecrets" -}}
{{ include "common.images.pullSecrets" (dict "images" (list .Values.image) "global" .Values.global) }} {{ include "common.images.pullSecrets" (dict "images" (list .Values.image) "global" .Values.global) }}
{{- end -}} {{- end -}}
{{/* {{/*
Return true if a secret object for Discourse should be created Return true if a secret object for Admin-frontend should be created
*/}} */}}
{{- define "discourse.createSecret" -}} {{- define "adminFrontend.createSecret" -}}
{{- if or (not .Values.discourse.existingSecret) (and (not .Values.discourse.smtp.existingSecret) .Values.discourse.smtp.password .Values.discourse.smtp.enabled) }} {{- if or (not .Values.adminFrontend.existingSecret) (and (not .Values.adminFrontend.smtp.existingSecret) .Values.adminFrontend.smtp.password .Values.adminFrontend.smtp.enabled) }}
{{- true -}} {{- true -}}
{{- end -}} {{- end -}}
{{- end -}} {{- end -}}
{{/* {{/*
Return the Discourse secret name Return the Admin-frontend secret name
*/}} */}}
{{- define "discourse.secretName" -}} {{- define "adminFrontend.secretName" -}}
{{- if .Values.discourse.existingSecret }} {{- if .Values.adminFrontend.existingSecret }}
{{- printf "%s" .Values.discourse.existingSecret -}} {{- printf "%s" .Values.adminFrontend.existingSecret -}}
{{- else -}} {{- else -}}
{{- printf "%s-discourse" (include "common.names.fullname" .) -}} {{- printf "%s-adminFrontend" (include "common.names.fullname" .) -}}
{{- end -}} {{- end -}}
{{- end -}} {{- end -}}
{{/* {{/*
Return the Discourse SMTP secret name Return the Admin-frontend SMTP secret name
*/}} */}}
{{- define "discourse.smtp.secretName" -}} {{- define "adminFrontend.smtp.secretName" -}}
{{- if .Values.discourse.smtp.existingSecret }} {{- if .Values.adminFrontend.smtp.existingSecret }}
{{- printf "%s" .Values.discourse.smtp.existingSecret -}} {{- printf "%s" .Values.adminFrontend.smtp.existingSecret -}}
{{- else -}} {{- else -}}
{{- printf "%s-discourse" (include "common.names.fullname" .) -}} {{- printf "%s-adminFrontend" (include "common.names.fullname" .) -}}
{{- end -}} {{- end -}}
{{- end -}} {{- end -}}
{{/* {{/*
Return true if Discourse SMTP uses password authentication Return true if Admin-frontend SMTP uses password authentication
*/}} */}}
{{- define "discourse.smtp.password.enabled" -}} {{- define "adminFrontend.smtp.password.enabled" -}}
{{- if and (or .Values.discourse.smtp.password .Values.discourse.smtp.existingSecret) .Values.discourse.smtp.enabled }} {{- if and (or .Values.adminFrontend.smtp.password .Values.adminFrontend.smtp.existingSecret) .Values.adminFrontend.smtp.enabled }}
{{- true -}} {{- true -}}
{{- end -}} {{- end -}}
{{- end -}} {{- end -}}
@ -77,7 +61,7 @@ Return true if Discourse SMTP uses password authentication
Get the user defined LoadBalancerIP for this release Get the user defined LoadBalancerIP for this release
Note, returns 127.0.0.1 if using ClusterIP. Note, returns 127.0.0.1 if using ClusterIP.
*/}} */}}
{{- define "discourse.serviceIP" -}} {{- define "adminFrontend.serviceIP" -}}
{{- if eq .Values.service.type "ClusterIP" -}} {{- if eq .Values.service.type "ClusterIP" -}}
127.0.0.1 127.0.0.1
{{- else -}} {{- else -}}
@ -89,161 +73,21 @@ Note, returns 127.0.0.1 if using ClusterIP.
Gets the host to be used for this application. 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 If not using ClusterIP, or if a host or LoadBalancerIP is not defined, the value will be empty
*/}} */}}
{{- define "discourse.host" -}} {{- define "adminFrontend.host" -}}
{{- $host := .Values.discourse.host | default "" -}} {{- $host := .Values.adminFrontend.host | default "" -}}
{{- default (include "discourse.serviceIP" .) $host -}} {{- default (include "adminFrontend.serviceIP" .) $host -}}
{{- end -}} {{- end -}}
{{/* {{/*
Return the proper Discourse image name Return the proper Admin-frontend image name
*/}} */}}
{{- define "discourse.image" -}} {{- define "adminFrontend.image" -}}
{{ include "common.images.image" (dict "imageRoot" .Values.image "global" .Values.global) }} {{ include "common.images.image" (dict "imageRoot" .Values.image "global" .Values.global) }}
{{- end -}} {{- end -}}
{{/* {{/*
Return the proper Storage Class Return the proper Storage Class
*/}} */}}
{{- define "discourse.storageClass" -}} {{- define "adminFrontend.storageClass" -}}
{{- include "common.storage.class" (dict "persistence" .Values.persistence "global" .Values.global) -}} {{- include "common.storage.class" (dict "persistence" .Values.persistence "global" .Values.global) -}}
{{- end -}} {{- end -}}
{{/*
Return the Postgresql hostname
*/}}
{{- define "discourse.databaseHost" -}}
{{- if .Values.postgresql.enabled }}
{{- printf "%s" (include "postgresql.fullname" .) -}}
{{- else -}}
{{- printf "%s" .Values.externalDatabase.host -}}
{{- end -}}
{{- end -}}
{{/*
Return the Postgresql port
*/}}
{{- define "discourse.databasePort" -}}
{{- if .Values.postgresql.enabled }}
{{- printf "5432" | quote -}}
{{- else -}}
{{- .Values.externalDatabase.port | quote -}}
{{- end -}}
{{- end -}}
{{/*
Return the Postgresql database name
*/}}
{{- define "discourse.databaseName" -}}
{{- if .Values.postgresql.enabled }}
{{- printf "%s" .Values.postgresql.postgresqlDatabase -}}
{{- else -}}
{{- printf "%s" .Values.externalDatabase.database -}}
{{- end -}}
{{- end -}}
{{/*
Return the Postgresql user
*/}}
{{- define "discourse.databaseUser" -}}
{{- if .Values.postgresql.enabled }}
{{- printf "%s" .Values.postgresql.postgresqlUsername -}}
{{- else -}}
{{- printf "%s" .Values.externalDatabase.user -}}
{{- end -}}
{{- end -}}
{{/*
Return true if a secret object for Postgres should be created
*/}}
{{- define "discourse.postgresql.createSecret" -}}
{{- if and (not .Values.postgresql.enabled) (not .Values.externalDatabase.existingSecret) }}
{{- true -}}
{{- end -}}
{{- end -}}
{{/*
Return the Postgresql secret name
*/}}
{{- define "discourse.postgresql.secretName" -}}
{{- if .Values.postgresql.enabled }}
{{- if .Values.postgresql.existingSecret }}
{{- printf "%s" .Values.postgresql.existingSecret -}}
{{- else -}}
{{- printf "%s" (include "postgresql.fullname" .) -}}
{{- end -}}
{{- else if .Values.externalDatabase.existingSecret }}
{{- printf "%s" .Values.externalDatabase.existingSecret -}}
{{- else -}}
{{- printf "%s-database" (include "common.names.fullname" .) -}}
{{- end -}}
{{- end -}}
{{/*
Return the Redis™ hostname
*/}}
{{- define "discourse.redisHost" -}}
{{- if .Values.redis.enabled }}
{{- printf "%s-master" (include "redis.fullname" .) -}}
{{- else -}}
{{- printf "%s" .Values.externalRedis.host -}}
{{- end -}}
{{- end -}}
{{/*
Return the Redis™ port
*/}}
{{- define "discourse.redisPort" -}}
{{- if .Values.redis.enabled }}
{{- printf "6379" | quote -}}
{{- else -}}
{{- .Values.externalRedis.port | quote -}}
{{- end -}}
{{- end -}}
{{/*
Return true if a secret object for Redis™ should be created
*/}}
{{- define "discourse.redis.createSecret" -}}
{{- if and (not .Values.redis.enabled) (not .Values.externalRedis.existingSecret) .Values.externalRedis.password }}
{{- true -}}
{{- end -}}
{{- end -}}
{{/*
Return the Redis™ secret name
*/}}
{{- define "discourse.redis.secretName" -}}
{{- if .Values.redis.enabled }}
{{- if .Values.redis.auth.existingSecret }}
{{- printf "%s" .Values.redis.auth.existingSecret -}}
{{- else -}}
{{- printf "%s" (include "redis.fullname" .) -}}
{{- end -}}
{{- else if .Values.externalRedis.existingSecret }}
{{- printf "%s" .Values.externalRedis.existingSecret -}}
{{- else -}}
{{- printf "%s-redis" (include "common.names.fullname" .) -}}
{{- end -}}
{{- end -}}
{{/*
Return the Redis™ secret key
*/}}
{{- define "discourse.redis.secretPasswordKey" -}}
{{- if and .Values.redis.enabled .Values.redis.auth.existingSecret }}
{{- required "You need to provide existingSecretPasswordKey when an existingSecret is specified in redis" .Values.redis.auth.existingSecretPasswordKey | printf "%s" }}
{{- else if and (not .Values.redis.enabled) .Values.externalRedis.existingSecret }}
{{- required "You need to provide existingSecretPasswordKey when an existingSecret is specified in redis" .Values.externalRedis.existingSecretPasswordKey | printf "%s" }}
{{- else -}}
{{- printf "redis-password" -}}
{{- end -}}
{{- end -}}
{{/*
Return whether Redis™ uses password authentication or not
*/}}
{{- define "discourse.redis.auth.enabled" -}}
{{- if or (and .Values.redis.enabled .Values.redis.auth.enabled) (and (not .Values.redis.enabled) (or .Values.externalRedis.password .Values.externalRedis.existingSecret)) }}
{{- true -}}
{{- end -}}
{{- end -}}

View file

@ -11,40 +11,22 @@ metadata:
{{- end }} {{- end }}
data: data:
{{- $port := .Values.service.port | toString }} {{- $port := .Values.service.port | toString }}
DISCOURSE_HOST: "{{ include "discourse.host" . }}" REACT_APP_API_URL: {{ .Values.adminFrontend.reactAppApiUrl }}
DISCOURSE_SKIP_INSTALL: {{ ternary "yes" "no" .Values.discourse.skipInstall | quote }} EXTEND_ESLINT: {{ .Values.adminFrontend.extendEslint }}
DISCOURSE_SITE_NAME: {{ .Values.discourse.siteName | quote }} ADMIN_FRONTEND_HOST: "{{ include "adminFrontend.host" . }}"
DISCOURSE_USERNAME: {{ .Values.discourse.username | quote }} # Probably needed in the future:
DISCOURSE_EMAIL: {{ .Values.discourse.email | quote }} # ADMIN_FRONTEND_USERNAME: {{ .Values.adminFrontend.username | quote }}
DISCOURSE_REDIS_HOST: {{ template "discourse.redisHost" . }} # ADMIN_FRONTEND_EMAIL: {{ .Values.adminFrontend.email | quote }}
DISCOURSE_REDIS_PORT_NUMBER: {{ template "discourse.redisPort" . }} # {{- if .Values.adminFrontend.smtp.enabled }}
DISCOURSE_DATABASE_HOST: {{ template "discourse.databaseHost" . }} # ADMIN_FRONTEND_SMTP_HOST: {{ .Values.adminFrontend.smtp.host | quote }}
DISCOURSE_DATABASE_PORT_NUMBER: {{ template "discourse.databasePort" . }} # ADMIN_FRONTEND_SMTP_PORT: {{ .Values.adminFrontend.smtp.port | quote }}
DISCOURSE_DATABASE_NAME: {{ template "discourse.databaseName" . }} # {{- if .Values.adminFrontend.smtp.user }}
DISCOURSE_DATABASE_USER: {{ template "discourse.databaseUser" . }} # ADMIN_FRONTEND_SMTP_USER: {{ .Values.adminFrontend.smtp.user | quote }}
{{- if .Values.discourse.smtp.enabled }} # {{- end }}
DISCOURSE_SMTP_HOST: {{ .Values.discourse.smtp.host | quote }} # {{- if .Values.adminFrontend.smtp.protocol }}
DISCOURSE_SMTP_PORT: {{ .Values.discourse.smtp.port | quote }} # ADMIN_FRONTEND_SMTP_PROTOCOL: {{ .Values.adminFrontend.smtp.protocol | quote }}
{{- if .Values.discourse.smtp.user }} # {{- end }}
DISCOURSE_SMTP_USER: {{ .Values.discourse.smtp.user | quote }} # {{- if .Values.adminFrontend.smtp.auth }}
{{- end }} # ADMIN_FRONTEND_SMTP_AUTH: {{ .Values.adminFrontend.smtp.auth | quote }}
{{- if .Values.discourse.smtp.protocol }} # {{- end }}
DISCOURSE_SMTP_PROTOCOL: {{ .Values.discourse.smtp.protocol | quote }} # {{- end }}
{{- end }}
{{- if .Values.discourse.smtp.auth }}
DISCOURSE_SMTP_AUTH: {{ .Values.discourse.smtp.auth | quote }}
{{- end }}
{{- end }}
{{- if or .Values.postgresql.enabled .Values.externalDatabase.create }}
POSTGRESQL_CLIENT_DATABASE_HOST: {{ template "discourse.databaseHost" . }}
POSTGRESQL_CLIENT_DATABASE_PORT_NUMBER: {{ template "discourse.databasePort" . }}
{{- if or .Values.postgresql.enabled (not .Values.externalDatabase.postgresqlPostgresUser) }}
POSTGRESQL_CLIENT_POSTGRES_USER: "postgres"
{{- else }}
POSTGRESQL_CLIENT_POSTGRES_USER: {{ .Values.externalDatabase.postgresqlPostgresUser | quote }}
POSTGRESQL_CLIENT_CREATE_DATABASE_USERNAME: {{ .Values.externalDatabase.user | quote }}
POSTGRESQL_CLIENT_CREATE_DATABASE_PASSWORD: {{ .Values.externalDatabase.password | quote }}
{{- end }}
POSTGRESQL_CLIENT_CREATE_DATABASE_NAME: {{ template "discourse.databaseName" . }}
POSTGRESQL_CLIENT_CREATE_DATABASE_EXTENSIONS: "hstore,pg_trgm"
{{- end }}

View file

@ -1,10 +1,10 @@
{{- if and (include "discourse.host" .) (or .Values.postgresql.enabled .Values.externalDatabase.host) -}} {{- if (include "adminFrontend.host" .) -}}
apiVersion: {{ template "common.capabilities.deployment.apiVersion" . }} apiVersion: {{ template "common.capabilities.deployment.apiVersion" . }}
kind: Deployment kind: Deployment
metadata: metadata:
name: {{ template "common.names.fullname" . }} name: {{ template "common.names.fullname" . }}
labels: {{- include "common.labels.standard" . | nindent 4 }} labels: {{- include "common.labels.standard" . | nindent 4 }}
component: discourse component: adminFrontend
{{- if .Values.commonLabels }} {{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }} {{- end }}
@ -15,19 +15,14 @@ spec:
replicas: {{ .Values.replicaCount }} replicas: {{ .Values.replicaCount }}
selector: selector:
matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }} matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }}
component: discourse component: adminFrontend
{{- if .Values.updateStrategy }} {{- if .Values.updateStrategy }}
strategy: {{- toYaml .Values.updateStrategy | nindent 4 }} strategy: {{- toYaml .Values.updateStrategy | nindent 4 }}
{{- end }} {{- end }}
template: template:
metadata: metadata:
annotations:
checksum/config: {{ include (print $.Template.BasePath "/configmaps.yaml") . | sha256sum }}
checksum/secrets-discourse: {{ include (print $.Template.BasePath "/secrets-discourse.yaml") . | sha256sum }}
checksum/secrets-database: {{ include (print $.Template.BasePath "/secrets-database.yaml") . | sha256sum }}
checksum/secrets-redis: {{ include (print $.Template.BasePath "/secrets-redis.yaml") . | sha256sum }}
labels: {{- include "common.labels.standard" . | nindent 8 }} labels: {{- include "common.labels.standard" . | nindent 8 }}
component: discourse component: adminFrontend
{{- if .Values.podLabels }} {{- if .Values.podLabels }}
{{- include "common.tplvalues.render" (dict "value" .Values.podLabels "context" $) | nindent 8 }} {{- include "common.tplvalues.render" (dict "value" .Values.podLabels "context" $) | nindent 8 }}
{{- end }} {{- end }}
@ -35,7 +30,7 @@ spec:
annotations: {{- include "common.tplvalues.render" (dict "value" .Values.podAnnotations "context" $) | nindent 8 }} annotations: {{- include "common.tplvalues.render" (dict "value" .Values.podAnnotations "context" $) | nindent 8 }}
{{- end }} {{- end }}
spec: spec:
{{- include "discourse.imagePullSecrets" . | nindent 6 }} {{- include "adminFrontend.imagePullSecrets" . | nindent 6 }}
{{- if .Values.hostAliases }} {{- if .Values.hostAliases }}
hostAliases: {{- include "common.tplvalues.render" (dict "value" .Values.hostAliases "context" $) | nindent 8 }} hostAliases: {{- include "common.tplvalues.render" (dict "value" .Values.hostAliases "context" $) | nindent 8 }}
{{- end }} {{- end }}
@ -53,7 +48,7 @@ spec:
{{- if .Values.tolerations }} {{- if .Values.tolerations }}
tolerations: {{- include "common.tplvalues.render" (dict "value" .Values.tolerations "context" $) | nindent 8 }} tolerations: {{- include "common.tplvalues.render" (dict "value" .Values.tolerations "context" $) | nindent 8 }}
{{- end }} {{- end }}
serviceAccountName: {{ include "discourse.serviceAccountName" . }} serviceAccountName: {{ include "adminFrontend.serviceAccountName" . }}
securityContext: {{- toYaml .Values.podSecurityContext | nindent 8 }} securityContext: {{- toYaml .Values.podSecurityContext | nindent 8 }}
initContainers: initContainers:
{{- if .Values.initContainers }} {{- if .Values.initContainers }}
@ -61,214 +56,105 @@ spec:
{{- end }} {{- end }}
{{- if and .Values.volumePermissions.enabled .Values.persistence.enabled }} {{- if and .Values.volumePermissions.enabled .Values.persistence.enabled }}
- name: volume-permissions - name: volume-permissions
image: {{ include "discourse.image" . }} image: {{ include "adminFrontend.image" . }}
imagePullPolicy: {{ .Values.volumePermissions.image.pullPolicy | quote }} imagePullPolicy: {{ .Values.volumePermissions.image.pullPolicy | quote }}
command: command:
- sh - sh
- -c - -c
- | - |
mkdir -p "/bitnami/discourse" mkdir -p "/bitnami/adminFrontend"
chown -R "discourse:root" "/bitnami/discourse" chown -R "adminFrontend:root" "/bitnami/adminFrontend"
securityContext: securityContext:
runAsUser: 0 runAsUser: 0
{{- if .Values.volumePermissions.resources }} {{- if .Values.volumePermissions.resources }}
resources: {{- toYaml .Values.volumePermissions.resources | nindent 12 }} resources: {{- toYaml .Values.volumePermissions.resources | nindent 12 }}
{{- end }} {{- end }}
volumeMounts: volumeMounts:
- name: discourse-data - name: adminFrontend-data
mountPath: /bitnami/discourse mountPath: /bitnami/adminFrontend
{{- end }} {{- end }}
containers: containers:
- name: discourse - name: adminFrontend
securityContext: {{- toYaml .Values.discourse.containerSecurityContext | nindent 12 }} securityContext: {{- toYaml .Values.adminFrontend.containerSecurityContext | nindent 12 }}
image: {{ template "discourse.image" . }} image: {{ template "adminFrontend.image" . }}
imagePullPolicy: {{ .Values.image.pullPolicy | quote }} imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
{{- if .Values.discourse.command }} {{- if .Values.adminFrontend.command }}
command: {{- include "common.tplvalues.render" (dict "value" .Values.discourse.command "context" $) | nindent 12 }} command: {{- include "common.tplvalues.render" (dict "value" .Values.adminFrontend.command "context" $) | nindent 12 }}
{{- end }} {{- end }}
{{- if .Values.discourse.args }} {{- if .Values.adminFrontend.args }}
args: {{- include "common.tplvalues.render" (dict "value" .Values.discourse.args "context" $) | nindent 12 }} args: {{- include "common.tplvalues.render" (dict "value" .Values.adminFrontend.args "context" $) | nindent 12 }}
{{- end }} {{- end }}
env: env:
- name: BITNAMI_DEBUG - name: ADMIN_FRONTEND_PASSWORD
value: {{ ternary "true" "false" .Values.image.debug | quote }}
- name: DISCOURSE_PASSWORD
valueFrom: valueFrom:
secretKeyRef: secretKeyRef:
name: {{ include "discourse.secretName" . }} name: {{ include "adminFrontend.secretName" . }}
key: discourse-password key: adminFrontend-password
- name: DISCOURSE_DATABASE_PASSWORD {{- if (include "adminFrontend.smtp.password.enabled" .) }}
- name: ADMIN_FRONTEND_SMTP_PASSWORD
valueFrom: valueFrom:
secretKeyRef: secretKeyRef:
name: {{ include "discourse.postgresql.secretName" . }} name: {{ include "adminFrontend.smtp.secretName" . }}
key: postgresql-password
{{- if or .Values.postgresql.enabled .Values.externalDatabase.create }}
- name: POSTGRESQL_CLIENT_POSTGRES_PASSWORD
valueFrom:
secretKeyRef:
name: {{ include "discourse.postgresql.secretName" . }}
key: postgresql-postgres-password
{{- end }}
{{- if (include "discourse.redis.auth.enabled" .) }}
- name: DISCOURSE_REDIS_PASSWORD
valueFrom:
secretKeyRef:
name: {{ include "discourse.redis.secretName" . }}
key: {{ include "discourse.redis.secretPasswordKey" . }}
{{- end }}
{{- if (include "discourse.smtp.password.enabled" .) }}
- name: DISCOURSE_SMTP_PASSWORD
valueFrom:
secretKeyRef:
name: {{ include "discourse.smtp.secretName" . }}
key: smtp-password key: smtp-password
{{- end }} {{- end }}
{{- if .Values.discourse.extraEnvVars }} {{- if .Values.adminFrontend.extraEnvVars }}
{{- include "common.tplvalues.render" (dict "value" .Values.discourse.extraEnvVars "context" $) | nindent 12 }} {{- include "common.tplvalues.render" (dict "value" .Values.adminFrontend.extraEnvVars "context" $) | nindent 12 }}
{{- end }} {{- end }}
envFrom: envFrom:
- configMapRef: - configMapRef:
name: {{ include "common.names.fullname" . }} name: {{ include "common.names.fullname" . }}
{{- if .Values.discourse.extraEnvVarsCM }} {{- if .Values.adminFrontend.extraEnvVarsCM }}
- configMapRef: - configMapRef:
name: {{ .Values.discourse.extraEnvVarsCM }} name: {{ .Values.adminFrontend.extraEnvVarsCM }}
{{- end }} {{- end }}
{{- if .Values.discourse.extraEnvVarsSecret }} {{- if .Values.adminFrontend.extraEnvVarsSecret }}
- secretRef: - secretRef:
name: {{ .Values.discourse.extraEnvVarsSecret }} name: {{ .Values.adminFrontend.extraEnvVarsSecret }}
{{- end }} {{- end }}
ports: ports:
- name: http - name: http
containerPort: 3000 containerPort: 3000
protocol: TCP protocol: TCP
{{- if .Values.discourse.livenessProbe.enabled }} {{- if .Values.adminFrontend.livenessProbe.enabled }}
livenessProbe: livenessProbe:
httpGet: httpGet:
path: /srv/status path: /srv/status
port: http port: http
initialDelaySeconds: {{ .Values.discourse.livenessProbe.initialDelaySeconds }} initialDelaySeconds: {{ .Values.adminFrontend.livenessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.discourse.livenessProbe.periodSeconds }} periodSeconds: {{ .Values.adminFrontend.livenessProbe.periodSeconds }}
timeoutSeconds: {{ .Values.discourse.livenessProbe.timeoutSeconds }} timeoutSeconds: {{ .Values.adminFrontend.livenessProbe.timeoutSeconds }}
successThreshold: {{ .Values.discourse.livenessProbe.successThreshold }} successThreshold: {{ .Values.adminFrontend.livenessProbe.successThreshold }}
failureThreshold: {{ .Values.discourse.livenessProbe.failureThreshold }} failureThreshold: {{ .Values.adminFrontend.livenessProbe.failureThreshold }}
{{- else if .Values.discourse.customLivenessProbe }} {{- else if .Values.adminFrontend.customLivenessProbe }}
livenessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.discourse.customLivenessProbe "context" $) | nindent 12 }} livenessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.adminFrontend.customLivenessProbe "context" $) | nindent 12 }}
{{- end }} {{- end }}
{{- if .Values.discourse.readinessProbe.enabled }} {{- if .Values.adminFrontend.readinessProbe.enabled }}
readinessProbe: readinessProbe:
httpGet: httpGet:
path: /srv/status path: /srv/status
port: http port: http
initialDelaySeconds: {{ .Values.discourse.readinessProbe.initialDelaySeconds }} initialDelaySeconds: {{ .Values.adminFrontend.readinessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.discourse.readinessProbe.periodSeconds }} periodSeconds: {{ .Values.adminFrontend.readinessProbe.periodSeconds }}
timeoutSeconds: {{ .Values.discourse.readinessProbe.timeoutSeconds }} timeoutSeconds: {{ .Values.adminFrontend.readinessProbe.timeoutSeconds }}
successThreshold: {{ .Values.discourse.readinessProbe.successThreshold }} successThreshold: {{ .Values.adminFrontend.readinessProbe.successThreshold }}
failureThreshold: {{ .Values.discourse.readinessProbe.failureThreshold }} failureThreshold: {{ .Values.adminFrontend.readinessProbe.failureThreshold }}
{{- else if .Values.discourse.customReadinessProbe }} {{- else if .Values.adminFrontend.customReadinessProbe }}
readinessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.discourse.customReadinessProbe "context" $) | nindent 12 }} readinessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.adminFrontend.customReadinessProbe "context" $) | nindent 12 }}
{{- end }} {{- end }}
volumeMounts: volumeMounts:
- name: discourse-data - name: adminFrontend-data
mountPath: /bitnami/discourse mountPath: /bitnami/adminFrontend
subPath: discourse subPath: adminFrontend
{{- if .Values.discourse.extraVolumeMounts }} {{- if .Values.adminFrontend.extraVolumeMounts }}
{{- include "common.tplvalues.render" (dict "value" .Values.discourse.extraVolumeMounts "context" $) | nindent 12 }} {{- include "common.tplvalues.render" (dict "value" .Values.adminFrontend.extraVolumeMounts "context" $) | nindent 12 }}
{{- end }} {{- end }}
{{- if .Values.discourse.resources }} {{- if .Values.adminFrontend.resources }}
resources: {{- toYaml .Values.discourse.resources | nindent 12 }} resources: {{- toYaml .Values.adminFrontend.resources | nindent 12 }}
{{- end }}
- name: sidekiq
securityContext: {{- toYaml .Values.sidekiq.containerSecurityContext | nindent 12 }}
image: {{ template "discourse.image" . }}
imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
command: {{- include "common.tplvalues.render" (dict "value" .Values.sidekiq.command "context" $) | nindent 12 }}
args: {{- include "common.tplvalues.render" (dict "value" .Values.sidekiq.args "context" $) | nindent 12 }}
env:
- name: BITNAMI_DEBUG
value: {{ ternary "true" "false" .Values.image.debug | quote }}
- name: DISCOURSE_PASSWORD
valueFrom:
secretKeyRef:
name: {{ include "discourse.secretName" . }}
key: discourse-password
- name: DISCOURSE_POSTGRESQL_PASSWORD
valueFrom:
secretKeyRef:
name: {{ include "discourse.postgresql.secretName" . }}
key: postgresql-password
{{- if (include "discourse.redis.auth.enabled" .) }}
- name: REDIS_PASSWORD
valueFrom:
secretKeyRef:
name: {{ include "discourse.redis.secretName" . }}
key: {{ include "discourse.redis.secretPasswordKey" . }}
{{- end }}
{{- if (include "discourse.smtp.password.enabled" .) }}
- name: DISCOURSE_SMTP_PASSWORD
valueFrom:
secretKeyRef:
name: {{ include "discourse.smtp.secretName" . }}
key: smtp-password
{{- end }}
{{- if .Values.sidekiq.extraEnvVars }}
{{- include "common.tplvalues.render" (dict "value" .Values.sidekiq.extraEnvVars "context" $) | nindent 12 }}
{{- end }}
envFrom:
- configMapRef:
name: {{ include "common.names.fullname" . }}
{{- if .Values.sidekiq.extraEnvVarsCM }}
- configMapRef:
name: {{ .Values.sidekiq.extraEnvVarsCM }}
{{- end }}
{{- if .Values.sidekiq.extraEnvVarsSecret }}
- secretRef:
name: {{ .Values.sidekiq.extraEnvVarsSecret }}
{{- end }}
{{- if .Values.sidekiq.livenessProbe.enabled }}
livenessProbe:
exec:
command: ["/bin/sh", "-c", "pgrep -f ^sidekiq"]
initialDelaySeconds: {{ .Values.sidekiq.livenessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.sidekiq.livenessProbe.periodSeconds }}
timeoutSeconds: {{ .Values.sidekiq.livenessProbe.timeoutSeconds }}
successThreshold: {{ .Values.sidekiq.livenessProbe.successThreshold }}
failureThreshold: {{ .Values.sidekiq.livenessProbe.failureThreshold }}
{{- else if .Values.sidekiq.customLivenessProbe }}
livenessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.sidekiq.customLivenessProbe "context" $) | nindent 12 }}
{{- end }}
{{- if .Values.sidekiq.readinessProbe.enabled }}
readinessProbe:
exec:
command: ["/bin/sh", "-c", "pgrep -f ^sidekiq"]
initialDelaySeconds: {{ .Values.sidekiq.readinessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.sidekiq.readinessProbe.periodSeconds }}
timeoutSeconds: {{ .Values.sidekiq.readinessProbe.timeoutSeconds }}
successThreshold: {{ .Values.sidekiq.readinessProbe.successThreshold }}
failureThreshold: {{ .Values.sidekiq.readinessProbe.failureThreshold }}
{{- else if .Values.sidekiq.customReadinessProbe }}
readinessProbe: {{- include "common.tplvalues.render" (dict "value" .Values.sidekiq.customReadinessProbe "context" $) | nindent 12 }}
{{- end }}
volumeMounts:
- name: discourse-data
mountPath: /bitnami/discourse
subPath: discourse
{{- if .Values.sidekiq.extraVolumeMounts }}
{{- include "common.tplvalues.render" (dict "value" .Values.sidekiq.extraVolumeMounts "context" $) | nindent 12 }}
{{- end }}
{{- if .Values.sidekiq.resources }}
resources: {{- toYaml .Values.sidekiq.resources | nindent 12 }}
{{- end }} {{- end }}
{{- if .Values.sidecars }} {{- if .Values.sidecars }}
{{- include "common.tplvalues.render" (dict "value" .Values.sidecars "context" $) | nindent 8 }} {{- include "common.tplvalues.render" (dict "value" .Values.sidecars "context" $) | nindent 8 }}
{{- end }} {{- end }}
volumes: volumes:
- name: discourse-data
{{- if .Values.persistence.enabled }}
persistentVolumeClaim:
claimName: {{ .Values.persistence.existingClaim | default (include "common.names.fullname" .) }}
{{- else }}
emptyDir: {}
{{ end }}
{{- if .Values.extraVolumes }} {{- if .Values.extraVolumes }}
{{- include "common.tplvalues.render" (dict "value" .Values.extraVolumes "context" $) | nindent 8 }} {{- include "common.tplvalues.render" (dict "value" .Values.extraVolumes "context" $) | nindent 8 }}
{{- end }} {{- end }}

View file

@ -1,4 +1,5 @@
{{- if and (include "discourse.host" .) .Values.persistence.enabled (not .Values.persistence.existingClaim) }} # Disabled by default because the current admin panel does not need persistence
{{- if and (include "adminFrontend.host" .) .Values.persistence.enabled (not .Values.persistence.existingClaim) }}
kind: PersistentVolumeClaim kind: PersistentVolumeClaim
apiVersion: v1 apiVersion: v1
metadata: metadata:
@ -16,7 +17,7 @@ spec:
resources: resources:
requests: requests:
storage: {{ .Values.persistence.size | quote }} storage: {{ .Values.persistence.size | quote }}
{{ include "discourse.storageClass" . }} {{ include "adminFrontend.storageClass" . }}
{{- if .Values.persistence.selector }} {{- if .Values.persistence.selector }}
selector: {{- include "common.tplvalues.render" (dict "value" .Values.persistence.selector "context" $) | nindent 4 }} selector: {{- include "common.tplvalues.render" (dict "value" .Values.persistence.selector "context" $) | nindent 4 }}
{{- end -}} {{- end -}}

View file

@ -1,17 +0,0 @@
{{- if (include "discourse.postgresql.createSecret" .) }}
apiVersion: v1
kind: Secret
metadata:
name: {{ template "common.names.fullname" . }}-database
labels: {{- include "common.labels.standard" . | nindent 4 }}
{{- 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 }}
type: Opaque
data:
postgresql-password: {{ .Values.externalDatabase.password | b64enc | quote }}
postgresql-postgres-password: {{ .Values.externalDatabase.postgresqlPostgresPassword | b64enc | quote }}
{{- end }}

View file

@ -1,8 +1,8 @@
{{- if (include "discourse.createSecret" .) }} {{- if (include "adminFrontend.createSecret" .) }}
apiVersion: v1 apiVersion: v1
kind: Secret kind: Secret
metadata: metadata:
name: {{ template "common.names.fullname" . }}-discourse name: {{ template "common.names.fullname" . }}-adminFrontend
labels: {{- include "common.labels.standard" . | nindent 4 }} labels: {{- include "common.labels.standard" . | nindent 4 }}
{{- if .Values.commonLabels }} {{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
@ -12,12 +12,12 @@ metadata:
{{- end }} {{- end }}
type: Opaque type: Opaque
data: data:
{{- if and (.Values.discourse.password) (not .Values.discourse.existingSecret) }} {{- if and (.Values.adminFrontend.password) (not .Values.adminFrontend.existingSecret) }}
discourse-password: {{ .Values.discourse.password | b64enc | quote }} adminFrontend-password: {{ .Values.adminFrontend.password | b64enc | quote }}
{{- else if not .Values.discourse.existingSecret }} {{- else if not .Values.adminFrontend.existingSecret }}
discourse-password: {{ randAlphaNum 10 | b64enc | quote }} adminFrontend-password: {{ randAlphaNum 10 | b64enc | quote }}
{{- end }} {{- end }}
{{- if and (.Values.discourse.smtp.password) (.Values.discourse.smtp.enabled) (not .Values.discourse.smtp.existingSecret) }} {{- if and (.Values.adminFrontend.smtp.password) (.Values.adminFrontend.smtp.enabled) (not .Values.adminFrontend.smtp.existingSecret) }}
smtp-password: {{ .Values.discourse.smtp.password | b64enc | quote }} smtp-password: {{ .Values.adminFrontend.smtp.password | b64enc | quote }}
{{- end }} {{- end }}
{{- end }} {{- end }}

View file

@ -1,16 +0,0 @@
{{- if (include "discourse.redis.createSecret" .) }}
apiVersion: v1
kind: Secret
metadata:
name: {{ template "common.names.fullname" . }}-redis
labels: {{- include "common.labels.standard" . | nindent 4 }}
{{- 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 }}
type: Opaque
data:
redis-password: {{ .Values.externalRedis.password | b64enc | quote }}
{{- end }}

View file

@ -2,7 +2,7 @@
apiVersion: v1 apiVersion: v1
kind: ServiceAccount kind: ServiceAccount
metadata: metadata:
name: {{ include "discourse.serviceAccountName" . }} name: {{ include "adminFrontend.serviceAccountName" . }}
labels: {{- include "common.labels.standard" . | nindent 4 }} labels: {{- include "common.labels.standard" . | nindent 4 }}
{{- if .Values.commonLabels }} {{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}