-
Notifications
You must be signed in to change notification settings - Fork 168
Allow passing headers per request #268
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
We have patch entity, would that serve your use case @grosser ? def patch_entity(resource_name, name, patch, namespace = nil)
ns_prefix = build_namespace_prefix(namespace)
handle_exception do
rest_client[ns_prefix + resource_name + "/#{name}"]
.patch(
patch.to_json,
{ 'Content-Type' => 'application/strategic-merge-patch+json' }.merge(@headers)
)
end
end |
I need to change the |
Oh right, so it's |
idk ... was following an example and the default one did not work ... have not looked any deeper :D |
doc: https://kubernetes.io/docs/tasks/run-application/update-api-object-kubectl-patch/ Are there other use cases than patch to allow direct setting of headers? Current signature is |
@cben That awkwardness with the method signature is why I didn't try to add it in a PR myself - wasn't sure what the best way to handle it would be. It's also worth noting that some CustomResourceDefinitions may require this if they don't support strategic merge. |
Patch formats are covered by #357, more discussion there. Seems we're all reluctant about overloading existing method, so best direction is adding new methods eg. Closing as I'm not aware of other use cases for per-request headers, but I'm opening a new issue for HTTP requests to arbitrary paths... => #389 |
Atm I'm trying to update statefulset so I need to do this hack-around which is a bit ugly ...
The text was updated successfully, but these errors were encountered: