Skip to content

Replace kube API patch and merge directives with Server side Apply directives #258

Description

@SpaceFace02

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:

  1. https://clustersandcoffee.substack.com/p/the-beauty-of-kubernetes-server-side
  2. https://kubernetes.io/docs/reference/using-api/server-side-apply/

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions