Skip to content

📖 Add update patch apply docs#5620

Closed
guettli wants to merge 9 commits into
kubernetes-sigs:masterfrom
guettli:add-update-patch-apply-docs
Closed

📖 Add update patch apply docs#5620
guettli wants to merge 9 commits into
kubernetes-sigs:masterfrom
guettli:add-update-patch-apply-docs

Conversation

@guettli
Copy link
Copy Markdown
Contributor

@guettli guettli commented Apr 14, 2026

Add docs about when to use Update, Patch, Apply.

@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: guettli
Once this PR has been reviewed and has the lgtm label, please assign camilamacedo86 for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot
Copy link
Copy Markdown
Contributor

Hi @guettli. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

Tip

We noticed you've done this a few times! Consider joining the org to skip this step and gain /lgtm and other bot rights. We recommend asking approvers on your previous PRs to sponsor you.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Apr 14, 2026
Align SUMMARY.md and reference.md nav entries with the page H1
("Choosing Between Update, Patch, and Apply"). Fix missing parentheses
on Status().Update() in the secondary-owned-resources aside.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@linux-foundation-easycla
Copy link
Copy Markdown

linux-foundation-easycla Bot commented Apr 14, 2026

CLA Missing ID CLA Not Signed

One or more co-authors of this pull request were not found. You must specify co-authors in commit message trailer via:

Co-authored-by: name <email>

Supported Co-authored-by: formats include:

  1. Anything <id+login@users.noreply.github.com> - it will locate your GitHub user by id part.
  2. Anything <login@users.noreply.github.com> - it will locate your GitHub user by login part.
  3. Anything <public-email> - it will locate your GitHub user by public-email part. Note that this email must be made public on Github.
  4. Anything <other-email> - it will locate your GitHub user by other-email part but only if that email was used before for any other CLA as a main commit author.
  5. login <any-valid-email> - it will locate your GitHub user by login part, note that login part must be at least 3 characters long.

Alternatively, if the co-author should not be included, remove the Co-authored-by: line from the commit message.

Please update your commit message(s) by doing git commit --amend and then git push [--force] and then request re-running CLA check via commenting on this pull request:

/easycla

@k8s-ci-robot k8s-ci-robot added cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. and removed cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Apr 14, 2026
Copy link
Copy Markdown
Member

@camilamacedo86 camilamacedo86 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this.

I initially thought this would be about WithFieldValidation (#5208), rather than PUT/PATCH/APPLY methods—but I appreciate you raising this.

That said, this section feels a bit over-described and not fully accurate.
I think this could be simplified to a short note, for example:

Use PUT for replacement-style updates and PATCH for partial updates. In Kubernetes, server-side apply is implemented as a specialized PATCH operation. See: https://kubernetes.io/docs/reference/using-api/api-concepts/

I am not sure where the note would fit better.
Maybe when we support SSA (#5458) we can add that.

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 17, 2026
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 21, 2026
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Apr 21, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds new reference documentation to help Kubebuilder/controller authors choose between Update, Patch, and server-side Apply when reconciling Kubernetes objects.

Changes:

  • Adds a new reference page explaining tradeoffs and recommended usage of Update, Patch, and Apply.
  • Links the new page from the reference index.
  • Adds the new page to the book SUMMARY navigation.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
docs/book/src/reference/update-patch-apply.md New doc page describing when to use Update vs Patch vs server-side Apply.
docs/book/src/reference/reference.md Adds the new doc page to the Reference section listing.
docs/book/src/SUMMARY.md Adds the new doc page to the book navigation sidebar.

@camilamacedo86
Copy link
Copy Markdown
Member

Hi @guettli

Based on this #5620 (review) I am closing this one as defered. I hope that you do not mind.

If you do not agree please feel free to re-open, Also,see that you need sign CLA to allow us get any contribution merged. Thank you so much for your help and input.

Cheers,

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

Labels

cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants