Skip to content

feat(servicecredentialbinding): make circuit breaker resumable - #351

Open
Kukkerem wants to merge 2 commits into
mainfrom
scb-circuit-breaker-pause-resume
Open

Kukkerem wants to merge 2 commits into
mainfrom
scb-circuit-breaker-pause-resume

Conversation

@Kukkerem

@Kukkerem Kukkerem commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Closes: #337

Problem

When a ServiceCredentialBinding reaches its create-attempt limit, it stops retrying for good. The only way to recover is to delete and recreate the resource. The limit is also hard-coded to 5.

Fix

  • When the limit is reached, the provider sets the annotation servicecredentialbinding.cloudfoundry.crossplane.io/max-retry-exceeded to the time it tripped, removes the create-attempts counter, and emits a CreateAttemptsExhausted Warning event.
  • While the annotation is present, reconciliation is paused and the provider makes no Cloud Foundry calls. Ready=False explains how to resume.
  • Removing the annotation resumes reconciliation straight away, with the full attempt budget.
  • Deleting the resource still works while it is paused: the finalizer is cleared and retired keys are cleaned up. Key rotation is skipped while the resource is being deleted.
  • New flag --scb-max-create-attempts (env SCB_MAX_CREATE_ATTEMPTS), default 5. A value below 1 stops the provider at startup.
  • Docs: new "Create failure protection" section in docs/end-user-guides/deploy-workload-provider-cf.mdx.

Testing

  • Unit tests cover tripping at the limit, pausing, resuming, deleting while paused, and a custom limit.
  • make reviewable passes (generate, lint, unit tests).
  • Manual:
    • Trip the breaker with a binding that fails. The annotation, the Warning event and the Ready=False message appear.
    • While paused, the provider makes no further Cloud Foundry calls.
    • Removing the annotation reconciles straight away and the binding gets created.
    • Deleting a paused binding completes.
    • Setting --scb-max-create-attempts changes the limit.

Signed-off-by: Zoltan Szabo <zoltan.szabo03@sap.com>
@Kukkerem Kukkerem added CF CF Provider release-notes/new-feature Marks PR as new feature for release note generation area/provider All Provider related issues labels Sep 30, 2026
@Kukkerem
Kukkerem requested a review from SatabdiG October 5, 2026 11:24

This branch has not been deployed

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

Labels

area/provider All Provider related issues CF CF Provider release-notes/new-feature Marks PR as new feature for release note generation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Annotation-based pause/resume for ServiceCredentialBinding circuit breaker

1 participant