Skip to content

Conversation

@chiragkyal
Copy link
Member

@chiragkyal chiragkyal commented Dec 23, 2025

Extend cert-manager-operator to deploy and manage trust-manager as an operand, providing a solution for trust bundle distribution on OpenShift.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Dec 23, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
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

@chiragkyal chiragkyal changed the title Add proposal for trust-manager integration in cert-manager-operator Integrate trust-manager with cert-manager-operator Dec 23, 2025
@chiragkyal chiragkyal changed the title Integrate trust-manager with cert-manager-operator CM-830: Integrate trust-manager with cert-manager-operator Dec 23, 2025
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Dec 23, 2025
@openshift-ci-robot
Copy link

openshift-ci-robot commented Dec 23, 2025

@chiragkyal: This pull request references CM-830 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.22.0" version, but no target version was set.

Details

In response to this:

Extend cert-manager-operator to deploy and manage trust-manager
as an operand, providing a solution for trust bundle distribution
on OpenShift.

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
Copy link

openshift-ci-robot commented Dec 23, 2025

@chiragkyal: This pull request references CM-830 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.22.0" version, but no target version was set.

Details

In response to this:

Extend cert-manager-operator to deploy and manage trust-manager as an operand, providing a solution for trust bundle distribution on OpenShift.

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.

@chiragkyal
Copy link
Member Author

/cc @bharath-b-rh @lunarwhite

Copy link
Contributor

@bharath-b-rh bharath-b-rh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM mostly. I will need a second read.


// status is the most recently observed status of the TrustManager.
// +kubebuilder:validation:Optional
// +optional
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please have all optional fields as pointer types, to explicitly interpret non-configured values.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

- `trust-manager-controller` based on the configuration in `trustmanagers.operator.openshift.io` CR, installs `trust-manager`
in the `cert-manager` namespace.
- If `defaultCAPackage.enabled` is true:
1. Controller creates a ConfigMap with annotation `config.openshift.io/inject-trusted-cabundle: true`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would suggest having the configmap created irrespective of whether defaultCAPackage is enabled and instead depend on the featuregate to create it. i.e. if feature enabled create the configmap and have it ready.

Copy link
Member Author

@chiragkyal chiragkyal Jan 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instead depend on the featuregate to create it. i.e. if feature enabled create the configmap and have it ready.

Once we will promote to GA, does it mean that irrespective of whether defaultCAPackage is enabled or disabled, both the configmaps will always be created, and we will only add/remove the volumeMounts in the deployment based on the flag. Is my understanding correct?

This enhancement describes extending cert-manager-operator to deploy and
manage trust-manager as an operand.

Signed-off-by: chiragkyal <ckyal@redhat.com>
// +kubebuilder:validation:MaxLength:=63
// +kubebuilder:validation:Optional
// +optional
TrustNamespace string `json:"trustNamespace,omitempty"`
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we make TrustNamespace an immutable field? Otherwise, changing the TrustNamespace on a running cluster is a destructive action. The operand would lose access to its current data source.

@chiragkyal chiragkyal force-pushed the trust-manager branch 3 times, most recently from f43588f to c31d38c Compare January 2, 2026 14:41
Signed-off-by: chiragkyal <ckyal@redhat.com>
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jan 3, 2026

@chiragkyal: all tests passed!

Full PR test history. Your PR dashboard.

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. I understand the commands that are listed here.

Copy link
Member

@lunarwhite lunarwhite left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks fairly good to me 👍. I'm very glad to see that the upstream planned Bundle API changes/deprecations are mentioned in this EP. As we move toward GA (future), we might need to adjust our custom APIs based on the stabilized upstream CRD APIs accordingly.

Comment on lines +820 to +823
- Different log levels and formats
- Custom trust namespace
- Secret targets policy (Disabled/All/Specific)
- DefaultCAPackage policy (Enabled/Disabled)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Different log levels and formats
- Custom trust namespace
- Secret targets policy (Disabled/All/Specific)
- DefaultCAPackage policy (Enabled/Disabled)
- Custom trust namespace
- Secret targets policy (Disabled/All/Specific)
- DefaultCAPackage policy (Enabled/Disabled)
- FilterExpiredCertificates policy (Enabled/Disabled)
- Common configurations: log levels and formats, resources, node selector, tolerations and affinity

Comment on lines +852 to +856
## Upgrade / Downgrade Strategy

On upgrade:
- cert-manager-operator will have functionality to enable trust-manager and based on the administrator configuration,
trust-manager will be deployed and available for usage.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we explicitly mention that directly upgrading from a TP version to a GA version is not supported? Users are expected to perform a fresh installation rather than migrating from a TP to GA considering there might be significant API changes.

Comment on lines +884 to +887
oc get Certificates,Issuers,ClusterRoles,ClusterRoleBindings,Deployments,Roles,RoleBindings,Services,ServiceAccounts,ValidatingWebhookConfigurations,ConfigMaps -l "trustmanager.openshift.operator.io/managed-by=trust-manager-controller" -n cert-manager

# If trust namespace is different from cert-manager, also check for Role/RoleBinding there
# oc get Roles,RoleBindings -l "trustmanager.openshift.operator.io/managed-by=trust-manager-controller" -n <trust-namespace>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see trustmanager.openshift.operator.io/managed-by=trust-manager-controller is mentioned somewhere else. Perhaps you want to mention app.kubernetes.io/name=cert-manager-trust-manager or app.kubernetes.io/instance=cert-manager-trust-manager?

* `app: cert-manager-trust-manager`
* `app.kubernetes.io/name: cert-manager-trust-manager`
* `app.kubernetes.io/instance: cert-manager-trust-manager`
* `app.kubernetes.io/version: "v0.20.2"`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just bringing this up because I noticed the latest tag is now v0.20.3 (released a few weeks ago). Maybe we could build on top of that in actual implementation. I understand that when this EP was being drafted, perhaps v0.20.3 hadn't been released yet, and it doesn't hurt to reference v0.20.2 for the proposal.

Comment on lines +164 to +165
### Workflow Description

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick: It'd be great if we could add a mermaid diagram to help illustrate the end-end workflow.

@mytreya-rh
Copy link
Contributor

  • We need to flesh out the defaultca package implementation to avoid/alleviate the cases where the source ConfigMap is not populated in time for the operator to create the operand deployment, and the rollout of operand if the source ConfigMap changes. But this was discussed and we agreed to defer to it during implementation to try out the options.
  • w.r.t cluster privileges needed for the operator: We are still waiting on https://redhat-internal.slack.com/archives/C3VS0LV41/p1759755909042599 and thus we will need to take it up later

/lgtm
/hold for @bharath-b-rh and @lunarwhite on design and test aspects
cc: @TrilokGeer

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 8, 2026
@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jan 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants