Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't set ownerReference on cluster-scoped and cross-namespace objects #196

Merged
merged 1 commit into from
Jun 28, 2023

Conversation

joelsmith
Copy link
Contributor

A user noticed that the OLM operator was trying and failing to create a rolebinding in the kube-system namespace because it tries to add an owner reference to the kedacontroller object from a different namespace.

$ kubectl get events -n kube-system|grep -i keda
4m51s       Warning   OwnerRefInvalidNamespace   rolebinding/keda-auth-reader   ownerRef [keda.sh/v1alpha1/KedaController, namespace: kube-system, name: keda, uid: 1e9a6cd3-17e8-4dec-832f-64ab6db759fe] does not exist in namespace "kube-system"

This change makes it so that the OLM operator will only set the owner reference on objects in the same namespace as the kedacontroller object.

Checklist

  • Commits are signed with Developer Certificate of Origin (DCO)

Signed-off-by: Joel Smith <joelsmith@redhat.com>
Copy link
Member

@zroubalik zroubalik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@joelsmith joelsmith merged commit 1930c41 into kedacore:main Jun 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants