Description
While using CreateOrUpdate
with resources that get defaulted it can return OperationResultUpdated
despite there being no updates. I'm not concerned that the call to Update
is happening, the same values get defaulted. But I think returning OperationResultUpdated
is wrong since nothing was actually updated. I think that OperationResultUpdated
should only be returned when the ResourceVersion
is not equal to the original.
https://github.com/kubernetes-sigs/controller-runtime/compare/master...mcristina422:cmpResourseVersion?expand=1#diff-4c146d38c03cf55e321de9ad53af4452R220-R238
I originally came across this issue setting ports on Service
similar to #464 (comment)
I recreated the issue in a Deployment
with my proposed fix in https://github.com/kubernetes-sigs/controller-runtime/compare/master...mcristina422:cmpResourseVersion?expand=1
@DirectXMan12 do you think my proposal makes sense