diff --git a/pkg/client/fake/client.go b/pkg/client/fake/client.go index 69bc3d66db..7f9f87f265 100644 --- a/pkg/client/fake/client.go +++ b/pkg/client/fake/client.go @@ -29,7 +29,19 @@ import ( "sync" "time" - // Using v4 to match upstream + /* + Stick with gopkg.in/evanphx/json-patch.v4 here to match + upstream Kubernetes code and avoid breaking changes introduced in v5. + - Kubernetes itself remains on json-patch v4 to avoid compatibility issues + tied to v5’s stricter RFC6902 compliance. + - The fake client code is adapted from client-go’s testing fixture, which also + relies on json-patch v4. + See: + https://github.com/kubernetes/kubernetes/pull/91622 (discussion of why K8s + stays on v4) + https://github.com/kubernetes/kubernetes/pull/120326 (v5.6.0+incompatible + missing a critical fix) + */ jsonpatch "gopkg.in/evanphx/json-patch.v4" appsv1 "k8s.io/api/apps/v1" authenticationv1 "k8s.io/api/authentication/v1" @@ -1138,7 +1150,7 @@ func (c *fakeClient) deleteObjectLocked(gvr schema.GroupVersionResource, accesso } } - //TODO: implement propagation + // TODO: implement propagation return c.tracker.Delete(gvr, accessor.GetNamespace(), accessor.GetName()) }