diff --git a/api/v1alpha1/provider_conversion.go b/api/v1alpha1/provider_conversion.go index becad4fc..e321a0c6 100644 --- a/api/v1alpha1/provider_conversion.go +++ b/api/v1alpha1/provider_conversion.go @@ -46,6 +46,7 @@ func (src *BootstrapProvider) ConvertTo(dstRaw conversion.Hub) error { } dst.Spec.ManifestPatches = restored.Spec.ManifestPatches + dst.Spec.AdditionalDeployments = restored.Spec.AdditionalDeployments if restored.Spec.Manager != nil { dst.Spec.Manager.CRDPattern = restored.Spec.Manager.CRDPattern } @@ -110,6 +111,7 @@ func (src *ControlPlaneProvider) ConvertTo(dstRaw conversion.Hub) error { } dst.Spec.ManifestPatches = restored.Spec.ManifestPatches + dst.Spec.AdditionalDeployments = restored.Spec.AdditionalDeployments if restored.Spec.Manager != nil { dst.Spec.Manager.CRDPattern = restored.Spec.Manager.CRDPattern } @@ -174,6 +176,7 @@ func (src *CoreProvider) ConvertTo(dstRaw conversion.Hub) error { } dst.Spec.ManifestPatches = restored.Spec.ManifestPatches + dst.Spec.AdditionalDeployments = restored.Spec.AdditionalDeployments if restored.Spec.Manager != nil { dst.Spec.Manager.CRDPattern = restored.Spec.Manager.CRDPattern } @@ -238,6 +241,7 @@ func (src *InfrastructureProvider) ConvertTo(dstRaw conversion.Hub) error { } dst.Spec.ManifestPatches = restored.Spec.ManifestPatches + dst.Spec.AdditionalDeployments = restored.Spec.AdditionalDeployments if restored.Spec.Manager != nil { dst.Spec.Manager.CRDPattern = restored.Spec.Manager.CRDPattern } diff --git a/hack/charts/cluster-api-operator/templates/infra.yaml b/hack/charts/cluster-api-operator/templates/infra.yaml index 0c2a4577..5d916872 100644 --- a/hack/charts/cluster-api-operator/templates/infra.yaml +++ b/hack/charts/cluster-api-operator/templates/infra.yaml @@ -38,7 +38,7 @@ metadata: annotations: "helm.sh/hook": "post-install" "helm.sh/hook-weight": "2" -{{- if or $infrastructureVersion $.Values.configSecret.name $.Values.manager }} +{{- if or $infrastructureVersion $.Values.configSecret.name $.Values.manager $.Values.additionalDeployments }} spec: {{- end }} {{- if $.Values.additionalDeployments }} diff --git a/internal/controller/component_customizer.go b/internal/controller/component_customizer.go index e3c35668..1978151d 100644 --- a/internal/controller/component_customizer.go +++ b/internal/controller/component_customizer.go @@ -73,6 +73,7 @@ func customizeObjectsFn(provider operatorv1.GenericProvider) func(objs []unstruc })) } + //nolint:nestif if o.GetKind() == deploymentKind { // We need to skip the deployment customization if there are several deployments available // and the deployment name doesn't follow "ca*-controller-manager" pattern.