feat(argo-cd): Add ability to handle cluster credentials (#632)
* feat(argo-cd): Add ability to handle cluster credentials Signed-off-by: Marco Kilchhofer <mkilchhofer@users.noreply.github.com> * Apply review changes Co-authored-by: Oliver Bähler <oliverbaehler@hotmail.com> Signed-off-by: Marco Kilchhofer <mkilchhofer@users.noreply.github.com> * fix: use stringData in cluster secret Signed-off-by: Marco Kilchhofer <mkilchhofer@users.noreply.github.com> Co-authored-by: Oliver Bähler <oliverbaehler@hotmail.com> Co-authored-by: Spencer Gilbert <Spencer.Gilbert@gmail.com>
This commit is contained in:
parent
4b9c281711
commit
84120e6da3
4 changed files with 48 additions and 1 deletions
23
charts/argo-cd/templates/argocd-configs/cluster-secrets.yaml
Normal file
23
charts/argo-cd/templates/argocd-configs/cluster-secrets.yaml
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
{{- range .Values.configs.clusterCredentials }}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: {{ include "argo-cd.name" $ }}-cluster-{{ .name }}
|
||||
labels:
|
||||
{{- include "argo-cd.labels" (dict "context" $) | nindent 4 }}
|
||||
argocd.argoproj.io/secret-type: cluster
|
||||
{{- with .annotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
type: Opaque
|
||||
stringData:
|
||||
name: {{ required "A valid .Values.configs.clusterCredentials[].name entry is required!" .name }}
|
||||
server: {{ required "A valid .Values.configs.clusterCredentials[].server entry is required!" .server }}
|
||||
{{- with .namespaces }}
|
||||
namespaces: {{ . }}
|
||||
{{- end }}
|
||||
config: |
|
||||
{{- required "A valid .Values.configs.clusterCredentials[].config entry is required!" .config | toPrettyJson | nindent 4 }}
|
||||
{{- end }}
|
||||
Loading…
Add table
Add a link
Reference in a new issue