Conditional data to help secret overwrite (#99)
This addresses an issue where repeatedly applying the same Helm chart will cause the existing data in the secret argocd-secret. This helps with issue (#99) but will still impact data if any of the three webhook configs are provided.
This commit is contained in:
parent
87c5c1a5a4
commit
cd6bf14b23
1 changed files with 6 additions and 3 deletions
|
@ -2,14 +2,16 @@ apiVersion: v1
|
|||
kind: Secret
|
||||
metadata:
|
||||
name: argocd-secret
|
||||
labels:
|
||||
labels:
|
||||
app.kubernetes.io/name: {{ include "argo-cd.name" . }}
|
||||
helm.sh/chart: {{ include "argo-cd.chart" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
app.kubernetes.io/part-of: {{ include "argo-cd.name" . }}
|
||||
type: Opaque
|
||||
data:
|
||||
{{- if or .Values.config.webhook.githubSecret (or .Values.config.webhook.gitlabSecret .Values.config.webhook.bitbucketSecret) }}
|
||||
Setting a blank data again will wipe admin password/key/cert
|
||||
data:
|
||||
{{- if .Values.config.webhook.githubSecret }}
|
||||
github.webhook.secret: {{ .Values.config.webhook.githubSecret }}
|
||||
{{- end }}
|
||||
|
@ -18,4 +20,5 @@ data:
|
|||
{{- end }}
|
||||
{{- if .Values.config.webhook.bitbucketSecret }}
|
||||
bitbucket.webhook.uuid: {{ .Values.config.webhook.bitbucketSecret }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end}}
|
||||
|
|
Loading…
Reference in a new issue