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

Patch operations fail with a 415 error #32

Closed
Rodeoclash opened this issue Jul 2, 2019 · 4 comments · Fixed by #35
Closed

Patch operations fail with a 415 error #32

Rodeoclash opened this issue Jul 2, 2019 · 4 comments · Fixed by #35
Labels
bug Something isn't working good first issue Good for newcomers
Milestone

Comments

@Rodeoclash
Copy link

Rodeoclash commented Jul 2, 2019

Patch operations to the K8s API require a slightly different header from other operations, that is: Content-Type: application/merge-patch+json

Unless that header is present, the request will fail with: 415: Unsupported Media Type

Further details can be found in: kubernetes/kubernetes#61103

Looks like this fix would be located in: https://github.com/coryodaniel/k8s/blob/master/lib/k8s/client/http_provider.ex#L90 unless I'm misunderstanding something about the HTTP client. I can pick this one up shortly.

@coryodaniel
Copy link
Owner

The hard coded headers could probably be moved to K8s.Operation in a map like verbs/methods.

@coryodaniel coryodaniel added this to the 0.3 milestone Jul 3, 2019
@coryodaniel coryodaniel added bug Something isn't working good first issue Good for newcomers labels Jul 3, 2019
@coryodaniel
Copy link
Owner

@Rodeoclash mind giving that a whirl?

@Rodeoclash
Copy link
Author

@coryodaniel Hey, looks like you beat me to it! Just pulled master and it's working a charm 👍

@coryodaniel
Copy link
Owner

coryodaniel commented Jul 4, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants