{{ if .Values.installation.enabled }}
{{ $installSpec := omit .Values.installation "enabled" }}
{{ $_ := set $installSpec "imagePullSecrets" (include "tigera-operator.imagePullSecrets" . | fromYamlArray) }}

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

{{ end }}

{{ if .Values.apiServer.enabled }}
{{ $apiServerSpec := omit .Values.apiServer "enabled" }}
---

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

{{ if .Values.goldmane.enabled }}
{{ $goldmaneSpec := omit .Values.goldmane "enabled" }}
---

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

{{ if .Values.whisker.enabled }}
{{ $whiskerSpec := omit .Values.whisker "enabled" }}
---

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