You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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 pip install kopf.
In 10.0.0, they have changed the content-type from application/merge-patch+json (a dict with fields to override) to application/json-patch+json (a list of operations per field, see wikipedia).
The data sent by Kopf was a dict as per application/merge-patch+json, and it worked until 10.0.0.
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.
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
)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
kubernetes==10.0.0
only, which was released 03.07.2019 @ ~23:00 (this past night): https://github.com/kubernetes-client/python/releases/tag/v10.0.0It 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
pip install kopf
.Found the cause (and added it to kubernetes-client/python#866, with links):
In 10.0.0, they have changed the content-type from
application/merge-patch+json
(a dict with fields to override) toapplication/json-patch+json
(a list of operations per field, see wikipedia).The data sent by Kopf was a dict as per
application/merge-patch+json
, and it worked until 10.0.0.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
kubernetes>=10.0.1
some time ago.The text was updated successfully, but these errors were encountered: