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

investigate namespace watch behavior with new operator SDK #177

Closed
joel-bluedata opened this issue Jul 27, 2019 · 3 comments
Closed

investigate namespace watch behavior with new operator SDK #177

joel-bluedata opened this issue Jul 27, 2019 · 3 comments

Comments

@joel-bluedata
Copy link
Member

Desired behavior:

  • KD watches ALL namespaces for KDC objects.
  • KD watches only ITS OWN namespace for KD Config object.

Is this the case on the new operator SDK branch?

And, what is the namespace passed to the manager object used for?

@don-milos
Copy link
Collaborator

It looks like this is a known issue that will possibly be solved with the next stable release of controller-runtime v0.2.0.

operator-framework/operator-sdk#767
elastic/cloud-on-k8s#405

For the time being it looks like we're stuck with watching all namespaces or just one. The current code watches only the default namespace. That's the namespace that is currently passed to the manager object.

I can modify the code to watch all namespaces for both resources by passing Namespace:"" to the manager if you like?

@joel-bluedata
Copy link
Member Author

A quick glance at that change for the 0.2.0 controller-runtime still seems to indicate that the set of watchable namespaces is the same for all watched resources. If so that still doesn't map to what we are expecting to do here.

The solution might be to watch all namespaces, but specifically for KDConfig we only pay attention to the object if it is in our own namespace.

We could reject bad-namespace KDConfig objects in the validator, or ignore them in the controller.

@don-milos
Copy link
Collaborator

I like the idea of rejecting KDConfig objects in the validator when the namespace is bad. I will start implementing that.

joel-bluedata added a commit that referenced this issue Aug 7, 2019
Investigate namespace watch behavior with new operator SDK #177
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants