From 5fe8efda1e561a59671f5d03e9e680aaae7f1611 Mon Sep 17 00:00:00 2001 From: Brett Kochendorfer Date: Fri, 12 Aug 2022 09:50:31 -0500 Subject: [PATCH] chore(external-secrets): More secrets found in discourse that need to be migrated to external secrets (#151) --- charts/discourse/Chart.yaml | 2 +- charts/discourse/templates/logger-config.yaml | 33 ++++++++++--------- 2 files changed, 19 insertions(+), 16 deletions(-) diff --git a/charts/discourse/Chart.yaml b/charts/discourse/Chart.yaml index 31874f9a..2d5ea9b8 100644 --- a/charts/discourse/Chart.yaml +++ b/charts/discourse/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: discourse description: A Helm Chart for Mozilla's Discourse application type: application -version: 3.0.1 +version: 3.0.2 appVersion: f58ded6 keywords: - Mozilla diff --git a/charts/discourse/templates/logger-config.yaml b/charts/discourse/templates/logger-config.yaml index c43c29d0..144bc3d1 100644 --- a/charts/discourse/templates/logger-config.yaml +++ b/charts/discourse/templates/logger-config.yaml @@ -1,5 +1,5 @@ {{- if .Values.externalSecrets.enabled -}} -apiVersion: kubernetes-client.io/v1 +apiVersion: external-secrets.io/v1beta1 kind: ExternalSecret metadata: name: logger-config @@ -15,24 +15,27 @@ metadata: {{- toYaml . | nindent 4 }} {{- end }} spec: - backendType: secretsManager data: - - key: {{ .Values.externalSecrets.loggerSecretKey }} + - remoteRef: + key: {{ .Values.externalSecrets.loggerSecretKey }} + property: loggerSecret + secretKey: loggerSecret + target: name: loggerSecret - template: - metadata: - {{- with .Values.externalSecrets.annotations }} - annotations: - {{- toYaml . | nindent 8 }} - {{- end }} - labels: - {{- include "discourse.labels" . | nindent 8 }} - {{- with .Values.externalSecrets.labels }} + template: + metadata: + {{- with .Values.externalSecrets.annotations }} + annotations: {{- toYaml . | nindent 10 }} {{- end }} - data: - log_files.yml: | - <%= Buffer.from(yaml.dump(JSON.parse(data.loggerSecret))).toString("base64") %> + labels: + {{- include "discourse.labels" . | nindent 10 }} + {{- with .Values.externalSecrets.labels }} + {{- toYaml . | nindent 12 }} + {{- end }} + data: + log_files.yml: | + <%= Buffer.from(yaml.dump(JSON.parse(data.loggerSecret))).toString("base64") %> {{- else }} apiVersion: v1 kind: ConfigMap