-
Notifications
You must be signed in to change notification settings - Fork 88
Sample from docs error: Reason: Unsupported Media Type #134
Comments
@Atoms Thanks for reporting. I could reproduce it locally — will take a look later. As a quick workaround, please install the Kubernetes client version 9:
The error happens with It seems, the error comes from the custom resource patching call. Kopf does not specify any media-/content-type, it is the client library's internals. So, it looks like an error in the client library itself — I will investigate further. Perhaps, switching to pykube-ng (#15) can solve the issue, as there we specify the exact Content-Type of the patch. |
yes, i already tried to downgrade and it works, you know more internals of kopf and how it uses kubernetes client, can you open issue within kubernetes-client, and i think as workaround is there this can be closed as it's not kopf issue. P.S. just started with kopf |
Created kubernetes-client/python#866 with a reproducible example (unrelated to Kopf). |
Meanwhile, I've released kopf==0.17.post1 hotfix with kubernetes<10.0.0 restriction — just to have it runnable by default, i.e. when using |
Found the cause (and added it to kubernetes-client/python#866, with links): In 10.0.0, they have changed the content-type from The data sent by Kopf was a dict as per At the moment, there is no way how we can control the content-type used by Kubernetes client — the content-type selection is hard-coded, and does not depend on the content data itself. In pykube-ng branch of Kopf, the content type is specified by us explicitly. So, this problem will not appear there. |
So far, the issue was fixed with |
Expected Behavior
object added and on.create handler is run
Actual Behavior
Steps to Reproduce the Problem
Specifications
minikube
kubectl version
)python --version
)Python 3.7.3
pip freeze --all
)The text was updated successfully, but these errors were encountered: