Currently in this update_status macro, we are making use of kube client PATCH directive which does a client side diffing and updates the CRD.
There are other places where we've used client side directives, but those are single owner scenarious (here and here)
We have used SSA (Server side Apply) here, which prevents race conditions better than client side Patch or Merge.
SSA introduces a managedFields field in the CRD, which ensures that controllers only update the sections they are responsible for. This prevents concurrent overwrites and last-write-win conditions.
references:
- https://clustersandcoffee.substack.com/p/the-beauty-of-kubernetes-server-side
- https://kubernetes.io/docs/reference/using-api/server-side-apply/
Currently in this update_status macro, we are making use of kube client PATCH directive which does a client side diffing and updates the CRD.
There are other places where we've used client side directives, but those are single owner scenarious (here and here)
We have used SSA (Server side Apply) here, which prevents race conditions better than client side Patch or Merge.
SSA introduces a managedFields field in the CRD, which ensures that controllers only update the sections they are responsible for. This prevents concurrent overwrites and last-write-win conditions.
references: