Add an option to fill default namespace in manifest if no other namespace set #9
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This change introduces a falg to enable filling the default namespace in the manifest when no namespace is specified. By default the flag is off and the tool behaves just like before this change.
The solution is not ideal because there doesn't seem to be a robust way to check if a specific resource type requires a namespace without actually making API calls to a cluster. However, there seem to be on average more resources requiring a namespace then not in a specific setup, so it's easier to add namespace everywhere and then remove it from the resources that don't need it.
Of course, if it turns out there is a way to formally identify namespaced resources offline, this feature should make use of that.