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

Handle the case when listing namespaces is forbidden #42

Merged
merged 3 commits into from
Oct 16, 2019

Conversation

carlossg
Copy link
Contributor

Ignore a forbidden error as that means we can connect to the api server
Do not try to watch at cluster level when we only need one namespace

Fixes #12

Ignore a forbidden error as that means we can connect to the api server
Do not try to watch at cluster level when we only need one namespace

Fixes boz#12
@boz
Copy link
Owner

boz commented Aug 20, 2019

Looks great @carlossg, thank you. I'll play around with it shortly.

Copy link
Owner

@boz boz left a comment

Choose a reason for hiding this comment

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

Sorry for the delay; I've been off the grid.

I like the change, and would love to fix #12, my only hesitation is that it breaks the current behavior if the namespace does not exist yet - it currently watches for namespaces to appear.

I think adding a flag to force the behavior in this patch might be the best route. I'll try to think of a decent name this evening. I'm open to flag name suggestions or any other ideas to get #12 fixed.

Thanks for getting this moving!

@carlossg
Copy link
Contributor Author

carlossg commented Sep 3, 2019

maybe we just need to check if the namespace exists, and if so, watch only that one.
That would keep the existing behavior intact

to keep existing behavior
if the namespace does not exist we watch namespaces to wait for it
@carlossg
Copy link
Contributor Author

this should work out that case

@angelbarrera92
Copy link

Is this feature ready to be merged?

@carlossg
Copy link
Contributor Author

I've been using it for weeks, just waiting for @boz to approve

@boz
Copy link
Owner

boz commented Oct 16, 2019

Thank you so much. Sorry for the delay.

@boz boz merged commit 0d6900b into boz:master Oct 16, 2019
@carlossg carlossg deleted the issue-12 branch October 16, 2019 18:27
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.

error when used with restricted access rights
3 participants