Skip to content

Add application credential finalizer management#593

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

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

Conversation

@Deydra71

@Deydra71 Deydra71 commented Apr 23, 2026

Copy link
Copy Markdown
Contributor

Jira: OSPRH-29269

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/octaviaapi-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 Octavia is still consuming it.

2026-04-28T11:53:27Z	INFO	Controllers.OctaviaAPI	Added consumer finalizer	{"controller": "octaviaapi", "controllerGroup": "octavia.openstack.org", "controllerKind": "OctaviaAPI", "OctaviaAPI": {"name":"octavia-api","namespace":"openstack"}, "namespace": "openstack", "name": "octavia-api", "reconcileID": "e303e661-8bd8-4f4a-b374-aea01506cc6d", "object": "ac-octavia-dd60c-secret", "finalizer": "openstack.org/octaviaapi-ac-consumer"}
2026-04-28T11:53:27Z	INFO	Controllers.OctaviaAPI	Removed consumer finalizer	{"controller": "octaviaapi", "controllerGroup": "octavia.openstack.org", "controllerKind": "OctaviaAPI", "OctaviaAPI": {"name":"octavia-api","namespace":"openstack"}, "namespace": "openstack", "name": "octavia-api", "reconcileID": "e303e661-8bd8-4f4a-b374-aea01506cc6d", "object": "ac-octavia-ff4f3-secret", "finalizer": "openstack.org/octaviaapi-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 dprince and gibizer April 23, 2026 14:05
@Deydra71 Deydra71 changed the title Add AC finalizer management Add application credential finalizer management Apr 23, 2026
@Deydra71 Deydra71 force-pushed the appcred-finalizer branch from 2c17f68 to 514f067 Compare April 24, 2026 10:46
@Deydra71 Deydra71 force-pushed the appcred-finalizer branch from 514f067 to 5c63dc8 Compare April 27, 2026 08:18
@Deydra71 Deydra71 force-pushed the appcred-finalizer branch from 5c63dc8 to 0f927b4 Compare May 20, 2026 10:53
@Deydra71

Copy link
Copy Markdown
Contributor Author

/test octavia-operator-build-deploy-kuttl

Signed-off-by: Veronika Fisarova <vfisarov@redhat.com>
@Deydra71 Deydra71 force-pushed the appcred-finalizer branch from 0f927b4 to ca46aac Compare May 25, 2026 10:01
@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.

@Deydra71 Deydra71 requested a review from fmount May 27, 2026 08:14

@fmount fmount left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci Bot added the lgtm label May 27, 2026
@fmount fmount requested review from abays and removed request for gibizer May 27, 2026 10:57
@gthiemonge

Copy link
Copy Markdown
Contributor

/approve

@openshift-ci openshift-ci Bot added the approved label Jun 4, 2026
@openshift-ci

openshift-ci Bot commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

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

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

@openshift-merge-bot openshift-merge-bot Bot merged commit 604ed88 into openstack-k8s-operators:main Jun 4, 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.

3 participants