Skip to content

Add updateable and deletable status guards for resources#685

Open
sapphirew wants to merge 2 commits intoaws-controllers-k8s:mainfrom
sapphirew:updateable-resource
Open

Add updateable and deletable status guards for resources#685
sapphirew wants to merge 2 commits intoaws-controllers-k8s:mainfrom
sapphirew:updateable-resource

Conversation

@sapphirew
Copy link
Copy Markdown

Issue #, if available:

Description of changes:

Add generator.yaml configuration and template functions that allow service controllers to declare which status field values permit update and delete operations. When a resource is not in an allowed state, the generated code requeues the operation with a configurable delay instead of attempting the API call.

New config blocks updateable and deletable on ResourceConfig accept a list of status field path + allowed-values conditions and an optional requeue_after_seconds override (default 30s). Template functions GoCodeResourceIsUpdateable and GoCodeResourceIsDeletable are injected into sdk_update, sdk_update_custom, sdk_update_set_attributes, and sdk_delete templates respectively.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

…IsDeletable template functions

Add GoCodeResourceIsUpdateable and GoCodeResourceIsDeletable entries to
controllerFuncMap in controller.go, following the same signature pattern
as GoCodeIsSynced. These template functions invoke the corresponding
code generation functions from updateable.go.
@ack-prow ack-prow bot requested review from a-hilaly and jlbutler April 6, 2026 06:54
@ack-prow
Copy link
Copy Markdown

ack-prow bot commented Apr 6, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: sapphirew
Once this PR has been reviewed and has the lgtm label, please assign jlbutler for approval by writing /assign @jlbutler in a comment. For more information see the Kubernetes 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

@ack-prow
Copy link
Copy Markdown

ack-prow bot commented Apr 6, 2026

@sapphirew: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
lambda-controller-test db32bcd link true /test lambda-controller-test

Full PR test history. Your PR dashboard.

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/test-infra repository. I understand the commands that are listed here.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant