3
0
mirror of https://github.com/mastodon/chart synced 2025-05-18 04:53:21 +00:00
This commit is contained in:
jessebot 2023-07-14 13:52:28 +02:00
parent 423f380f07
commit cf492363d6
11 changed files with 25 additions and 199 deletions

View File

@ -1,3 +1,6 @@
nameOverride: ""
fullnameOverride: ""
# Chart values used for testing the Helm chart. # Chart values used for testing the Helm chart.
# #
image: image:
@ -12,8 +15,8 @@ image:
pullPolicy: IfNotPresent pullPolicy: IfNotPresent
mastodon: mastodon:
# -- create an initial administrator user; the password is autogenerated and will # -- create an initial administrator user; the password is autogenerated and
# have to be reset # will have to be reset
createAdmin: createAdmin:
# @ignored # @ignored
enabled: false enabled: false
@ -21,7 +24,7 @@ mastodon:
username: not_gargron username: not_gargron
# @ignored # @ignored
email: not@example.commit email: not@example.commit
# existingSecret: mastodon-admin existingSecret: ""
# secretKeys: # secretKeys:
# usernameKey: username # usernameKey: username
# passwordKey: password # passwordKey: password
@ -93,11 +96,6 @@ mastodon:
# with keys SECRET_KEY_BASE and OTP_SECRET and # with keys SECRET_KEY_BASE and OTP_SECRET and
# VAPID_PRIVATE_KEY and VAPID_PUBLIC_KEY # VAPID_PRIVATE_KEY and VAPID_PUBLIC_KEY
# existingSecret: "" # existingSecret: ""
# secretKeys:
# vapidPrivateKey: VAPID_PRIVATE_KEY
# vapidPublicKey: VAPID_PUBLIC_KEY
# secretKeyBase: SECRET_KEY_BASE
# otpSecret: OTP_SECRET
sidekiq: sidekiq:
# -- Pod security context for all Sidekiq Pods, overwrites .Values.podSecurityContext # -- Pod security context for all Sidekiq Pods, overwrites .Values.podSecurityContext
@ -167,7 +165,7 @@ mastodon:
password: password:
# -- Instead of defining login/password above, you can specify the name of an existing secret here. Login and # -- Instead of defining login/password above, you can specify the name of an existing secret here. Login and
# password must be located in keys named `login` and `password` respectively. # password must be located in keys named `login` and `password` respectively.
existingSecret: existingSecret: ""
streaming: streaming:
port: 4000 port: 4000
# -- this should be set manually since os.cpus() returns the number of CPUs on # -- this should be set manually since os.cpus() returns the number of CPUs on

View File

@ -58,7 +58,7 @@ Rolling pod annotations
{{- if .Values.revisionPodAnnotation }} {{- if .Values.revisionPodAnnotation }}
rollme: {{ .Release.Revision | quote }} rollme: {{ .Release.Revision | quote }}
{{- end }} {{- end }}
checksum/config-secrets: {{ include ( print $.Template.BasePath "/secret-mastodon.yaml" ) . | sha256sum | quote }} checksum/config-secrets: {{ include ( print $.Template.BasePath "/secret.yaml" ) . | sha256sum | quote }}
checksum/config-configmap: {{ include ( print $.Template.BasePath "/configmap-env.yaml" ) . | sha256sum | quote }} checksum/config-configmap: {{ include ( print $.Template.BasePath "/configmap-env.yaml" ) . | sha256sum | quote }}
{{- end }} {{- end }}
@ -89,16 +89,9 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this
{{- printf "%s-%s" .Release.Name "postgresql" | trunc 63 | trimSuffix "-" -}} {{- printf "%s-%s" .Release.Name "postgresql" | trunc 63 | trimSuffix "-" -}}
{{- end -}} {{- end -}}
{{/*
Get the mastodon secret.
*/}}
{{- define "mastodon.secretName" -}} {{- define "mastodon.secretName" -}}
{{- if .Values.mastodon.secrets.existingSecret }} {{- default "secret" .Values.mastodon.secrets.existingSecret }}
{{- printf "%s" (tpl .Values.mastodon.secrets.existingSecret $) -}} {{- end }}
{{- else -}}
{{- printf "%s" (include "common.names.fullname" .) -}}
{{- end -}}
{{- end -}}
{{/* {{/*
Get the smtp secret. Get the smtp secret.

View File

@ -52,33 +52,9 @@ spec:
envFrom: envFrom:
- configMapRef: - configMapRef:
name: {{ include "mastodon.fullname" . }}-env name: {{ include "mastodon.fullname" . }}-env
{{- if not .Values.mastodon.secrets.existingSecret }}
- secretRef: - secretRef:
name: {{ template "mastodon.secretName" . }} name: {{ template "mastodon.secretName" . }}
{{- end }}
env: env:
{{- if .Values.mastodon.secrets.existingSecret }}
- name: "SECRET_KEY_BASE"
valueFrom:
secretKeyRef:
name: {{ .Values.mastodon.secrets.existingSecret }}
key: {{ .Values.mastodon.secrets.secretKeys.secretKeyBase }}
- name: "OTP_SECRET"
valueFrom:
secretKeyRef:
name: {{ .Values.mastodon.secrets.existingSecret }}
key: {{ .Values.mastodon.secrets.secretKeys.optSecret }}
- name: "VAPID_PRIVATE_KEY"
valueFrom:
secretKeyRef:
name: {{ .Values.mastodon.secrets.existingSecret }}
key: {{ .Values.mastodon.secrets.secretKeys.vapidPrivateKey }}
- name: "VAPID_PUBLIC_KEY"
valueFrom:
secretKeyRef:
name: {{ .Values.mastodon.secrets.existingSecret }}
key: {{ .Values.mastodon.secrets.secretKeys.vapidPublicKey }}
{{- end }}
- name: "DB_PASS" - name: "DB_PASS"
valueFrom: valueFrom:
secretKeyRef: secretKeyRef:

View File

@ -82,33 +82,9 @@ spec:
envFrom: envFrom:
- configMapRef: - configMapRef:
name: {{ include "mastodon.fullname" $context }}-env name: {{ include "mastodon.fullname" $context }}-env
{{- if not .Values.mastodon.secrets.existingSecret }}
- secretRef: - secretRef:
name: {{ template "mastodon.secretName" . }} name: {{ template "mastodon.secretName" . }}
{{- end }}
env: env:
{{- if .Values.mastodon.secrets.existingSecret }}
- name: "SECRET_KEY_BASE"
valueFrom:
secretKeyRef:
name: {{ .Values.mastodon.secrets.existingSecret }}
key: {{ .Values.mastodon.secrets.secretKeys.secretKeyBase }}
- name: "OTP_SECRET"
valueFrom:
secretKeyRef:
name: {{ .Values.mastodon.secrets.existingSecret }}
key: {{ .Values.mastodon.secrets.secretKeys.optSecret }}
- name: "VAPID_PRIVATE_KEY"
valueFrom:
secretKeyRef:
name: {{ .Values.mastodon.secrets.existingSecret }}
key: {{ .Values.mastodon.secrets.secretKeys.vapidPrivateKey }}
- name: "VAPID_PUBLIC_KEY"
valueFrom:
secretKeyRef:
name: {{ .Values.mastodon.secrets.existingSecret }}
key: {{ .Values.mastodon.secrets.secretKeys.vapidPublicKey }}
{{- end }}
- name: "DB_PASS" - name: "DB_PASS"
valueFrom: valueFrom:
secretKeyRef: secretKeyRef:

View File

@ -63,33 +63,9 @@ spec:
envFrom: envFrom:
- configMapRef: - configMapRef:
name: {{ include "mastodon.fullname" . }}-env name: {{ include "mastodon.fullname" . }}-env
{{- if not .Values.mastodon.secrets.existingSecret }}
- secretRef: - secretRef:
name: {{ template "mastodon.secretName" . }} name: {{ template "mastodon.secretName" . }}
{{- end }}
env: env:
{{- if .Values.mastodon.secrets.existingSecret }}
- name: "SECRET_KEY_BASE"
valueFrom:
secretKeyRef:
name: {{ .Values.mastodon.secrets.existingSecret }}
key: {{ .Values.mastodon.secrets.secretKeys.secretKeyBase }}
- name: "OTP_SECRET"
valueFrom:
secretKeyRef:
name: {{ .Values.mastodon.secrets.existingSecret }}
key: {{ .Values.mastodon.secrets.secretKeys.optSecret }}
- name: "VAPID_PRIVATE_KEY"
valueFrom:
secretKeyRef:
name: {{ .Values.mastodon.secrets.existingSecret }}
key: {{ .Values.mastodon.secrets.secretKeys.vapidPrivateKey }}
- name: "VAPID_PUBLIC_KEY"
valueFrom:
secretKeyRef:
name: {{ .Values.mastodon.secrets.existingSecret }}
key: {{ .Values.mastodon.secrets.secretKeys.vapidPublicKey }}
{{- end }}
- name: "DB_PASS" - name: "DB_PASS"
valueFrom: valueFrom:
secretKeyRef: secretKeyRef:

View File

@ -53,33 +53,9 @@ spec:
envFrom: envFrom:
- configMapRef: - configMapRef:
name: {{ include "mastodon.fullname" . }}-env name: {{ include "mastodon.fullname" . }}-env
{{- if not .Values.mastodon.secrets.existingSecret }}
- secretRef: - secretRef:
name: {{ template "mastodon.secretName" . }} name: {{ template "mastodon.secretName" . }}
{{- end }}
env: env:
{{- if .Values.mastodon.secrets.existingSecret }}
- name: "SECRET_KEY_BASE"
valueFrom:
secretKeyRef:
name: {{ .Values.mastodon.secrets.existingSecret }}
key: {{ .Values.mastodon.secrets.secretKeys.secretKeyBase }}
- name: "OTP_SECRET"
valueFrom:
secretKeyRef:
name: {{ .Values.mastodon.secrets.existingSecret }}
key: {{ .Values.mastodon.secrets.secretKeys.optSecret }}
- name: "VAPID_PRIVATE_KEY"
valueFrom:
secretKeyRef:
name: {{ .Values.mastodon.secrets.existingSecret }}
key: {{ .Values.mastodon.secrets.secretKeys.vapidPrivateKey }}
- name: "VAPID_PUBLIC_KEY"
valueFrom:
secretKeyRef:
name: {{ .Values.mastodon.secrets.existingSecret }}
key: {{ .Values.mastodon.secrets.secretKeys.vapidPublicKey }}
{{- end }}
- name: "DB_PASS" - name: "DB_PASS"
valueFrom: valueFrom:
secretKeyRef: secretKeyRef:

View File

@ -54,33 +54,9 @@ spec:
envFrom: envFrom:
- configMapRef: - configMapRef:
name: {{ include "mastodon.fullname" . }}-env name: {{ include "mastodon.fullname" . }}-env
{{- if not .Values.mastodon.secrets.existingSecret }}
- secretRef: - secretRef:
name: {{ template "mastodon.secretName" . }} name: {{ template "mastodon.secretName" . }}
{{- end }}
env: env:
{{- if .Values.mastodon.secrets.existingSecret }}
- name: "SECRET_KEY_BASE"
valueFrom:
secretKeyRef:
name: {{ .Values.mastodon.secrets.existingSecret }}
key: {{ .Values.mastodon.secrets.secretKeys.secretKeyBase }}
- name: "OTP_SECRET"
valueFrom:
secretKeyRef:
name: {{ .Values.mastodon.secrets.existingSecret }}
key: {{ .Values.mastodon.secrets.secretKeys.optSecret }}
- name: "VAPID_PRIVATE_KEY"
valueFrom:
secretKeyRef:
name: {{ .Values.mastodon.secrets.existingSecret }}
key: {{ .Values.mastodon.secrets.secretKeys.vapidPrivateKey }}
- name: "VAPID_PUBLIC_KEY"
valueFrom:
secretKeyRef:
name: {{ .Values.mastodon.secrets.existingSecret }}
key: {{ .Values.mastodon.secrets.secretKeys.vapidPublicKey }}
{{- end }}
- name: "DB_PASS" - name: "DB_PASS"
valueFrom: valueFrom:
secretKeyRef: secretKeyRef:

View File

@ -53,33 +53,9 @@ spec:
envFrom: envFrom:
- configMapRef: - configMapRef:
name: {{ include "mastodon.fullname" . }}-env name: {{ include "mastodon.fullname" . }}-env
{{- if not .Values.mastodon.secrets.existingSecret }}
- secretRef: - secretRef:
name: {{ template "mastodon.secretName" . }} name: {{ template "mastodon.secretName" . }}
{{- end }}
env: env:
{{- if .Values.mastodon.secrets.existingSecret }}
- name: "SECRET_KEY_BASE"
valueFrom:
secretKeyRef:
name: {{ .Values.mastodon.secrets.existingSecret }}
key: {{ .Values.mastodon.secrets.secretKeys.secretKeyBase }}
- name: "OTP_SECRET"
valueFrom:
secretKeyRef:
name: {{ .Values.mastodon.secrets.existingSecret }}
key: {{ .Values.mastodon.secrets.secretKeys.optSecret }}
- name: "VAPID_PRIVATE_KEY"
valueFrom:
secretKeyRef:
name: {{ .Values.mastodon.secrets.existingSecret }}
key: {{ .Values.mastodon.secrets.secretKeys.vapidPrivateKey }}
- name: "VAPID_PUBLIC_KEY"
valueFrom:
secretKeyRef:
name: {{ .Values.mastodon.secrets.existingSecret }}
key: {{ .Values.mastodon.secrets.secretKeys.vapidPublicKey }}
{{- end }}
- name: "ADMIN_USER" - name: "ADMIN_USER"
{{- if .Values.mastodon.createAdmin.existingSecret }} {{- if .Values.mastodon.createAdmin.existingSecret }}
valueFrom: valueFrom:

View File

@ -52,33 +52,9 @@ spec:
envFrom: envFrom:
- configMapRef: - configMapRef:
name: {{ include "mastodon.fullname" . }}-env name: {{ include "mastodon.fullname" . }}-env
{{- if not .Values.mastodon.secrets.existingSecret }}
- secretRef: - secretRef:
name: {{ template "mastodon.secretName" . }} name: {{ template "mastodon.secretName" . }}
{{- end }}
env: env:
{{- if .Values.mastodon.secrets.existingSecret }}
- name: "SECRET_KEY_BASE"
valueFrom:
secretKeyRef:
name: {{ .Values.mastodon.secrets.existingSecret }}
key: {{ .Values.mastodon.secrets.secretKeys.secretKeyBase }}
- name: "OTP_SECRET"
valueFrom:
secretKeyRef:
name: {{ .Values.mastodon.secrets.existingSecret }}
key: {{ .Values.mastodon.secrets.secretKeys.optSecret }}
- name: "VAPID_PRIVATE_KEY"
valueFrom:
secretKeyRef:
name: {{ .Values.mastodon.secrets.existingSecret }}
key: {{ .Values.mastodon.secrets.secretKeys.vapidPrivateKey }}
- name: "VAPID_PUBLIC_KEY"
valueFrom:
secretKeyRef:
name: {{ .Values.mastodon.secrets.existingSecret }}
key: {{ .Values.mastodon.secrets.secretKeys.vapidPublicKey }}
{{- end }}
- name: "DB_PASS" - name: "DB_PASS"
valueFrom: valueFrom:
secretKeyRef: secretKeyRef:

View File

@ -1,3 +1,6 @@
nameOverride: ""
fullnameOverride: ""
image: image:
repository: ghcr.io/mastodon/mastodon repository: ghcr.io/mastodon/mastodon
# https://github.com/mastodon/mastodon/pkgs/container/mastodon # https://github.com/mastodon/mastodon/pkgs/container/mastodon
@ -19,11 +22,11 @@ mastodon:
username: not_gargron username: not_gargron
# @ignored # @ignored
email: not@example.commit email: not@example.commit
# existingSecret: mastodon-admin existingSecret: ""
# secretKeys: secretKeys:
# usernameKey: username usernameKey: username
# passwordKey: password passwordKey: password
# emailKey: email emailKey: email
cron: cron:
# -- run `tootctl media remove` every week # -- run `tootctl media remove` every week
removeMedia: removeMedia:
@ -88,12 +91,12 @@ mastodon:
private_key: "" private_key: ""
public_key: "" public_key: ""
# -- you can also specify the name of an existing Secret # -- you can also specify the name of an existing Secret
# keys must be:
# VAPID_PRIVATE_KEY
# VAPID_PUBLIC_KEY
# SECRET_KEY_BASE
# OTP_SECRET
existingSecret: "" existingSecret: ""
secretKeys:
vapidPrivateKey: VAPID_PRIVATE_KEY
vapidPublicKey: VAPID_PUBLIC_KEY
secretKeyBase: SECRET_KEY_BASE
otpSecret: OTP_SECRET
sidekiq: sidekiq:
# -- Pod security context for all Sidekiq Pods, overwrites .Values.podSecurityContext # -- Pod security context for all Sidekiq Pods, overwrites .Values.podSecurityContext
@ -163,7 +166,7 @@ mastodon:
password: password:
# -- Instead of defining login/password above, you can specify the name of an existing secret here. Login and # -- Instead of defining login/password above, you can specify the name of an existing secret here. Login and
# password must be located in keys named `login` and `password` respectively. # password must be located in keys named `login` and `password` respectively.
existingSecret: existingSecret: ""
streaming: streaming:
port: 4000 port: 4000
# -- this should be set manually since os.cpus() returns the number of CPUs on # -- this should be set manually since os.cpus() returns the number of CPUs on
@ -296,7 +299,7 @@ redis:
password: "" password: ""
# you can also specify the name of an existing Secret # you can also specify the name of an existing Secret
# with a key of redis-password set to the password you want # with a key of redis-password set to the password you want
# existingSecret: "" existingSecret: ""
# @ignored # @ignored
service: service: