argocd-helm/charts/argo-cd/templates/argocd-configs/argocd-ssh-known-hosts-cm.yaml
Petr Drastil 5b9f624ba2
feat(argo-cd): Consolidate certificate config for repositories (#1786)
Signed-off-by: Petr Drastil <petr.drastil@gmail.com>
2023-01-21 10:24:46 +01:00

22 lines
751 B
YAML

apiVersion: v1
kind: ConfigMap
metadata:
name: argocd-ssh-known-hosts-cm
labels:
{{- 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 }}
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 }}