Skip to content

Commit 5bee41d

Browse files
authored
(charts)breaking: support and defaults to external secrets (#30)
* breaking: support and defaults to external secrets * fixup! breaking: support and defaults to external secrets * fixup! fixup! breaking: support and defaults to external secrets * fixup! fixup! fixup! breaking: support and defaults to external secrets
1 parent ddfaf64 commit 5bee41d

File tree

4 files changed

+28
-7
lines changed

4 files changed

+28
-7
lines changed

charts/zero-notifcation-service/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ type: application
1515
# This is the chart version. This version number should be incremented each time you make changes
1616
# to the chart and its templates, including the app version.
1717
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18-
version: 0.0.10
18+
version: 0.1.0
1919

2020
# This is the version number of the application being deployed. This version number should be
2121
# incremented each time you make changes to the application. Versions are not expected to
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{{- if .Values.externalSecret.enabled -}}
2+
{{- $fullName := include "zero-notification-service.fullname" . -}}
3+
apiVersion: kubernetes-client.io/v1
4+
kind: ExternalSecret
5+
metadata:
6+
name: {{ $fullName }}
7+
spec:
8+
backendType: {{ .Values.externalSecret.backendType }}
9+
{{- if .Values.externalSecret.dataFrom }}
10+
dataFrom:
11+
{{- .Values.externalSecret.dataFrom | toYaml | nindent 4 }}
12+
{{- end }}
13+
{{- end }}

charts/zero-notifcation-service/templates/secret.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{{- if not .Values.externalSecret.enabled -}}
12
apiVersion: v1
23
kind: Secret
34
metadata:
@@ -9,3 +10,4 @@ data:
910
SLACK_API_KEY: {{ .Values.application.slackApiKey | b64enc | quote }}
1011
TWILIO_ACCOUNT_ID: {{ .Values.application.twilioAccountID | b64enc | quote }}
1112
TWILIO_AUTH_TOKEN: {{ .Values.application.twilioAuthToken | b64enc | quote }}
13+
{{- end }}

charts/zero-notifcation-service/values.yaml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ imagePullSecrets: []
1010
nameOverride: ""
1111
fullnameOverride: ""
1212

13+
externalSecret:
14+
enabled: true
15+
backendType: secretsManager
16+
# This is a list of secret names to fetch from AWS secret manager https://github.com/external-secrets/kubernetes-external-secrets
17+
dataFrom: []
18+
1319
serviceAccount:
1420
# Specifies whether a service account should be created
1521
create: true
@@ -79,11 +85,11 @@ affinity: {}
7985
# See project readme for more information about config options
8086

8187
application:
82-
sendgridApiKey:
83-
slackApiKey:
84-
twilioAccountID:
85-
twilioAuthToken:
86-
twilioPhoneNumber:
88+
sendgridApiKey: ""
89+
slackApiKey: ""
90+
twilioAccountID: ""
91+
twilioAuthToken: ""
92+
twilioPhoneNumber: ""
8793
gracefulShutdownTimeout: 10
8894
structuredLogging: true
89-
allowEmailToDomains:
95+
allowEmailToDomains: []

0 commit comments

Comments
 (0)