Skip to content

feat: add TrustManager API types for trust-manager integration (EP-1914) - #487

Open
openshift-app-platform-shift[bot] wants to merge 1 commit into
cert-manager-1.18from
feature/api-types-1914-20260831061505
Open

feat: add TrustManager API types for trust-manager integration (EP-1914)#487
openshift-app-platform-shift[bot] wants to merge 1 commit into
cert-manager-1.18from
feature/api-types-1914-20260831061505

Conversation

@openshift-app-platform-shift

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

Copy link
Copy Markdown

Summary

  • Adds TrustManager CRD API type definitions (trustmanagers.operator.openshift.io/v1alpha1) for managing the trust-manager operand deployment
  • Adds TrustManager feature gate (Alpha/TechPreview, disabled by default) in features.go
  • Generates deepcopy, client, informer, lister code and CRD manifest with full OpenAPI validation schema
  • Adds comprehensive Go tests and YAML test suite for CRD validation

Details

Implements the API layer for [EP-1914: CM-830 - Integrate trust-manager with cert-manager-operator](openshift/enhancements#1914).

New Types

Type Description
TrustManager Cluster-scoped singleton CRD (name must be cluster)
TrustManagerSpec Spec with trustManagerConfig (required) and controllerConfig (optional)
TrustManagerConfig Operand config: logLevel, logFormat, trustNamespace, secretTargets, filterExpiredCertificates, defaultCAPackage, resources, affinity, tolerations, nodeSelector
SecretTargetsConfig Policy (Disabled/Custom) with authorized secret names; CEL-validated cross-field rules
DefaultCAPackageConfig Policy (Enabled/Disabled) for OpenShift trusted CA bundle injection
TrustManagerControllerConfig Labels and annotations for created resources

Validation Rules

  • Singleton enforcement via CEL: self.metadata.name == 'cluster'
  • Immutable trustNamespace field
  • SecretTargets cross-field validation (authorizedSecrets required when policy=Custom, empty when Disabled)
  • Enum validation on logFormat, filterExpiredCertificates, secretTargets.policy, defaultCAPackage.policy
  • Numeric bounds on logLevel (1-5)
  • String length bounds on trustNamespace (1-63)

Test plan

  • Go unit tests pass: CRD schema validation (status defaults, singleton, scope, required fields, enums, defaults, bounds, CEL rules, immutability, printer columns)
  • YAML test suite covers onCreate and onUpdate scenarios
  • make generate && make manifests succeeds
  • go vet ./... passes

🤖 Generated with Claude Code

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>
@openshift-ci
openshift-ci Bot requested review from mytreya-rh and swghosh August 31, 2026 06:15
@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 trilokgeer 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

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.

0 participants