Skip to content

CM-830: Add TrustManager controller for trust-manager operand management#422

Closed
openshift-app-platform-shift[bot] wants to merge 2 commits intocert-manager-1.18from
feature/controller-impl-1914-20260508124721
Closed

CM-830: Add TrustManager controller for trust-manager operand management#422
openshift-app-platform-shift[bot] wants to merge 2 commits intocert-manager-1.18from
feature/controller-impl-1914-20260508124721

Conversation

@openshift-app-platform-shift
Copy link
Copy Markdown

Summary

  • Implements the controller-runtime based reconciler for the TrustManager CRD (trustmanagers.operator.openshift.io/v1alpha1)
  • Manages the trust-manager operand lifecycle: ServiceAccount, RBAC (with dynamic SecretTargets rules), Certificate/Issuer, Services, DefaultCAPackage ConfigMap, and Deployment
  • Wires up the TrustManager controller-runtime manager in the operator startup, gated behind the FeatureTrustManager feature gate (Alpha, default disabled)
  • Follows the same patterns established by the IstioCSR controller: separate cache builder, label-based filtering, non-destructive cleanup on CR deletion

Related

Test plan

  • Verify go build ./... succeeds
  • Verify go vet ./... passes
  • Verify existing tests continue to pass
  • Enable TrustManager feature gate and verify controller starts
  • Create a TrustManager CR named cluster and verify all dependent resources are created
  • Verify DefaultCAPackage ConfigMap is created when policy is Enabled
  • Verify dynamic RBAC rules are applied when SecretTargets policy is Custom
  • Verify CR deletion stops reconciliation without removing operand resources

🤖 Generated with Claude Code

openshift-app-platform-shift Bot and others added 2 commits May 8, 2026 12:46
Introduces the TrustManager CRD (trustmanagers.operator.openshift.io/v1alpha1)
as specified in the enhancement proposal (EP-1914). This cluster-scoped singleton
resource enables day-2 installation and configuration of the trust-manager operand.

Key additions:
- TrustManager types with spec fields: logLevel, logFormat, trustNamespace,
  secretTargets, filterExpiredCertificates, defaultCAPackage, resources,
  affinity, tolerations, nodeSelector
- SecretTargetsConfig with Custom/Disabled policy and authorizedSecrets
- DefaultCAPackageConfig for OpenShift trusted CA bundle integration
- FeatureTrustManager feature gate (Alpha, default disabled)
- CRD manifest, deepcopy, client/lister/informer generation
- Integration tests for CRD validation (status defaults, singleton, scope, immutability)
- YAML test suite covering create/update validation scenarios

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Implements the controller-runtime based reconciler for the TrustManager
CRD. The controller watches trustmanagers.operator.openshift.io resources
and reconciles the trust-manager operand deployment in the cert-manager
namespace, including ServiceAccount, RBAC, Certificates, Services,
DefaultCAPackage ConfigMap, and Deployment resources.

The controller follows the same patterns as the IstioCSR controller:
- Feature-gated via FeatureTrustManager (Alpha, default disabled)
- Separate controller-runtime manager with its own cache builder
- Non-destructive cleanup on CR deletion per EP non-goals
- Dynamic RBAC for SecretTargets policy
- DefaultCAPackage integration with CNO trusted CA bundle injection

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label May 8, 2026
@openshift-ci-robot
Copy link
Copy Markdown

openshift-ci-robot commented May 8, 2026

@openshift-app-platform-shift[bot]: This pull request references CM-830 which is a valid jira issue.

Details

In response to this:

Summary

  • Implements the controller-runtime based reconciler for the TrustManager CRD (trustmanagers.operator.openshift.io/v1alpha1)
  • Manages the trust-manager operand lifecycle: ServiceAccount, RBAC (with dynamic SecretTargets rules), Certificate/Issuer, Services, DefaultCAPackage ConfigMap, and Deployment
  • Wires up the TrustManager controller-runtime manager in the operator startup, gated behind the FeatureTrustManager feature gate (Alpha, default disabled)
  • Follows the same patterns established by the IstioCSR controller: separate cache builder, label-based filtering, non-destructive cleanup on CR deletion

Related

Test plan

  • Verify go build ./... succeeds
  • Verify go vet ./... passes
  • Verify existing tests continue to pass
  • Enable TrustManager feature gate and verify controller starts
  • Create a TrustManager CR named cluster and verify all dependent resources are created
  • Verify DefaultCAPackage ConfigMap is created when policy is Enabled
  • Verify dynamic RBAC rules are applied when SecretTargets policy is Custom
  • Verify CR deletion stops reconciliation without removing operand resources

🤖 Generated with Claude Code

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci Bot requested review from mytreya-rh and swghosh May 8, 2026 13:00
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 8, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: openshift-app-platform-shift[bot]
Once this PR has been reviewed and has the lgtm label, please assign mytreya-rh for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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 needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label May 8, 2026
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 8, 2026

Hi @openshift-app-platform-shift[bot]. Thanks for your PR.

I'm waiting for a openshift member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

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.

@swghosh
Copy link
Copy Markdown
Member

swghosh commented May 8, 2026

/close
redundant and contained in #423

@openshift-ci openshift-ci Bot closed this May 8, 2026
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 8, 2026

@swghosh: Closed this PR.

Details

In response to this:

/close
redundant and contained in #423

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants