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

Most upvoted comments