From c3f75474a3643b54e4e0603fa6ebf12184e809d9 Mon Sep 17 00:00:00 2001 From: Siegfried Weber Date: Wed, 11 Dec 2024 11:19:27 +0100 Subject: [PATCH 1/2] fix(helm): Add configuration options for the secret migration job --- CHANGELOG.md | 8 ++++++++ .../secret-operator/templates/secret_migration_job.yaml | 4 +++- .../secret-operator/templates/secret_migration_rbac.yaml | 4 +++- deploy/helm/secret-operator/values.yaml | 2 ++ 4 files changed, 16 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a7a4d9f4..d7382fa4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,15 @@ All notable changes to this project will be documented in this file. - Made RSA key length configurable for certificates issued by cert-manager ([#528]). +### Fixed + +- Helm chart: The secret migration job can be omitted via Helm values ([#536]). +- Helm chart: The tag of the tools image used for the secret migration job can + be changed in the Helm values and defaults to the current SDP version instead + of 24.7.0 ([#536]). + [#528]: https://github.com/stackabletech/secret-operator/pull/528 +[#536]: https://github.com/stackabletech/secret-operator/pull/536 ## [24.11.0] - 2024-11-18 diff --git a/deploy/helm/secret-operator/templates/secret_migration_job.yaml b/deploy/helm/secret-operator/templates/secret_migration_job.yaml index ac23f3d7..d2c14676 100644 --- a/deploy/helm/secret-operator/templates/secret_migration_job.yaml +++ b/deploy/helm/secret-operator/templates/secret_migration_job.yaml @@ -1,4 +1,5 @@ --- +{{ if .Values.secretMigrationJob.enabled -}} # Migrates the TLS CA key pair from the hard-coded default namespace to the operator namespace # See https://github.com/stackabletech/secret-operator/issues/453 apiVersion: batch/v1 @@ -30,7 +31,7 @@ spec: {{- toYaml .Values.podSecurityContext | nindent 8 }} containers: - name: migrate-secret - image: "{{ .Values.secretMigrationJob.image.repository }}:1.0.0-stackable24.7.0" + image: "{{ .Values.secretMigrationJob.image.repository }}:{{ .Values.secretMigrationJob.image.tag | default (print "1.0.0-stackable" .Chart.AppVersion) }}" imagePullPolicy: {{ .Values.secretMigrationJob.image.pullPolicy }} resources: {{ .Values.secretMigrationJob.resources | toYaml | nindent 12 }} @@ -53,3 +54,4 @@ spec: fi fi restartPolicy: Never +{{- end }} diff --git a/deploy/helm/secret-operator/templates/secret_migration_rbac.yaml b/deploy/helm/secret-operator/templates/secret_migration_rbac.yaml index d4a462d1..561a2416 100644 --- a/deploy/helm/secret-operator/templates/secret_migration_rbac.yaml +++ b/deploy/helm/secret-operator/templates/secret_migration_rbac.yaml @@ -1,4 +1,5 @@ --- +{{ if .Values.secretMigrationJob.enabled -}} apiVersion: v1 kind: ServiceAccount metadata: @@ -53,4 +54,5 @@ rules: - watch - create - patch - - update \ No newline at end of file + - update +{{- end }} diff --git a/deploy/helm/secret-operator/values.yaml b/deploy/helm/secret-operator/values.yaml index a2a7fe6f..6073aa3e 100644 --- a/deploy/helm/secret-operator/values.yaml +++ b/deploy/helm/secret-operator/values.yaml @@ -6,8 +6,10 @@ image: pullSecrets: [] secretMigrationJob: + enabled: true image: repository: docker.stackable.tech/stackable/tools + tag: null # defaults to 1.0.0-stackable{{appVersion}} pullPolicy: IfNotPresent resources: requests: From a9d1234d19d68524160f94d0b0fba7e827ce4c9c Mon Sep 17 00:00:00 2001 From: Siegfried Weber Date: Wed, 11 Dec 2024 15:25:04 +0100 Subject: [PATCH 2/2] fix(helm): Default the tools image to 1.0.0-stackable24.11.0 --- CHANGELOG.md | 4 ++-- .../helm/secret-operator/templates/secret_migration_job.yaml | 2 +- deploy/helm/secret-operator/values.yaml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d7382fa4..8c8a0750 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,8 +12,8 @@ All notable changes to this project will be documented in this file. - Helm chart: The secret migration job can be omitted via Helm values ([#536]). - Helm chart: The tag of the tools image used for the secret migration job can - be changed in the Helm values and defaults to the current SDP version instead - of 24.7.0 ([#536]). + be changed in the Helm values and defaults now to 1.0.0-stackable24.11.0 + rather than being hard-coded to 1.0.0-stackable24.7.0 ([#536]). [#528]: https://github.com/stackabletech/secret-operator/pull/528 [#536]: https://github.com/stackabletech/secret-operator/pull/536 diff --git a/deploy/helm/secret-operator/templates/secret_migration_job.yaml b/deploy/helm/secret-operator/templates/secret_migration_job.yaml index d2c14676..3a7bc819 100644 --- a/deploy/helm/secret-operator/templates/secret_migration_job.yaml +++ b/deploy/helm/secret-operator/templates/secret_migration_job.yaml @@ -31,7 +31,7 @@ spec: {{- toYaml .Values.podSecurityContext | nindent 8 }} containers: - name: migrate-secret - image: "{{ .Values.secretMigrationJob.image.repository }}:{{ .Values.secretMigrationJob.image.tag | default (print "1.0.0-stackable" .Chart.AppVersion) }}" + image: "{{ .Values.secretMigrationJob.image.repository }}:{{ .Values.secretMigrationJob.image.tag }}" imagePullPolicy: {{ .Values.secretMigrationJob.image.pullPolicy }} resources: {{ .Values.secretMigrationJob.resources | toYaml | nindent 12 }} diff --git a/deploy/helm/secret-operator/values.yaml b/deploy/helm/secret-operator/values.yaml index 6073aa3e..1c12089e 100644 --- a/deploy/helm/secret-operator/values.yaml +++ b/deploy/helm/secret-operator/values.yaml @@ -9,7 +9,7 @@ secretMigrationJob: enabled: true image: repository: docker.stackable.tech/stackable/tools - tag: null # defaults to 1.0.0-stackable{{appVersion}} + tag: 1.0.0-stackable24.11.0 pullPolicy: IfNotPresent resources: requests: