feat(argo-cd): Consolidate certificate config for repositories (#1786)
Signed-off-by: Petr Drastil <petr.drastil@gmail.com>
This commit is contained in:
parent
4dd31571b3
commit
5b9f624ba2
7 changed files with 98 additions and 71 deletions
|
|
@ -3,11 +3,20 @@ kind: ConfigMap
|
|||
metadata:
|
||||
name: argocd-ssh-known-hosts-cm
|
||||
labels:
|
||||
{{- include "argo-cd.labels" (dict "context" . "component" .Values.server.name "name" "ssh-known-hosts-cm") | nindent 4 }}
|
||||
{{- with .Values.configs.knownHostsAnnotations }}
|
||||
{{- include "argo-cd.labels" (dict "context" . "name" "ssh-known-hosts-cm") | nindent 4 }}
|
||||
{{- with (mergeOverwrite (deepCopy .Values.configs.ssh.annotations) (.Values.configs.knownHostsAnnotations | default dict)) -}}
|
||||
annotations:
|
||||
{{- range $key, $value := . }}
|
||||
{{ $key }}: {{ $value | quote }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- toYaml .Values.configs.knownHosts | nindent 0 }}
|
||||
data:
|
||||
ssh_known_hosts: |
|
||||
{{- if hasKey .Values.configs "knownHosts" }}
|
||||
{{- .Values.configs.knownHosts.data.ssh_known_hosts | nindent 4 }}
|
||||
{{- else }}
|
||||
{{- .Values.configs.ssh.knownHosts | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- with .Values.configs.ssh.extraHosts }}
|
||||
{{- . | nindent 4 }}
|
||||
{{- end }}
|
||||
|
|
|
|||
|
|
@ -3,13 +3,20 @@ kind: ConfigMap
|
|||
metadata:
|
||||
name: argocd-tls-certs-cm
|
||||
labels:
|
||||
{{- include "argo-cd.labels" (dict "context" . "component" .Values.server.name "name" "tls-certs-cm") | nindent 4 }}
|
||||
{{- with .Values.configs.tlsCertsAnnotations }}
|
||||
{{- include "argo-cd.labels" (dict "context" . "name" "tls-certs-cm") | nindent 4 }}
|
||||
{{- with (mergeOverwrite (deepCopy .Values.configs.ssh.annotations) (.Values.configs.tlsCertsAnnotations | default dict)) -}}
|
||||
annotations:
|
||||
{{- range $key, $value := . }}
|
||||
{{ $key }}: {{ $value | quote }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- with .Values.configs.tlsCerts }}
|
||||
{{- toYaml . | nindent 0 }}
|
||||
{{- if hasKey .Values.configs "tlsCerts" }}
|
||||
{{- with .Values.configs.tlsCerts }}
|
||||
{{- toYaml . | nindent 0 }}
|
||||
{{- end }}
|
||||
{{- else }}
|
||||
{{- with .Values.configs.tls.certificates }}
|
||||
data:
|
||||
{{- toYaml . | nindent 2 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue