Skip to content

Commit

Permalink
chore(external-secrets): More secrets found in discourse that need to…
Browse files Browse the repository at this point in the history
… be migrated to external secrets (#151)
  • Loading branch information
bkochendorfer authored Aug 12, 2022
1 parent 50e9dde commit 5fe8efd
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 16 deletions.
2 changes: 1 addition & 1 deletion charts/discourse/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
33 changes: 18 additions & 15 deletions charts/discourse/templates/logger-config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{- if .Values.externalSecrets.enabled -}}
apiVersion: kubernetes-client.io/v1
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: logger-config
Expand All @@ -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
Expand Down

0 comments on commit 5fe8efd

Please sign in to comment.