postgres-operator: bump to v1.9.0, helm chart v1.9.0
postgres-operator-ui: bump to v1.9.0, helm chart v1.9.0 astodon: bump to v4.1.2, helm chart v4.0.0
This commit is contained in:
@ -51,6 +51,17 @@ app.kubernetes.io/name: {{ include "mastodon.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Rolling pod annotations
|
||||
*/}}
|
||||
{{- define "mastodon.rollingPodAnnotations" -}}
|
||||
{{- if .Values.revisionPodAnnotation }}
|
||||
rollme: {{ .Release.Revision | quote }}
|
||||
{{- end }}
|
||||
checksum/config-secrets: {{ include ( print $.Template.BasePath "/secrets.yaml" ) . | sha256sum | quote }}
|
||||
checksum/config-configmap: {{ include ( print $.Template.BasePath "/configmap-env.yaml" ) . | sha256sum | quote }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Create the name of the service account to use
|
||||
*/}}
|
||||
@ -77,3 +88,76 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this
|
||||
{{- define "mastodon.postgresql.fullname" -}}
|
||||
{{- printf "%s-%s" .Release.Name "postgresql" | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Get the mastodon secret.
|
||||
*/}}
|
||||
{{- define "mastodon.secretName" -}}
|
||||
{{- if .Values.mastodon.secrets.existingSecret }}
|
||||
{{- printf "%s" (tpl .Values.mastodon.secrets.existingSecret $) -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s" (include "common.names.fullname" .) -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Get the smtp secret.
|
||||
*/}}
|
||||
{{- define "mastodon.smtp.secretName" -}}
|
||||
{{- if .Values.mastodon.smtp.existingSecret }}
|
||||
{{- printf "%s" (tpl .Values.mastodon.smtp.existingSecret $) -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s-smtp" (include "common.names.fullname" .) -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Get the postgresql secret.
|
||||
*/}}
|
||||
{{- define "mastodon.postgresql.secretName" -}}
|
||||
{{- if (and (or .Values.postgresql.enabled .Values.postgresql.postgresqlHostname) .Values.postgresql.auth.existingSecret) }}
|
||||
{{- printf "%s" (tpl .Values.postgresql.auth.existingSecret $) -}}
|
||||
{{- else if .Values.postgresql.enabled -}}
|
||||
{{- printf "%s-postgresql" (tpl .Release.Name $) -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s" (include "common.names.fullname" .) -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Get the redis secret.
|
||||
*/}}
|
||||
{{- define "mastodon.redis.secretName" -}}
|
||||
{{- if .Values.redis.auth.existingSecret }}
|
||||
{{- printf "%s" (tpl .Values.redis.auth.existingSecret $) -}}
|
||||
{{- else if .Values.redis.existingSecret }}
|
||||
{{- printf "%s" (tpl .Values.redis.existingSecret $) -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s-redis" (tpl .Release.Name $) -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return true if a mastodon secret object should be created
|
||||
*/}}
|
||||
{{- define "mastodon.createSecret" -}}
|
||||
{{- if (or
|
||||
(and .Values.mastodon.s3.enabled (not .Values.mastodon.s3.existingSecret))
|
||||
(not .Values.mastodon.secrets.existingSecret )
|
||||
(and (not .Values.postgresql.enabled) (not .Values.postgresql.auth.existingSecret))
|
||||
) -}}
|
||||
{{- true -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Find highest number of needed database connections to set DB_POOL variable
|
||||
*/}}
|
||||
{{- define "mastodon.maxDbPool" -}}
|
||||
{{/* Default MAX_THREADS for Puma is 5 */}}
|
||||
{{- $poolSize := 5 }}
|
||||
{{- range .Values.mastodon.sidekiq.workers }}
|
||||
{{- $poolSize = max $poolSize .concurrency }}
|
||||
{{- end }}
|
||||
{{- $poolSize | quote }}
|
||||
{{- end }}
|
||||
|
Reference in New Issue
Block a user