Skip to content

Add application credential finalizer management#466

Merged
openshift-merge-bot[bot] merged 1 commit into
openstack-k8s-operators:mainfrom
Deydra71:appcred-finalizer
May 26, 2026
Merged

Add application credential finalizer management#466
openshift-merge-bot[bot] merged 1 commit into
openstack-k8s-operators:mainfrom
Deydra71:appcred-finalizer

Conversation

@Deydra71
Copy link
Copy Markdown
Contributor

@Deydra71 Deydra71 commented Apr 8, 2026

Jira: OSPRH-27509

Application Credential dev-doc: https://github.com/openstack-k8s-operators/dev-docs/blob/main/application_credentials.md

  • Tracks the active AC secret name in Status.ApplicationCredentialSecret
  • Add openstack.org/swift-ac-consumer finalizer to the AC secret after service config is rendered
  • On AC rotation, move the finalizer from the old secret to the new one
  • On CR deletion, remove the consumer finalizer from the AC secret before cleaning up the CR

This ensures that the keystone-operator cannot revoke a rotated AC secret while Swift is still consuming it.

2026-04-28T11:52:38Z	INFO	Controllers.SwiftProxy	Added consumer finalizer	{"controller": "swiftproxy", "controllerGroup": "swift.openstack.org", "controllerKind": "SwiftProxy", "SwiftProxy": {"name":"swift-proxy","namespace":"openstack"}, "namespace": "openstack", "name": "swift-proxy", "reconcileID": "c1073a8a-7a0e-4fa5-b3f3-055d34e7740b", "object": "ac-swift-29490-secret", "finalizer": "openstack.org/swiftproxy-ac-consumer"}
2026-04-28T11:52:38Z	INFO	Controllers.SwiftProxy	Removed consumer finalizer	{"controller": "swiftproxy", "controllerGroup": "swift.openstack.org", "controllerKind": "SwiftProxy", "SwiftProxy": {"name":"swift-proxy","namespace":"openstack"}, "namespace": "openstack", "name": "swift-proxy", "reconcileID": "c1073a8a-7a0e-4fa5-b3f3-055d34e7740b", "object": "ac-swift-9299b-secret", "finalizer": "openstack.org/swiftproxy-ac-consumer"}

Depends-On: openstack-k8s-operators/keystone-operator#685

Assisted-by: Claude Opus 4.6 noreply@anthropic.com

@openshift-ci openshift-ci Bot requested review from fmount and stuggi April 8, 2026 07:11
@Deydra71 Deydra71 requested a review from cschwede April 8, 2026 07:11
@softwarefactory-project-zuul
Copy link
Copy Markdown

Build failed (check pipeline). Post recheck (without leading slash)
to rerun all jobs. Make sure the failure cause has been resolved before
you rerun jobs.

https://softwarefactory-project.io/zuul/t/rdoproject.org/buildset/2149808219c047b3bdc2a60b7057ee80

openstack-k8s-operators-content-provider FAILURE in 9m 35s
⚠️ swift-operator-kuttl SKIPPED Skipped due to failed job openstack-k8s-operators-content-provider
⚠️ swift-operator-tempest SKIPPED Skipped due to failed job openstack-k8s-operators-content-provider

@centosinfra-prod-github-app
Copy link
Copy Markdown

Build failed (check pipeline). Post recheck (without leading slash)
to rerun all jobs. Make sure the failure cause has been resolved before
you rerun jobs.

https://gateway-cloud-softwarefactory.apps.ocp.cloud.ci.centos.org/zuul/t/rdoproject.org/buildset/68edc6a7779f41e792f8aa9f7c505523

openstack-k8s-operators-content-provider FAILURE in 4m 02s
⚠️ swift-operator-kuttl SKIPPED Skipped due to failed job openstack-k8s-operators-content-provider
⚠️ swift-operator-tempest SKIPPED Skipped due to failed job openstack-k8s-operators-content-provider

@Deydra71
Copy link
Copy Markdown
Contributor Author

recheck

Signed-off-by: Veronika Fisarova <vfisarov@redhat.com>
@Deydra71
Copy link
Copy Markdown
Contributor Author

Following the discussion in watcher-operator the AC finalizer management is now split into two phases:

  • Early phase: adds consumer finalizer to the new AC secret immediately (protects it from premature revocation)
  • Late phase: removes consumer finalizer from the old AC secret only after AllSubConditionIsTrue() (all sub-services deployed with new credentials)

This prevents a race condition where rapid AC rotations could revoke credentials still in use by running pods.

Copy link
Copy Markdown
Contributor

@fmount fmount left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 26, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Deydra71, fmount

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

The pull request process is described 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

@fmount
Copy link
Copy Markdown
Contributor

fmount commented May 26, 2026

The patch is in line with what we did in the other storage operators.

@openshift-merge-bot openshift-merge-bot Bot merged commit 08378e9 into openstack-k8s-operators:main May 26, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants