Skip to content

CM-830: Add trust-manager e2e tests (EP #1914) - #489

Open
openshift-app-platform-shift[bot] wants to merge 3 commits into
cert-manager-1.18from
feature/e2e-tests-1914-20260831063059
Open

CM-830: Add trust-manager e2e tests (EP #1914)#489
openshift-app-platform-shift[bot] wants to merge 3 commits into
cert-manager-1.18from
feature/e2e-tests-1914-20260831063059

Conversation

@openshift-app-platform-shift

Copy link
Copy Markdown

Summary

  • Add end-to-end tests for the trust-manager controller integration (Enhancement Proposal #1914)
  • Tests cover basic TrustManager CR lifecycle, operand resource verification, DefaultCAPackage CNO injection, SecretTargets dynamic RBAC, FilterExpiredCertificates configuration, deployment drift reconciliation, and CR deletion/finalizer handling
  • Follows existing istio-csr e2e test patterns using Ginkgo v2, DeferCleanup, and dynamic resource loader with template values

Test plan

  • Verify go vet -tags e2e ./test/e2e/... passes (compilation check)
  • Run e2e tests with Feature:TrustManager label on a cluster with the TrustManager feature gate enabled
  • Verify trust-manager CR lifecycle tests pass (create, reconcile, status verification)
  • Verify DefaultCAPackage tests pass (ConfigMap creation with CNO annotation, volume mount verification)
  • Verify SecretTargets tests pass (dynamic RBAC creation with authorized secret names)
  • Verify FilterExpiredCertificates tests pass (deployment argument verification)
  • Verify deletion tests pass (finalizer removal and CR cleanup)

Dependencies

🤖 Generated with Claude Code

openshift-app-platform-shift Bot and others added 3 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>
Add end-to-end tests for the trust-manager controller, covering:
- Basic TrustManager CR lifecycle (create, reconcile, status verification)
- Operand resource verification (deployment, RBAC, services, webhooks)
- DefaultCAPackage feature with CNO trusted CA bundle injection
- SecretTargets dynamic RBAC with authorized secret names
- FilterExpiredCertificates deployment argument verification
- Deployment drift reconciliation (manual modification recovery)
- TrustManager CR deletion with finalizer removal

Tests follow the existing istio-csr e2e test patterns using Ginkgo v2,
DeferCleanup, and the dynamic resource loader with template values.

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 Aug 31, 2026
@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

  • Add end-to-end tests for the trust-manager controller integration (Enhancement Proposal #1914)
  • Tests cover basic TrustManager CR lifecycle, operand resource verification, DefaultCAPackage CNO injection, SecretTargets dynamic RBAC, FilterExpiredCertificates configuration, deployment drift reconciliation, and CR deletion/finalizer handling
  • Follows existing istio-csr e2e test patterns using Ginkgo v2, DeferCleanup, and dynamic resource loader with template values

Test plan

  • Verify go vet -tags e2e ./test/e2e/... passes (compilation check)
  • Run e2e tests with Feature:TrustManager label on a cluster with the TrustManager feature gate enabled
  • Verify trust-manager CR lifecycle tests pass (create, reconcile, status verification)
  • Verify DefaultCAPackage tests pass (ConfigMap creation with CNO annotation, volume mount verification)
  • Verify SecretTargets tests pass (dynamic RBAC creation with authorized secret names)
  • Verify FilterExpiredCertificates tests pass (deployment argument verification)
  • Verify deletion tests pass (finalizer removal and CR cleanup)

Dependencies

🤖 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 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