Skip to content

Commit 5669f73

Browse files
authored
Merge pull request #352 from Danil-Grigorev/core-provider-healthcheck-fix
🐛 Prevent propagation of OwnerReferences from provider manifests
2 parents 979bc02 + dc4bd7d commit 5669f73

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

internal/controller/component_customizer.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,12 @@ func customizeObjectsFn(provider operatorv1.GenericProvider) func(objs []unstruc
5757

5858
if o.GetNamespace() != "" {
5959
// only set the ownership on namespaced objects.
60-
o.SetOwnerReferences(util.EnsureOwnerRef(provider.GetOwnerReferences(),
60+
ownerReferences := o.GetOwnerReferences()
61+
if ownerReferences == nil {
62+
ownerReferences = []metav1.OwnerReference{}
63+
}
64+
65+
o.SetOwnerReferences(util.EnsureOwnerRef(ownerReferences,
6166
metav1.OwnerReference{
6267
APIVersion: operatorv1.GroupVersion.String(),
6368
Kind: provider.GetObjectKind().GroupVersionKind().Kind,

0 commit comments

Comments
 (0)