{{- define "argocd-values" }}
argo-cd:
  controller:
    metrics:
      enabled: {{ .Values.metrics.enabled }}
  repoServer:
    metrics:
      enabled: {{ .Values.metrics.enabled }}
  server:
    metrics:
      enabled: {{ .Values.metrics.enabled }}
    {{- with index .Values "argocd" "server" }}
    {{- toYaml . | nindent 4 }}
    {{- end }}
  {{- with index .Values "argocd" "configs" }}
  configs:
    {{- toYaml . | nindent 4 }}
  {{- end }}
{{- if and ( index .Values "argocd" "istio" "enabled" ) .Values.istio.enabled }}
istio:
  {{- with index .Values "argocd" "istio" }}
  {{- toYaml . | nindent 2 }}
  {{- end }}
{{- end }}

{{- with index .Values "argocd" "kubezero" }}
kubezero:
  {{- toYaml . | nindent 2 }}
{{- end }}

{{- end }}