Skip to content

CM-830: Add trust-manager controller implementation - #488

Open
openshift-app-platform-shift[bot] wants to merge 2 commits into
cert-manager-1.18from
feature/controller-impl-1914-20260831063034
Open

CM-830: Add trust-manager controller implementation#488
openshift-app-platform-shift[bot] wants to merge 2 commits into
cert-manager-1.18from
feature/controller-impl-1914-20260831063034

Conversation

@openshift-app-platform-shift

@openshift-app-platform-shift openshift-app-platform-shift Bot commented Aug 31, 2026

Copy link
Copy Markdown

Summary

  • Implements the trust-manager controller/reconciler for Enhancement Proposal #1914 (CM-830)
  • Follows the established istiocsr controller pattern with full reconciliation loop managing ServiceAccount, ClusterRole/ClusterRoleBinding, Role/RoleBinding, Deployment, Services, Certificate, ValidatingWebhookConfiguration, and default CA package ConfigMap
  • Integrates with TrustManager feature gate (Alpha, default disabled) - controller only registers when feature gate is enabled
  • Adds combined cache builder in setup_manager.go to support both istiocsr and trustmanager controllers with proper label selectors
  • Includes bindata static manifests for all trust-manager Kubernetes resources
  • Supports DefaultCAPackage (CNO trusted CA bundle injection) and SecretTargets (dynamic RBAC) features per EP #1914

Test plan

  • Verify make generate && make manifests && make build passes
  • Verify controller registers correctly when TrustManager feature gate is enabled
  • Verify controller does NOT register when TrustManager feature gate is disabled (default)
  • Verify trust-manager operand resources are created when TrustManager CR is applied
  • Verify DefaultCAPackage ConfigMap is created with CNO injection annotation when enabled
  • Verify SecretTargets dynamic RBAC rules are applied when policy is Custom
  • Verify status conditions (Ready/Degraded) are correctly updated
  • Verify finalizer is added and cleanup runs on CR deletion

🤖 Generated with Claude Code

openshift-app-platform-shift Bot and others added 2 commits August 31, 2026 06:14
Add the TrustManager CRD (trustmanagers.operator.openshift.io/v1alpha1)
API type definitions to enable cert-manager-operator to deploy and manage
the trust-manager operand. This implements the API layer for EP-1914
(CM-830: Integrate trust-manager with cert-manager-operator).

New types:
- TrustManager (cluster-scoped singleton, name must be 'cluster')
- TrustManagerSpec with TrustManagerConfig and TrustManagerControllerConfig
- SecretTargetsConfig with CEL validation for policy/authorizedSecrets
- DefaultCAPackageConfig for OpenShift CA bundle injection
- FilterExpiredCertificatesPolicy, SecretTargetsPolicy, DefaultCAPackagePolicy enums

Also adds:
- TrustManager feature gate (Alpha/TechPreview, default disabled)
- Generated deepcopy, client, informer, and lister code
- CRD manifest with full validation schema
- Comprehensive Go tests and YAML test suite

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Implement the trust-manager controller/reconciler following the istiocsr
controller pattern. The controller manages the lifecycle of trust-manager
operand resources based on the TrustManager CRD.

Key features:
- Full reconciliation loop for trust-manager operand (ServiceAccount,
  ClusterRole/ClusterRoleBinding, Role/RoleBinding, Deployment,
  Services, Certificate, ValidatingWebhookConfiguration)
- Feature gate integration: controller only registers when TrustManager
  feature gate is enabled (Alpha, default disabled)
- DefaultCAPackage support using OpenShift CNO trusted CA bundle injection
- SecretTargets dynamic RBAC for authorized secret names
- Combined cache builder in setup_manager.go for both istiocsr and
  trustmanager controllers with proper label selectors
- ConfigMap watch for default CA package reconciliation
- Bindata static manifests for all trust-manager Kubernetes resources
- Error handling with IrrecoverableError/RetryRequiredError pattern
- Status condition management (Ready/Degraded) with atomic updates

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@openshift-ci-robot

openshift-ci-robot commented Aug 31, 2026

Copy link
Copy Markdown

@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 trust-manager controller/reconciler for Enhancement Proposal #1914 (CM-830)
  • Follows the established istiocsr controller pattern with full reconciliation loop managing ServiceAccount, ClusterRole/ClusterRoleBinding, Role/RoleBinding, Deployment, Services, Certificate, ValidatingWebhookConfiguration, and default CA package ConfigMap
  • Integrates with TrustManager feature gate (Alpha, default disabled) - controller only registers when feature gate is enabled
  • Adds combined cache builder in setup_manager.go to support both istiocsr and trustmanager controllers with proper label selectors
  • Includes bindata static manifests for all trust-manager Kubernetes resources
  • Supports DefaultCAPackage (CNO trusted CA bundle injection) and SecretTargets (dynamic RBAC) features per EP #1914

Test plan

  • Verify make generate && make manifests && make build passes
  • Verify controller registers correctly when TrustManager feature gate is enabled
  • Verify controller does NOT register when TrustManager feature gate is disabled (default)
  • Verify trust-manager operand resources are created when TrustManager CR is applied
  • Verify DefaultCAPackage ConfigMap is created with CNO injection annotation when enabled
  • Verify SecretTargets dynamic RBAC rules are applied when policy is Custom
  • Verify status conditions (Ready/Degraded) are correctly updated
  • Verify finalizer is added and cleanup runs on CR deletion

🤖 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-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Aug 31, 2026
@openshift-ci
openshift-ci Bot requested review from bharath-b-rh and swghosh August 31, 2026 06:31
@openshift-ci

openshift-ci Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

[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 bharath-b-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 Aug 31, 2026
@openshift-ci

openshift-ci Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

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.

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.

1 participant