We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 979bc02 + dc4bd7d commit 5669f73Copy full SHA for 5669f73
internal/controller/component_customizer.go
@@ -57,7 +57,12 @@ func customizeObjectsFn(provider operatorv1.GenericProvider) func(objs []unstruc
57
58
if o.GetNamespace() != "" {
59
// only set the ownership on namespaced objects.
60
- o.SetOwnerReferences(util.EnsureOwnerRef(provider.GetOwnerReferences(),
+ ownerReferences := o.GetOwnerReferences()
61
+ if ownerReferences == nil {
62
+ ownerReferences = []metav1.OwnerReference{}
63
+ }
64
+
65
+ o.SetOwnerReferences(util.EnsureOwnerRef(ownerReferences,
66
metav1.OwnerReference{
67
APIVersion: operatorv1.GroupVersion.String(),
68
Kind: provider.GetObjectKind().GroupVersionKind().Kind,
0 commit comments