[cert-manager] upgrade to v1.20.2#13204
Conversation
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: yankay The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
There was a problem hiding this comment.
Pull request overview
Upgrades the bundled cert-manager addon to v1.20.2, updating Kubespray defaults, rendered manifests, and the supported-components documentation to track upstream security and feature updates.
Changes:
- Bump
cert_manager_versiondefault to1.20.2. - Update cert-manager manifest template with upstream RBAC and observability-related adjustments (Gateway API RBAC, tokenrequest RBAC, metrics ports/annotations, named probe ports).
- Refresh README “Supported Components” entry for cert-manager.
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| roles/kubespray_defaults/defaults/main/download.yml | Updates default cert-manager version used for image tags. |
| roles/kubernetes-apps/ingress_controller/cert_manager/templates/cert-manager.yml.j2 | Ports upstream manifest/RBAC changes needed for cert-manager v1.20.x. |
| README.md | Updates documented cert-manager version in the supported components list. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| - kind: ServiceAccount | ||
| name: cert-manager-webhook | ||
| namespace: {{ cert_manager_namespace }} |
There was a problem hiding this comment.
subjects list item is not indented under subjects: (the - kind: ServiceAccount line starts at column 0). This renders the YAML invalid and will prevent applying the manifest. Indent the list item (and its fields) under subjects:.
| - kind: ServiceAccount | |
| name: cert-manager-webhook | |
| namespace: {{ cert_manager_namespace }} | |
| - kind: ServiceAccount | |
| name: cert-manager-webhook | |
| namespace: {{ cert_manager_namespace }} |
There was a problem hiding this comment.
Thanks for the flag, @copilot — this is a false positive. YAML block sequences are allowed to start at the same indentation column as the parent mapping key ("compact" style), and that's how the entire kubespray cert-manager.yml.j2 (and upstream cert-manager's Helm-rendered chart) has always written subjects: lists.
Evidence:
pull-kubespray-yamllintpassed on this exact commit.- Rendered the template and round-tripped through
yaml.safe_load_all/kubectl apply --dry-run=client -f -without errors. - The suggested "fix" is textually identical to the original; GitHub's suggestion UI just displayed it as if indented.
No change needed.
| - kind: ServiceAccount | ||
| name: cert-manager-webhook | ||
| namespace: {{ cert_manager_namespace }} |
There was a problem hiding this comment.
subjects list item is not indented under subjects: in this RoleBinding. As written, the YAML is invalid and kubectl apply will fail. Indent the - kind: ServiceAccount entry (and its fields) beneath subjects:.
| - kind: ServiceAccount | |
| name: cert-manager-webhook | |
| namespace: {{ cert_manager_namespace }} | |
| - kind: ServiceAccount | |
| name: cert-manager-webhook | |
| namespace: {{ cert_manager_namespace }} |
There was a problem hiding this comment.
Same as #discussion_r3114846387 — false positive. The block sequence at column 0 under subjects: is valid YAML (compact style) and matches the existing convention throughout this file. pull-kubespray-yamllint is green. No change needed.
* Bump cert_manager_version from 1.15.3 to 1.20.2
* Regenerate CRDs manifest from upstream v1.20.2
* Port upstream deployment manifest changes while preserving kubespray
customizations:
- Add new Role/RoleBinding cert-manager-tokenrequest for bound
ServiceAccount token creation
- Add new cainjector metrics Service on port 9402
- Expose http-metrics port on cainjector and webhook Deployments
- Add Prometheus scrape annotations on cainjector and webhook pods
- Add clusterissuers/issuers finalizers RBAC rule
- Add gateway listenersets RBAC resources
- Use named ports (http-metrics, healthcheck) in probes and services
- Drop redundant apiGroup: "" from ServiceAccount subjects
- Fix typo CertificatSigningeRequests -> CertificateSigningRequests
Signed-off-by: Kay Yan <kay.yan@daocloud.io>
64c028e to
0e4d9df
Compare
|
Closing this PR as WIP — marking for later revisit. Manifests need more careful verification (live e2e deploy + upgrade from v1.15.3) before merge. |
|
Reopening — on a second look the changes are clean. Keeping [WIP] in the title for now so CI can validate and we can gather additional eyeballs, but the manifest regeneration approach and structural diff have been reviewed carefully. |
|
Kicking CI — re-opening to trigger a new GitLab pipeline with the ci-full label in effect so ubuntu24-flannel-ha-once (the only PR testcase that exercises cert-manager) actually runs. |
|
Reopened. With ci-full label now present, the new pipeline should expand pr_full matrix and include ubuntu24-flannel-ha-once. |
|
Dropping [WIP]. CI summary (pipeline 2467022125 with
Ready for review. /hold cancel |
|
PR needs rebase. 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. |
What type of PR is this?
/kind feature
What this PR does / why we need it:
Bumps cert-manager from
v1.15.3tov1.20.2. The current default is 5 minor versions behind upstream, and cert-manager is used for TLS certificate management with frequent security-relevant updates.Changes:
cert_manager_versionfrom1.15.3to1.20.2inroles/kubespray_defaults/defaults/main/download.yml.cert-manager.crds.yml.j2from upstream v1.20.2 CRDs (schema updates for all 6 CRDs).cert-manager.yml.j2while preserving kubespray customizations (namespace, proxy env, affinity/tolerations/nodeSelector, DNS config, leader-election namespace, trusted-internal-CA, extra args, image overrides). Structural changes applied:Role/RoleBindingcert-manager-tokenrequestfor bound ServiceAccount token creation.cert-manager-cainjectormetricsServiceon port 9402.http-metricsport on cainjector and webhook Deployments.prometheus.io/path,/scrape,/port) on cainjector and webhook pods.clusterissuers/finalizersandissuers/finalizers.listenersets/listenersets/finalizersto Gateway API RBAC.http-metrics,healthcheck) in probes and services.apiGroup: ""from ServiceAccount subjects.CertificatSigningeRequests->CertificateSigningRequests.propagate-ansible-variables(README).Release notes: https://github.com/cert-manager/cert-manager/releases/tag/v1.20.2
Diff: cert-manager/cert-manager@v1.15.3...v1.20.2
Which issue(s) this PR fixes:
Fixes #13180
Special notes for your reviewer:
cert_manager_enabledremainsfalseby default; existing users must opt in.app.kubernetes.io/version: "{{ cert_manager_version }}"label substitution.Does this PR introduce a user-facing change?: