openshift client forces 'Accept' header on each HTTP request
ffromani opened this issue · 4 comments
The openshift dynamic client adds the 'Accept' header into each HTTP request.
This leads to error 406 when PUTting resources, like for example https://github.com/kubevirt/client-python/blob/master/docs/DefaultApi.md#restart - note this works just fine empty body.
This issue can be sidestepped using the plain k8s client contained in the openshift client, which works just fine.
Example snippet:
import kubernetes
from openshift.dynamic import DynamicClient
...
client = DynamicClient(kubernetes.config.new_client_from_config())
...
url = "%s/apis/subresources.kubevirt.io/v1alpha3/namespaces/%s/virtualmachines/%s" % (client.configuration.host, NS, NAME)
# FAILS
client.request("PUT", "%s/start" % url)
# SUCCEEDS
client.client.request("PUT", "%s/start" % url)
Issues go stale after 90d of inactivity.
Mark the issue as fresh by commenting /remove-lifecycle stale
.
Stale issues rot after an additional 30d of inactivity and eventually close.
Exclude this issue from closing by commenting /lifecycle frozen
.
If this issue is safe to close now please do so with /close
.
/lifecycle stale
Stale issues rot after 30d of inactivity.
Mark the issue as fresh by commenting /remove-lifecycle rotten
.
Rotten issues close after an additional 30d of inactivity.
Exclude this issue from closing by commenting /lifecycle frozen
.
If this issue is safe to close now please do so with /close
.
/lifecycle rotten
/remove-lifecycle stale
Rotten issues close after 30d of inactivity.
Reopen the issue by commenting /reopen
.
Mark the issue as fresh by commenting /remove-lifecycle rotten
.
Exclude this issue from closing again by commenting /lifecycle frozen
.
/close
@openshift-bot: Closing this issue.
In response to this:
Rotten issues close after 30d of inactivity.
Reopen the issue by commenting
/reopen
.
Mark the issue as fresh by commenting/remove-lifecycle rotten
.
Exclude this issue from closing again by commenting/lifecycle frozen
./close
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.