Skip to content

[pqc] Watch ConfigMap with global defaults produced by openstack-operator - #531

Merged
openshift-merge-bot[bot] merged 1 commit into
openstack-k8s-operators:mainfrom
fmount:tlsprofile
Nov 24, 2026
Merged

openshift-merge-bot[bot] merged 1 commit into
openstack-k8s-operators:mainfrom
fmount:tlsprofile

Conversation

@fmount

@fmount fmount commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

As part of the TLSProfile inheritance effort, this patch implements the consumer side of the feature. The openstack-operator reads the cluster TLSSecurityProfile and publishes it in a well-known ConfigMap that lib-common merges into the ConfigOptions of every rendered Template through ApplyTemplateDefaults. A watcher on that ConfigMap is registered through the generic interface lib-common provides, so the operator re-renders its configuration whenever the cluster-wide TLS defaults change.

Jira: https://redhat.atlassian.net/browse/OSPRH-41044

@openshift-ci
openshift-ci Bot requested review from SeanMooney and rlandy November 22, 2026 21:53
@coderabbitai

coderabbitai Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Summary

Summary by CodeRabbit

  • New Features
    • Changes to matching default-template ConfigMaps now trigger reconciliation, allowing the system to respond to updated configuration without waiting for another event.
    • The controller now monitors these configuration changes alongside its existing watched resources.

The change grants ConfigMap read, list, and watch permissions and adds a ConfigMap watch to the WatcherAPI controller. Matching default-template ConfigMap changes enqueue reconciliations.

Changes: WatcherAPI ConfigMap watch

Layer / File(s) Summary
ConfigMap watch and permissions
config/rbac/role.yaml, internal/controller/watcherapi_controller.go
RBAC rules grant get, list, and watch access to ConfigMaps. The WatcherAPI controller watches matching default-template ConfigMap changes and enqueues reconciliations.

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Feature

Merge Risk: Minimal · up to 0b756

The WatcherAPI controller now re-reconciles when the cluster TLS profile ConfigMap changes, and it has the read access it needs. No concrete merge-blocking risk was found.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: the operator now watches the ConfigMap that carries the global TLS defaults from openstack-operator. The '[pqc]' prefix is a Jira-style tag and does not hide the chang…
Description check Passed The description explains the consumer side of TLSProfile inheritance. It states that openstack-operator publishes the cluster TLSSecurityProfile in a ConfigMap, and that the watcher re-renders configu…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: the operator now watches the ConfigMap that carries the global TLS defaults from openstack-operator. The '[pqc]' prefix is a Jira-style tag and does not hide the change. The title is specific and matches the RBAC and controller watch changes in the summary.

Full details: Description check

Explanation

The description explains the consumer side of TLSProfile inheritance. It states that openstack-operator publishes the cluster TLSSecurityProfile in a ConfigMap, and that the watcher re-renders configuration when that ConfigMap changes. This matches the controller watch and RBAC changes. It also links the Jira issue.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Central YAML (base), Organization UI (inherited)
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 1ed46850-9dca-44b0-9e24-9afe6194f3ea
Commits

Reviewing files that changed from the base of the PR and between 68fe956 and 0b75634.

Files selected for processing: 2

  • config/rbac/role.yaml
  • internal/controller/watcherapi_controller.go

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@centosinfra-prod-github-app

Copy link
Copy Markdown

Build succeeded (check pipeline).
https://gateway-cloud-softwarefactory.apps.ocp.cloud.ci.centos.org/zuul/t/rdoproject.org/buildset/caaab6bdbf72475e983faba9624a1fa4

✔️ openstack-k8s-operators-content-provider SUCCESS in 2h 26m 21s
✔️ watcher-s2i-content-provider SUCCESS in 2h 47m 27s
✔️ watcher-operator-validation-master SUCCESS in 2h 04m 20s
✔️ watcher-operator-validation-master-ceph SUCCESS in 1h 49m 09s
✔️ noop SUCCESS in 0s
✔️ watcher-operator-kuttl SUCCESS in 53m 57s

Warning:
File .ssh/config found in build home directory during playbook github.com/openstack-k8s-operators/s2i-openstack-containers/playbooks/container-ci/zuul/pre.yaml for job watcher-s2i-content-provider. Add to preserve-home-paths if safe, or otherwise remove.

As part of the TLSProfile inheritance effort, this patch implements the
"consumer" side of the feature in watcher-operator. The
openstack-operator reads the cluster TLSSecurityProfile and publishes it
in a well-known ConfigMap that lib-common merges into the ConfigOptions
of every rendered Template through ApplyTemplateDefaults. A watcher on
that ConfigMap is registered through the generic interface lib-common
provides, so watcher re-renders its configuration whenever the
cluster-wide TLS defaults change.
The reconciler lacked read access to ConfigMaps, so the rbac marker and
the generated role are extended with get/list/watch.

Co-Authored-By: Claude Code <noreply@anthropic.com>
Signed-off-by: Francesco Pantano <fpantano@redhat.com>
@centosinfra-prod-github-app

Copy link
Copy Markdown

Build succeeded (check pipeline).
https://gateway-cloud-softwarefactory.apps.ocp.cloud.ci.centos.org/zuul/t/rdoproject.org/buildset/c6f63c8fd4c745c38d9f07ddef95eec3

✔️ openstack-k8s-operators-content-provider SUCCESS in 2h 21m 07s
✔️ watcher-s2i-content-provider SUCCESS in 6h 01m 58s
✔️ watcher-operator-validation-master SUCCESS in 1h 57m 06s
✔️ watcher-operator-validation-master-ceph SUCCESS in 1h 53m 11s
✔️ noop SUCCESS in 0s
✔️ watcher-operator-kuttl SUCCESS in 51m 32s

Warning:
File .ssh/config found in build home directory during playbook github.com/openstack-k8s-operators/s2i-openstack-containers/playbooks/container-ci/zuul/pre.yaml for job watcher-s2i-content-provider. Add to preserve-home-paths if safe, or otherwise remove.

@stuggi stuggi 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

@amoralej

Copy link
Copy Markdown
Contributor

/approve

@openshift-ci

openshift-ci Bot commented Nov 24, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: amoralej

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 6b8433a into openstack-k8s-operators:main Nov 24, 2026
8 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