CM-830: Add trust-manager controller implementation - #485
CM-830: Add trust-manager controller implementation#485openshift-app-platform-shift[bot] wants to merge 2 commits into
Conversation
Introduces the TrustManager CRD (trustmanagers.operator.openshift.io/v1alpha1) to support deploying and managing the trust-manager operand via cert-manager-operator. This adds: - TrustManager API types with spec/status fields for configuring trust-manager operand behavior (log level/format, trust namespace, secret targets, default CA package, filtering expired certificates, scheduling) - TrustManager FeatureGate (Alpha/TechPreview, default disabled) - Singleton enforcement via XValidation (name must be "cluster") - Immutability on trustNamespace via XValidation - Cross-field CEL validation on SecretTargetsConfig - Integration test suite (.testsuite.yaml) covering create and update scenarios - Generated deepcopy, CRD manifest, clientset, informers, listers, and apply configurations Ref: openshift/enhancements#1914 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Implements the trust-manager controller for cert-manager-operator following the IstioCSR controller patterns. The controller reconciles TrustManager CRs to deploy and manage the trust-manager operand in the cert-manager namespace. This adds: - Controller package (pkg/controller/trustmanager/) with full reconciliation logic for ServiceAccount, RBAC, Certificate/Issuer, Deployment, Services, and ValidatingWebhookConfiguration resources - Dynamic Deployment args based on TrustManager CR spec (log level/format, trust namespace, secret targets, default CA package, expired cert filtering) - Dynamic ClusterRole rules based on secretTargets.policy configuration - DefaultCAPackage support using OpenShift trusted CA bundle injection - Static YAML manifests in bindata/trust-manager/ for all managed resources - Controller registration in setup_manager.go with composite cache builder - Feature gate check in starter.go (TrustManager gate, Alpha/TechPreview) - Updated RBAC role manifest for trust-manager controller permissions Ref: openshift/enhancements#1914 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
New Files
bindata/trust-manager/- 13 static YAML manifests for trust-manager operandpkg/controller/trustmanager/- 12 Go files implementing the controller:constants.go- Controller name, finalizer, env vars, asset pathsclient.go- ctrlClient interface wrapping controller-runtime clienterrors.go- ReconcileError types (irrecoverable/retry-required)controller.go- Reconciler, SetupWithManager, Reconcile looputils.go- Status updates, finalizers, decode helpers, validationinstall_trustmanager.go- Orchestrates all resource reconciliationserviceaccounts.go- ServiceAccount reconciliationrbacs.go- Dynamic ClusterRole, all RBAC resourcesdeployments.go- Deployment with dynamic args and scheduling configservices.go- Webhook and metrics servicescertificates.go- Issuer and Certificate for webhook TLSwebhooks.go- ValidatingWebhookConfigurationModified Files
pkg/operator/setup_manager.go- ControllerManagerOptions, composite cache builderpkg/operator/starter.go- TrustManager feature gate checkpkg/operator/assets/bindata.go- Regenerated with trust-manager assetsconfig/rbac/role.yaml- Regenerated with trust-manager RBAC rulesTest plan
make generatecompletes without errorsmake buildcompletes without errorsmake manifestsproduces consistent outputgo test ./pkg/controller/trustmanager/...🤖 Generated with Claude Code