Skip to content

Conversation

sdowell
Copy link
Contributor

@sdowell sdowell commented Oct 13, 2025

This change adds a new actuation feature to the applier which allows objects to be created but not updated. This is useful in cases where the user wants to create the object if it does not exists, but then allow other clients to make updates to the object that are not reverted by the applier.

The feature is used by providing the ignore mutation annotation on the declared object.

This change adds a new actuation feature to the applier which allows
objects to be created but not updated. This is useful in cases where the
user wants to create the object if it does not exists, but then allow
other clients to make updates to the object that are not reverted by the
applier.

The feature is used by providing the ignore mutation annotation on the
declared object.
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Oct 13, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

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

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

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 k8s-ci-robot requested review from ash2k and soltysh October 13, 2025 22:05
@sdowell
Copy link
Contributor Author

sdowell commented Oct 13, 2025

/assign @mortent

@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Oct 13, 2025
return fmt.Sprintf("annotation prevents apply (%q: %q)", e.Annotation, e.Value)
}

func (e *AnnotationPreventedUpdateError) Is(err error) bool {
Copy link
Member

Choose a reason for hiding this comment

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

How will this function be used? I'm a bit confused as to why this is on the AnnotationPreventedUpdateError struct.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is following a similar pattern to the other Filter implementations, for example:

These errors are returned as events by the applier, so the caller of the applier can check the events and act on specific errors if desired. (That's my understanding of the primary use case)

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

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants