-
Notifications
You must be signed in to change notification settings - Fork 26
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
Fix resource default namespacing #33
Conversation
…namespaced resources
This is a slightly more complex change to the behavior of the |
Tested that
|
Fixes #32 to create resources in the
config.context.namespace
if the resource YAML for a namespaced resource is missing themetadata.namespace
K8s::Client.config
now sets theK8s::Client@namespace
K8s::Client@namespace
is now used for all returnedK8s::ResourceClient
instancesK8s::APIClient
does not have any@namespace
, and I don't think it makes sense to have one thereK8s::APIClient#client_for_resource
ignores the namespace for non-namespaced resourcesK8s::Client#create_namespace
with a non-namespaced resource to not failK8s::ResourceClient
still raisesRuntimeError
if given a namespace for a non-namespaced resource typeK8s::ResourceClient
now always has a@namespace
set for namespaced resources (defaults to 'default'), and the@namespace
is only nil for non-namespaced resourcesclient.api('v1').resources('service').list
to no longer return all resources, but only the resources in the default namespace insteadclient.api('v1').resources('service').list(namespace: nil)