-
Notifications
You must be signed in to change notification settings - Fork 56
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
Pick a single, watched namespace for leader lock #278
Conversation
At present when the environment variable `WATCH_NAMESPACE` is given, it is used verbatim as the namespace for the leadership election module; but, the value can be a comma-delimited list, e.g., `foo,bar`, which are not valid namespace names. This commit fixes that by ensuring a single namespace name is used. Any of the watched namespaced would do, on the assumption that no other deployment of this operator will be using those namespaces. Signed-off-by: Michael Bridgen <mikeb@squaremobius.net>
PR is now waiting for a maintainer to run the acceptance tests. This PR will only perform build and linting. |
/run-acceptance-tests |
Please view the PR build - https://github.com/pulumi/pulumi-kubernetes-operator/actions/runs/2346955601 |
Thanks for the PR @squaremo! Could you add a changelog entry for this? |
I tried some scenarios by hand:
Is this acceptable for this PR @viveklak @lblackstone ? I'll write a changelog entry and move it out of draft, if so. Thanks for the reviews 🙏 |
LGTM -- thanks for the detailed notes. Separate from this PR, I'd suggest opening an issue to track the last two test cases you mentioned (missing or empty). I also would have expected it to watch all namespaces by default. |
Signed-off-by: Michael Bridgen <mikeb@squaremobius.net>
PR is now waiting for a maintainer to run the acceptance tests. This PR will only perform build and linting. |
Proposed changes
At present when the environment variable
WATCH_NAMESPACE
is given, it is used verbatim as the namespace for the leadership election module; but, the value can be a comma-delimited list, e.g.,foo,bar
, which are not valid namespace names.This commit fixes that by ensuring a single namespace name is used. Any of the watched namespaced would do, on the assumption that no other deployment of this operator will be using those namespaces.
Related issues (optional)
Fixes #273.
TODO
[ ] Unit tests (needs scaffolding, first)(EDIT: deprecated in favour of actually trying it)