Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
willie-yao committed Jun 5, 2024
1 parent fa3bddc commit de8275a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions api/v1alpha1/provider_conversion.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down Expand Up @@ -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
}
Expand Down Expand Up @@ -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
}
Expand Down Expand Up @@ -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
}
Expand Down
2 changes: 1 addition & 1 deletion hack/charts/cluster-api-operator/templates/infra.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
1 change: 1 addition & 0 deletions internal/controller/component_customizer.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit de8275a

Please sign in to comment.