I was using patcher in a project and discovered the hard way that it doesn't actually patch secrets.
The reason behind that is to do with this logic:
|
func (h *Helper) patch(ctx context.Context, obj client.Object, opts ...client.PatchOption) error { |
|
if !h.shouldPatch("metadata") && !h.shouldPatch("spec") { |
|
return nil |
|
} |
So it very deliberately checks spec field, which is something secrets and configmaps don't have.
I was using patcher in a project and discovered the hard way that it doesn't actually patch secrets.
The reason behind that is to do with this logic:
pkg/runtime/patch/patch.go
Lines 239 to 242 in a04ccbf
So it very deliberately checks
specfield, which is something secrets and configmaps don't have.