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

[KAPP-71] Watch pods in specific namespace when needed #97

Merged
merged 2 commits into from
Apr 7, 2020

Conversation

jessehu
Copy link
Contributor

@jessehu jessehu commented Apr 6, 2020

When a namespace-scoped RBAC user is used by kubectl, and this
user doesn't have privilege to watch pods in all namespaces,
we should only watch the namespace specified by '-n' flag or
default to the namespace specified in kubeconfig.

Manually tested on Mac OS and the error msg is gone:
./kapp deploy -a myapp -f examples/gitops/guestbook/

Close #71

When a namespace-scoped RBAC user is used by kubectl, and this
user doesn't have privilege to watch pods in all namespaces,
we should only watch the namespace specified by '-n' flag or
default to the namespace specified in kubeconfig.

Manually tested on Mac OS and the error msg is gone:
`./kapp deploy -a myapp -f examples/gitops/guestbook/`
*Save fallbackAllowedNamespaces onto IdentifiedResources directly
* Use errors.IsForbidden(err) check permission error for watching all pods
@cppforlife cppforlife closed this Apr 7, 2020
@cppforlife cppforlife reopened this Apr 7, 2020
@cppforlife
Copy link
Contributor

closed-reopened PR for test-gh workflow to run.

@cppforlife cppforlife merged commit 2f2010a into carvel-dev:master Apr 7, 2020
@jessehu jessehu deleted the kapp-71/fix-pod-watch branch April 8, 2020 03:18
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.

kapp deploy fails with when not allowed to list cluster pods
2 participants