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

Handle namespace defaulting #10

Open
jnummelin opened this issue Aug 27, 2018 · 2 comments
Open

Handle namespace defaulting #10

jnummelin opened this issue Aug 27, 2018 · 2 comments
Labels
bug Something isn't working
Milestone

Comments

@jnummelin
Copy link
Contributor

Currently the namespace is a mandatory for each of the resources. Mortar could handle the namespace defaulting same way as kubectl does. The underlying k8s-client library has also some support for it coming, see kontena/k8s-client#33. It might be better to handle namespace defaulting actually on Mortar level rather than in the API client level.

@jnummelin jnummelin added the bug Something isn't working label Aug 27, 2018
@jnummelin jnummelin added this to the 0.2.0 milestone Aug 29, 2018
@jnummelin jnummelin modified the milestones: 0.2.0, 0.3.0 Sep 12, 2018
@jnummelin
Copy link
Contributor Author

The make this bit worse, the error is rather misleading:

/usr/local/lib/ruby/gems/2.5.0/gems/k8s-client-0.4.1/lib/k8s/transport.rb:192:in `parse_response’: POST /api/v1/services => HTTP 405 Method Not Allowed: the server does not allow this method on the requested resource (K8s::Error::MethodNotAllowed)

Without the namespace in the resources, k8s-client Mortar uses will POST the resources into wrong API endpoint...

@matti
Copy link
Contributor

matti commented Oct 27, 2018

so if you copy/paste a sample yaml from: https://kubernetes.io/docs/tasks/run-application/run-stateless-application-deployment/

it will bomb because of this

@jnummelin jnummelin modified the milestones: 0.3.0, 0.4.0 Oct 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants