onepassword-operator icon indicating copy to clipboard operation
onepassword-operator copied to clipboard

Feature request: Watch namespaces by annotation

Open csullivannet opened this issue 4 years ago • 6 comments

Sometimes we have clusters that have dynamic namespaces, i.e. those that would be created after provisioning the operator.

Rather than forcing an update to the operator, I'd prefer to be able to annotation my namespace manifest so that the operator automatically starts watching it.

csullivannet avatar Feb 17 '21 19:02 csullivannet

This is an absolute must. We can't update the operator for every new application we deploy (too much work), as we create a namespace per application.

nesl247 avatar Apr 13 '21 15:04 nesl247

Thank you for opening this issue. We're investigating options to allow dynamically watching namespaces without requiring an update or restart.

Note that you can already set WATCH_NAMESPACE to the empty string to watch all namespaces. @nesl247 Would this help with your use case?

SimonBarendse avatar May 12 '21 12:05 SimonBarendse

I believe that in our use case that would work. I haven't looked into this enough to see if there would be any issues with that.

nesl247 avatar May 12 '21 19:05 nesl247

Note that you can already set WATCH_NAMESPACE to the empty string to watch all namespaces. @SimonBarendse I don't believe that's documented in the README, perhaps that should be added, as I was very close to writing off the operator as unsuitable for our use-case as I thought we had to list the namespaces to watch.

mcmarkj avatar May 13 '21 16:05 mcmarkj

Definitely Mark! Thank you for pointing this out. I've opened https://github.com/1Password/onepassword-operator/pull/39 to address this.

SimonBarendse avatar May 14 '21 11:05 SimonBarendse

I'm curious to learn if this was just a documentation issue or there's more we can do.

@csullivannet @pdavisfmnh @camilb and @liftedkilt, will watching all namespaces work for your use cases?

Note that the operator only takes action when you create OnePasswordItem CRDs or add an operator.1password.io annotation. It leaves other deployments where you're not using 1Password untouched.

SimonBarendse avatar May 14 '21 11:05 SimonBarendse