From 86cd73a766aabebf33cf69d5a5c00ec2e8a0a03b Mon Sep 17 00:00:00 2001 From: Sem Schilder Date: Thu, 3 Apr 2025 08:30:08 +0100 Subject: [PATCH 1/2] Update the version (#186) --- CHANGELOG.md | 4 ++++ Chart.yaml | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f04ebb6..2364ca9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +# 6.2.3 + +- Updated the Mastodon version to v4.3.7 + # 6.2.2 - `app.kubernetes.io/version` shortens any potential digest hash to 7 characters to avoid hitting the 63 character label limit. diff --git a/Chart.yaml b/Chart.yaml index 4373419..ba08e7a 100644 --- a/Chart.yaml +++ b/Chart.yaml @@ -15,12 +15,12 @@ type: application # This is the chart version. This version number should be incremented each time # you make changes to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 6.2.2 +version: 6.2.3 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. -appVersion: "v4.3.6" +appVersion: "v4.3.7" dependencies: - name: elasticsearch From 4fc46b53b8caa71be4aff57b8008daefe47b9eb4 Mon Sep 17 00:00:00 2001 From: Tim Campbell Date: Tue, 8 Apr 2025 16:01:45 +0200 Subject: [PATCH 2/2] Fix redis secret from values not being used in db-prepare (#189) --- CHANGELOG.md | 4 ++++ Chart.yaml | 2 +- templates/_db-migrate.tpl | 4 ++++ templates/secret-redis-preinstall.yaml | 19 +++++++++++++++++++ 4 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 templates/secret-redis-preinstall.yaml diff --git a/CHANGELOG.md b/CHANGELOG.md index 2364ca9..01091af 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +# 6.2.4 + +- Fixed an issue where redis secrets specified in values or the helm CLI wouldn't be used by the db-prepare job on install. + # 6.2.3 - Updated the Mastodon version to v4.3.7 diff --git a/Chart.yaml b/Chart.yaml index ba08e7a..37a898f 100644 --- a/Chart.yaml +++ b/Chart.yaml @@ -15,7 +15,7 @@ type: application # This is the chart version. This version number should be incremented each time # you make changes to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 6.2.3 +version: 6.2.4 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/templates/_db-migrate.tpl b/templates/_db-migrate.tpl index 12972f3..95d9f4b 100644 --- a/templates/_db-migrate.tpl +++ b/templates/_db-migrate.tpl @@ -102,7 +102,11 @@ spec: - name: "REDIS_PASSWORD" valueFrom: secretKeyRef: + {{- if and (.prepare) (not .Values.redis.enabled) (not .Values.redis.auth.existingSecret) (not .Values.redis.existingSecret) (.Values.redis.auth.password) }} + name: {{ template "mastodon.redis.secretName" . }}-pre-install + {{- else }} name: {{ template "mastodon.redis.secretName" . }} + {{- end }} key: redis-password {{- if .preDeploy }} - name: "SKIP_POST_DEPLOYMENT_MIGRATIONS" diff --git a/templates/secret-redis-preinstall.yaml b/templates/secret-redis-preinstall.yaml new file mode 100644 index 0000000..074e035 --- /dev/null +++ b/templates/secret-redis-preinstall.yaml @@ -0,0 +1,19 @@ +{{- if not .Values.redis.enabled }} +{{- if and (not .Values.redis.auth.existingSecret) (not .Values.redis.existingSecret) }} +{{- if .Values.redis.auth.password }} +apiVersion: v1 +kind: Secret +metadata: + name: {{ include "mastodon.redis.secretName" . }}-pre-install + labels: + {{- include "mastodon.labels" . | nindent 4 }} + annotations: + helm.sh/hook: pre-install + helm.sh/hook-weight: "-5" + "helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded +type: Opaque +data: + redis-password: "{{ .Values.redis.auth.password | b64enc }}" +{{- end }} +{{- end }} +{{- end }}