{{ if .Values.installation.enabled }}
{{ $installSpec := omit .Values.installation "enabled" }}
{{ $secrets := list }}
{{ range $name := keys .Values.imagePullSecrets -}}
{{ $item := dict "name" $name }}
{{ $secrets = append $secrets $item }}
{{ end }}
{{ $_ := set $installSpec "imagePullSecrets" $secrets }}

apiVersion: operator.tigera.io/v1
kind: Installation
metadata:
  name: default
spec:
{{ $installSpec | toYaml | indent 2 }}

{{ end }}
