Skip to content

Add application credential finalizer management#643

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

Add application credential finalizer management#643
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/heat-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 Heat is still consuming it.

2026-04-28T11:55:51Z	INFO	Controllers.Heat	Added consumer finalizer	{"controller": "heat", "controllerGroup": "heat.openstack.org", "controllerKind": "Heat", "Heat": {"name":"heat","namespace":"openstack"}, "namespace": "openstack", "name": "heat", "reconcileID": "82672178-a3a3-4bd4-b3d5-87c6d5853d9b", "object": "ac-heat-aa0a4-secret", "finalizer": "openstack.org/heat-ac-consumer"}
2026-04-28T11:55:51Z	INFO	Controllers.Heat	Removed consumer finalizer	{"controller": "heat", "controllerGroup": "heat.openstack.org", "controllerKind": "Heat", "Heat": {"name":"heat","namespace":"openstack"}, "namespace": "openstack", "name": "heat", "reconcileID": "82672178-a3a3-4bd4-b3d5-87c6d5853d9b", "object": "ac-heat-ba179-secret", "finalizer": "openstack.org/heat-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 abays and dprince April 23, 2026 14:06
@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 d14e484 to ec6c565 Compare April 24, 2026 10:49
@Deydra71 Deydra71 force-pushed the appcred-finalizer branch from ec6c565 to 60522f3 Compare April 27, 2026 08:20

@bshephar bshephar 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.

I'm an outsider now, as an outsider it would be nice to have some more context about this change in the commit message. :)

Maybe it's still a WIP, but there's a few important things I've noted in-line.

Comment thread internal/controller/heat_controller.go
Comment thread internal/controller/heat_controller.go Outdated
@openshift-ci

openshift-ci Bot commented May 1, 2026

Copy link
Copy Markdown
Contributor

@bshephar: changing LGTM is restricted to collaborators

Details

In response to this:

I'm an outsider now, as an outsider it would be nice to have some more context about this change in the commit message. :)

Maybe it's still a WIP, but there's a few important things I've noted in-line.

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-sigs/prow repository.

@Deydra71 Deydra71 force-pushed the appcred-finalizer branch from 60522f3 to 4e9ab56 Compare May 4, 2026 06:33
@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/rdo/buildset/849a9504196145fea3f5e5dbc21e1456

✔️ openstack-k8s-operators-content-provider SUCCESS in 1h 56m 15s
heat-operator-tempest-multinode FAILURE in 1h 36m 21s

@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/595b169ceb084e46ae2d6f70db2a7b00

openstack-k8s-operators-content-provider FAILURE in 4m 09s
⚠️ heat-operator-tempest-multinode SKIPPED Skipped due to failed job openstack-k8s-operators-content-provider

@Deydra71

Copy link
Copy Markdown
Contributor Author

/test heat-operator-build-deploy-kuttl

@Deydra71

Copy link
Copy Markdown
Contributor Author

recheck

@Deydra71 Deydra71 force-pushed the appcred-finalizer branch from 32c942f to 422f1b9 Compare May 25, 2026 11:38
@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.

The new file api_fixture.go: heat's functional tests need a fake Keystone HTTP server to satisfy Keystone calls. SImilar pattern is used e.g. in octavia-operator - https://github.com/openstack-k8s-operators/octavia-operator/blob/main/test/functional/api_fixture.go

@Deydra71 Deydra71 requested a review from rabi May 28, 2026 13:28
Heat now tracks which AC secret it is consuming via Status.ApplicationCredentialSecret and manages the openstack.org/heat-ac-consumer finalizer on that secret. This ensures keystone-operator does not prematurely revoke the application credential while Heat is still using it. On rotation (when the spec reference changes), the finalizer is moved from the old secret to the new one. On Heat CR deletion, the finalizer is cleaned up from all referenced secrets.

Signed-off-by: Veronika Fisarova <vfisarov@redhat.com>
Comment thread api/v1beta1/heat_types.go
Comment thread internal/controller/heat_controller.go
@Deydra71

Deydra71 commented Jun 5, 2026

Copy link
Copy Markdown
Contributor Author

@rabi Hi! Is there still any requested change/clarification on your side, or we ready to merge?

@Deydra71 Deydra71 requested a review from rabi June 5, 2026 07:14
@openshift-ci openshift-ci Bot added the lgtm label Jun 5, 2026
@openshift-ci

openshift-ci Bot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

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

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-ci openshift-ci Bot added the approved label Jun 5, 2026
@Deydra71

Deydra71 commented Jun 5, 2026

Copy link
Copy Markdown
Contributor Author

/test heat-operator-build-deploy-kuttl

failed during install_yamls deploy

@openshift-merge-bot openshift-merge-bot Bot merged commit 30a543f into openstack-k8s-operators:main Jun 5, 2026
7 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