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
FakeClient patch on any subresource other than status is not working.
For identifying if the last patch call was to update the status sub resource here we check if the stack trace has sigs.k8s.io/controller-runtime/pkg/client/fake.(*fakeSubResourceClient).Patch, and if true only allow to update status.
This is wrong as sigs.k8s.io/controller-runtime/pkg/client/fake.(*fakeSubResourceClient).Patch will be present in the stack trace if a patch is done on any subresource.
For ex, Patching scale subresource in deployment will also have sigs.k8s.io/controller-runtime/pkg/client/fake.(*fakeSubResourceClient).Patch in the stack trace because of which the code above will identify it as a status subresource update call and will not allow spec(replica) change in deployment.
Issues introduced with #2259
controller-runtime version - v0.16.2
The text was updated successfully, but these errors were encountered:
FakeClient patch on any subresource other than status is not working.
For identifying if the last patch call was to update the status sub resource here we check if the stack trace has
sigs.k8s.io/controller-runtime/pkg/client/fake.(*fakeSubResourceClient).Patch
, and if true only allow to update status.This is wrong as
sigs.k8s.io/controller-runtime/pkg/client/fake.(*fakeSubResourceClient).Patch
will be present in the stack trace if a patch is done on any subresource.For ex, Patching
scale
subresource in deployment will also havesigs.k8s.io/controller-runtime/pkg/client/fake.(*fakeSubResourceClient).Patch
in the stack trace because of which the code above will identify it as a status subresource update call and will not allow spec(replica) change in deployment.Issues introduced with #2259
controller-runtime version - v0.16.2
The text was updated successfully, but these errors were encountered: