{{- if and (index .Values "argo-cd" "kubezero" "sshPrivateKey") (index .Values "argo-cd" "kubezero" "repoUrl") }} apiVersion: v1 kind: Secret metadata: name: kubezero-git-sync namespace: argocd labels: argocd.argoproj.io/secret-type: repository {{- include "kubezero-lib.labels" . | nindent 4 }} type: Opaque stringData: name: kubezero-git-sync type: git url: {{ index .Values "argo-cd" "kubezero" "repoUrl" }} sshPrivateKey: {{ index .Values "argo-cd" "kubezero" "sshPrivateKey" }} {{- end }}