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

Better handling of namespaces to be ignored #5

Open
flavio opened this issue Mar 13, 2023 · 2 comments
Open

Better handling of namespaces to be ignored #5

flavio opened this issue Mar 13, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@flavio
Copy link
Collaborator

flavio commented Mar 13, 2023

The code currently handling the ignored namespaces can be improved by using a Set.

The Go SDK doesn't offer this type yet, but there's this library that does that: https://github.com/deckarep/golang-set

The main function should build a Set populated with all the namespaces to be ignored, and then use the ignoredNamespacesSet.Contains function to quickly determine whether a namespace has to be ignored.

As bonus points, using a Set built in a dynamic fashion would allow the code to be extended to allow the user to provide his own list of namespaces to ignore

@wrkode
Copy link
Owner

wrkode commented Mar 14, 2023

Makes sense to build a set. I'll look into it.

For the users own list of namespaces, a label instead of name of the namespaces could be implemented.
meaning that the user could purposely label the namespace and match that label in the manifest for exclusion.
sounds good?

@flavio
Copy link
Collaborator Author

flavio commented Mar 14, 2023

For the users own list of namespaces, a label instead of name of the namespaces could be implemented.
meaning that the user could purposely label the namespace and match that label in the manifest for exclusion.
sounds good?

Yes and no... someone could abuse this system to have his namespace unrestricted. It's all up to you how to implement that.

You could just start with an environment variable that takes a comma separated list of names

@wrkode wrkode added the enhancement New feature or request label Mar 24, 2023
@wrkode wrkode mentioned this issue Mar 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants