Skip to content

ROX-33584: Migrate cert monitor to controller-runtime#2624

Merged
kovayur merged 2 commits intomainfrom
yury/certmon-controller-runtime
Mar 16, 2026
Merged

ROX-33584: Migrate cert monitor to controller-runtime#2624
kovayur merged 2 commits intomainfrom
yury/certmon-controller-runtime

Conversation

@kovayur
Copy link
Copy Markdown
Contributor

@kovayur kovayur commented Mar 12, 2026

Description

  • Migrate cert monitor to controller-runtime
  • Use label selector rhacs.redhat.com/tls to filter only stackrox TLS secrets
  • Increase sync interval from 1 minute to 30 minutes
  • Do not watch namespaces

Checklist (Definition of Done)

  • Unit and integration tests added
  • Added test description under Test manual
  • Documentation added if necessary (i.e. changes to dev setup, test execution, ...)
  • CI and all relevant tests are passing
  • Add the ticket number to the PR title if available, i.e. ROX-12345: ...
  • Discussed security and business related topics privately. Will move any security and business related topics that arise to private communication channel.
  • Add secret to app-interface Vault or Secrets Manager if necessary
  • RDS changes were e2e tested manually
  • Check AWS limits are reasonable for changes provisioning new resources

Test manual

TODO: Add manual testing efforts

# To run tests locally run:
make db/teardown db/setup db/migrate
make ocm/setup
make verify lint binary test test/integration

@kovayur kovayur force-pushed the yury/certmon-controller-runtime branch from ae82fc1 to 8ff7fd3 Compare March 13, 2026 13:33
@kovayur kovayur force-pushed the yury/certmon-controller-runtime branch from 8ff7fd3 to 3653fdb Compare March 13, 2026 13:58
@kovayur kovayur requested a review from johannes94 March 13, 2026 16:08
Copy link
Copy Markdown
Contributor

@johannes94 johannes94 left a comment

Choose a reason for hiding this comment

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

LGTM 👍

if len(selectorConfig.Name) != 0 && selectorConfig.LabelSelector != nil {
errs = append(errs, field.Invalid(path, selectorConfig, "cannot specify both name and label selector"))
func cacheOptions() ctrlcache.Options {
syncPeriod := syncPeriod
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.

Out of curiosity what's the reason for this local copy?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

To take the address of a local variable (line 167), I can't take an address of the constant.

Copy link
Copy Markdown
Contributor

@johannes94 johannes94 Mar 16, 2026

Choose a reason for hiding this comment

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

I see. Just FYI, since we're not at Go 1.26 yet. with Go 1.26 you can use new with the expressions like constants

@openshift-ci openshift-ci bot added the lgtm label Mar 16, 2026
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Mar 16, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: johannes94, kovayur

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

@kovayur
Copy link
Copy Markdown
Contributor Author

kovayur commented Mar 16, 2026

/retest

@kovayur kovayur force-pushed the yury/certmon-controller-runtime branch from e0378ca to 132cea0 Compare March 16, 2026 09:46
@openshift-ci openshift-ci bot removed the lgtm label Mar 16, 2026
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci bot commented Mar 16, 2026

New changes are detected. LGTM label has been removed.

@kovayur kovayur merged commit 805d47e into main Mar 16, 2026
14 checks passed
@kovayur kovayur deleted the yury/certmon-controller-runtime branch March 16, 2026 11:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants