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

Don't attach namespaces to non-namespaced resources #320

Merged
merged 6 commits into from
Jul 16, 2020
Merged

Don't attach namespaces to non-namespaced resources #320

merged 6 commits into from
Jul 16, 2020

Conversation

captncraig
Copy link
Contributor

This is a quick and dirty way to NOT add namespaces to non-namespaced resource types like ClusterRoles or StorageClasses.

I ran into this when trying to export resources to a folder per namespace, and seeing things like ClusterRoles show up in nested namespaces, which is incorrect. It masked issues like multiple environments defining the same object because of the way it did this.

I implemented it as a simple list in namespace.go. If new types are added to the api we can add them here. It requires a little maintenance potentially, but it isn't world ending if we take too long to add something.

Copy link
Member

@sh0rez sh0rez left a comment

Choose a reason for hiding this comment

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

Looks good!

Please also adapt /namespaces in the docs :)

pkg/process/namespace.go Outdated Show resolved Hide resolved
pkg/process/namespace.go Outdated Show resolved Hide resolved
Copy link
Member

@sh0rez sh0rez left a comment

Choose a reason for hiding this comment

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

LGTM

@sh0rez sh0rez merged commit 651e020 into master Jul 16, 2020
@sh0rez sh0rez deleted the globals branch July 16, 2020 13:23
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.

2 participants