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

Feature: Report an error if a namespace is set on non-namespaceable resource #515

Closed
lblackstone opened this issue Apr 2, 2019 · 3 comments
Assignees
Labels
area/inner-dev-loop area/providers impact/reliability Something that feels unreliable or flaky kind/enhancement Improvements or new features resolution/wont-fix This issue won't be fixed

Comments

@lblackstone
Copy link
Member

Overly broad transformations can erroneously set the namespace for non-namespaceable resource Kinds. While this doesn't prevent the resource from being created, it can force an unnecessary replacement if this ignored field is changed later.

It would be better to catch this condition at the Check stage, and report an error rather than silently accepting an invalid configuration.

See related comment: #415 (comment)

@lblackstone
Copy link
Member Author

lblackstone commented Apr 22, 2019

The provider logic correctly handles these cases now [1] to prevent unnecessary resource replacement. All resources except CRs will be corrected during the Check phase based on authoritative information from the k8s API server. For CRs, the namespace can be set erroneously due to a lack of required information, but will be corrected during the Create phase if necessary. The combination of these steps will prevent erroneous replacements.

It may still be worth printing a warning message during Check for non-CR resources to avoid confusing the user, but it won't affect update functionality.

[1] #538

@hausdorff
Copy link
Contributor

I think we should not do this for Q3, since this is a flaw the underlying k8s API has as well (i.e., k8s will happily accept resources with .metadata.namespace set, but which are not namespaced).

@infin8x infin8x added kind/enhancement Improvements or new features and removed kind/feature labels Jul 10, 2021
@lblackstone lblackstone added the resolution/wont-fix This issue won't be fixed label Jul 14, 2023
@lblackstone
Copy link
Member Author

The provider handles this case gracefully, so nothing to do here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/inner-dev-loop area/providers impact/reliability Something that feels unreliable or flaky kind/enhancement Improvements or new features resolution/wont-fix This issue won't be fixed
Projects
None yet
Development

No branches or pull requests

3 participants