Skip to content

Commit

Permalink
Fix: Add helm condition to skip secret manifest creation when slack s…
Browse files Browse the repository at this point in the history
…ecrets are not provided (#101)
  • Loading branch information
Yuni-sa authored Oct 10, 2023
1 parent 28cb572 commit 2ef9cca
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions charts/kor/templates/secret.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
{{- if and .Values.cronJob.enabled }}
{{- if ne .Values.cronJob.slackAuthToken "" }}
apiVersion: v1
kind: Secret
metadata:
name: {{ .Release.Name }}-slack-auth-token-secret
type: Opaque
data:
slack-auth-token: {{ .Values.cronJob.slackAuthToken | b64enc | quote }}
{{- end }}

{{- if ne .Values.cronJob.slackWebhookUrl "" }}
---
apiVersion: v1
kind: Secret
Expand All @@ -14,3 +18,5 @@ metadata:
type: Opaque
data:
slack-webhook-url: {{ .Values.cronJob.slackWebhookUrl | b64enc | quote }}
{{- end }}
{{- end }}

0 comments on commit 2ef9cca

Please sign in to comment.