CM-830: Add trust-manager e2e tests (EP #1914) - #489
CM-830: Add trust-manager e2e tests (EP #1914)#489openshift-app-platform-shift[bot] wants to merge 3 commits into
Conversation
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-app-platform-shift[bot]: This pull request references CM-830 which is a valid jira issue. DetailsIn response to this:
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. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: openshift-app-platform-shift[bot] The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
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 Regular contributors should join the org to skip this step. Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions 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. |
Summary
Test plan
go vet -tags e2e ./test/e2e/...passes (compilation check)Feature:TrustManagerlabel on a cluster with the TrustManager feature gate enabledDependencies
🤖 Generated with Claude Code