kubernetes-client: KubernetesMockServer regression for patch including status
Hi,
the 5.4.0 release contains a regression in the KubernetesMockServer when patching a resource containing the status field.
The following code triggers the patch of our Checkmarx custom resource
k8s.checkmarxs()
.inNamespace(cr.metadata.namespace)
.withName(cr.metadata.name)
.patch(cr)
This results in the following patch operation
--> PATCH https://127.0.0.1:56702/apis/beekeeper.sap.it/v1alpha1/namespaces/default/checkmarxs/test
Content-Type: application/json-patch+json; charset=utf-8
Content-Length: 188
[{"op":"replace","path":"/status","value":{"status":"FAILED","serviceAccounts":[],"secrets":[],"configmaps":[],"tasks":[],"pipelines":[]}}]
Pre 5.4.0 and when targeting a real k8s cluster, the status of the CR is updated. With 5.4.0 the status is not updated. I assume this was introduced with https://github.com/fabric8io/kubernetes-client/pull/3092
Thanks, Fabian
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 18 (17 by maintainers)
Commits related to this issue
- fix #3144: making the crud mock logic more crd aware also working around making the namespace available from the path — committed to shawkins/kubernetes-client by shawkins 3 years ago
- fix #3144: making the crud mock logic more crd aware also working around making the namespace available from the path — committed to shawkins/kubernetes-client by shawkins 3 years ago
- fix #3144: making the crud mock logic more crd aware also working around making the namespace available from the path — committed to shawkins/kubernetes-client by shawkins 3 years ago
- fix fabric8io#3144: making the crud mock logic more crd aware also working around making the namespace and kind available from the path — committed to shawkins/kubernetes-client by shawkins 3 years ago
- fix fabric8io#3144: making the crud mock logic more crd aware also working around making the namespace and kind available from the path — committed to shawkins/kubernetes-client by shawkins 3 years ago
- fix fabric8io#3144: making the crud mock logic more crd aware also working around making the namespace and kind available from the path — committed to shawkins/kubernetes-client by shawkins 3 years ago
- fix #3144 #3194: making the crud mock logic more crd aware also working around making the namespace and kind available from the path — committed to shawkins/kubernetes-client by shawkins 3 years ago
- fix #3144 #3194: making the crud mock logic more crd aware also working around making the namespace and kind available from the path — committed to shawkins/kubernetes-client by shawkins 3 years ago
I’ve converted https://github.com/shawkins/kubernetes-client/pull/4 to #3156