-
Notifications
You must be signed in to change notification settings - Fork 45
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
Infer namespace from the marshaled object when reading from files and creating new classes #404
Comments
Yup totally agree, I'm nervous about the idea of inferring things based on whether the I think the right thing to do would be to make an API call before registering a new object and explicitly look up whether an object should be namespaced or not. |
another question around ns but different context, during the lifetime of a program, if a CRD is deleted and recreated at different scope (like This is quite restricted to my usecase and is of lesser priority to you, so any pointers that I can take a look into? |
Yep that's right. We need to get the list of API resources which will tell us if it is namespaced.
This seems like a wild edge case. In theory resources should never have their scope changed like this. I don't think it's reasonable to expect |
|
Yep very true. #256 covers this. |
With #432, it might be possible to call |
I'm not sure I would want to do this in |
Which project are you reporting a bug for?
kr8s
What happened?
Irrespective of the resource being marshaled into spec for custom objects, namespace is always set to
True
while creating new classes. It might be better to infer the scope from the spec.Pls do note that this might be a double edged sword, as there could be resources in the manifest w/o any namespace and during apply we could also supply namespace so inferring from the spec may not always be correct.
For creation of CRs at cluster scoped supplying namespace only results in warning but we are creating new_class out of it and so I believe surfacing an option during marshaling resources on how to infer namespace might be good enough.
First mentioned in #400
Anything else?
No response
The text was updated successfully, but these errors were encountered: