diff --git a/hack/charts/cluster-api-operator/templates/infra.yaml b/hack/charts/cluster-api-operator/templates/infra.yaml index d50a6c1d..842123f5 100644 --- a/hack/charts/cluster-api-operator/templates/infra.yaml +++ b/hack/charts/cluster-api-operator/templates/infra.yaml @@ -1,8 +1,7 @@ -# Recursive printer function for use with additionalDeployments field {{- define "recursivePrinter" }} {{- range $key, $value := . }} {{- if kindIs "map" $value }} -- {{ $key }}: + {{ $key }}: {{- include "recursivePrinter" $value | indent 2 }} {{- else }} {{ $key }}: {{ $value }} @@ -54,11 +53,6 @@ metadata: {{- if or $infrastructureVersion $.Values.configSecret.name $.Values.manager $.Values.additionalDeployments }} spec: {{- end }} -{{- if $.Values.additionalDeployments }} - additionalDeployments: - {{- include "recursivePrinter" $.Values.additionalDeployments | indent 2 }} -{{- end }} -{{- end }} {{- if $infrastructureVersion }} version: {{ $infrastructureVersion }} {{- end }} @@ -82,4 +76,9 @@ spec: namespace: {{ $.Values.configSecret.namespace }} {{- end }} {{- end }} +{{- if $.Values.additionalDeployments }} + additionalDeployments: + {{- include "recursivePrinter" $.Values.additionalDeployments | indent 2 }} +{{- end }} +{{- end }} {{- end }} diff --git a/test/e2e/resources/full-chart-install.yaml b/test/e2e/resources/full-chart-install.yaml index 5cdcb4b8..1f77649d 100644 --- a/test/e2e/resources/full-chart-install.yaml +++ b/test/e2e/resources/full-chart-install.yaml @@ -27709,7 +27709,6 @@ spec: # Core provider --- # Source: cluster-api-operator/templates/infra.yaml -# Recursive printer function for use with additionalDeployments field # Infrastructure providers --- # Source: cluster-api-operator/templates/operator-components.yaml