Skip to content

[cert-manager] Update cert-manager to v1.19.3#2070

Merged
kvaps merged 2 commits intomainfrom
update-cert-manager
Feb 27, 2026
Merged

[cert-manager] Update cert-manager to v1.19.3#2070
kvaps merged 2 commits intomainfrom
update-cert-manager

Conversation

@myasnikovdaniil
Copy link
Contributor

@myasnikovdaniil myasnikovdaniil commented Feb 18, 2026

What this PR does

Release note

[cert-manager] Updated cert-manager to v1.19.3

Summary by CodeRabbit

  • New Features

    • Global nodeSelector and hostUsers (pod user-namespace isolation) added
    • New/updated CRDs for cert-manager resources (Certificate, CertificateRequest, Order, etc.)
  • Documentation

    • Revised chart docs and installation guidance; added deprecation/notice about private-key rotation
    • Removed legacy CRD README and schema files from the CRD package (documentation consolidated)
  • Chores

    • Upgraded cert-manager to v1.19.3
    • Moved CRDs into a dedicated CRD package; ServiceMonitor targetPort default renamed to "http-metrics"

@dosubot dosubot bot added the size:XXL This PR changes 1000+ lines, ignoring generated files. label Feb 18, 2026
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 18, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4df456f and 4734f65.

📒 Files selected for processing (1)
  • packages/system/cert-manager/Makefile
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/system/cert-manager/Makefile

📝 Walkthrough

Walkthrough

CRD manifests and helpers were moved/added into a dedicated cert-manager-crds chart; cert-manager chart bumped to v1.19.3 and gained global.nodeSelector and global.hostUsers with template changes (merged nodeSelector rendering, hostUsers injection, RBAC naming, and conditional ServiceMonitor fields).

Changes

Cohort / File(s) Summary
cert-manager-crds Makefile & values
packages/system/cert-manager-crds/Makefile, packages/system/cert-manager-crds/values.yaml
Added exported NAME/NAMESPACE; removed prior chart update logic; added global.commonLabels, creator: helm, and top-level crds.enabled: true / crds.keep: true.
cert-manager-crds removed chart metadata & docs
packages/system/cert-manager-crds/charts/cert-manager/Chart.yaml, packages/system/cert-manager-crds/charts/cert-manager/README.md, packages/system/cert-manager-crds/charts/cert-manager/values.schema.json, packages/system/cert-manager-crds/charts/cert-manager/values.yaml
Removed chart metadata, README, values.schema.json and values.yaml contents (large deletions of metadata, docs, schema, and defaults).
cert-manager-crds CRD manifests
packages/system/cert-manager-crds/templates/crd-*.yaml
Added full CRD templates (Certificate, CertificateRequest, ACME Order) with openAPIV3Schema, printer columns, status subresource, and optional helm.sh/resource-policy: keep.
cert-manager-crds template helpers
packages/system/cert-manager-crds/templates/_helpers.tpl
Added cert-manager.crd-labels Helm template to standardize CRD labels.
cert-manager chart bump & docs/notes
packages/system/cert-manager/charts/cert-manager/Chart.yaml, packages/system/cert-manager/charts/cert-manager/README.md, packages/system/cert-manager/charts/cert-manager/templates/NOTES.txt
Bumped chart/app version to v1.19.3; updated README text (installation, globals, feature gates, IPv6 notes); added NOTES deprecation/notice about private key rotation default.
cert-manager templates: nodeSelector, hostUsers & small fixes
packages/system/cert-manager/charts/cert-manager/templates/deployment.yaml, .../cainjector-deployment.yaml, .../webhook-deployment.yaml, .../startupapicheck-job.yaml, .../servicemonitor.yaml, .../rbac.yaml, .../serviceaccount.yaml, .../templates/_helpers.tpl
Added global.hostUsers rendering; merged global.nodeSelector with component nodeSelectors and emit explicit quoted key/value pairs; adjusted webhook DNS handling and probe port; RBAC tokenrequest names changed to use fullname; quoted annotation values; conditional ServiceMonitor fields.
cert-manager values & schema updates
packages/system/cert-manager/charts/cert-manager/values.yaml, packages/system/cert-manager/charts/cert-manager/values.schema.json
Added global.nodeSelector and global.hostUsers schema/values; changed prometheus.servicemonitor.targetPort type/default from numeric 9402 to string "http-metrics"; doc/punctuation and IPv6 network policy notes.
move CRD templates post-pull / values tweak
packages/system/cert-manager/Makefile, packages/system/cert-manager/values.yaml
Update target to move charts/cert-manager/templates/crd-*.yaml and copy _helpers.tpl into cert-manager-crds/templates/; removed nested cert-manager.installCRDs key.

Sequence Diagram(s)

mermaid
sequenceDiagram
participant Dev as Developer (helm chart)
participant Helm as Helm
participant Chart as cert-manager / cert-manager-crds templates
participant K8s as Kubernetes API
Dev->>Helm: helm package / helm install
Helm->>Chart: render templates (CRDs + helpers)
Chart->>K8s: apply CRD manifests (Certificate, CertificateRequest, Order)
K8s->>K8s: register CRD kinds & schemas
K8s-->>Helm: apply status/ack

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~55 minutes

Poem

I’m a rabbit with a helm and a chart, 🐇
CRDs hop to their cozy part,
Nodes get chosen, users snug,
Labels stitched with tiny tug,
Versions bumped — a tidy start.

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly and clearly summarizes the main change: updating cert-manager to version v1.19.3, which is reflected in the version bumps in the Chart.yaml files.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch update-cert-manager

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @myasnikovdaniil, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request primarily focuses on upgrading the cert-manager component to version v1.19.3, ensuring the system benefits from the latest upstream developments. Beyond the version bump, it introduces new global configuration options for pod scheduling and security, refines Prometheus monitoring settings, and updates network policies to support IPv6. The changes also include improvements to Helm chart templating and documentation, making the deployment and management of cert-manager more robust and user-friendly.

Highlights

  • Cert-manager Version Upgrade: The cert-manager Helm chart has been updated to version v1.19.3, bringing the latest features, bug fixes, and security enhancements from the cert-manager project.
  • Helm Chart Configuration Enhancements: New global Helm values, nodeSelector and hostUsers, were introduced to provide more granular control over pod scheduling and security contexts across cert-manager components.
  • Streamlined CRD Management: The installation instructions in the README.md files were updated to reflect that Custom Resource Definitions (CRDs) can now be installed directly via the Helm chart using --set crds.enabled=true, simplifying the deployment process.
  • Updated Feature Gates and Default Private Key Rotation Policy: Several feature gates in the controller configuration have been updated, with AdditionalCertificateOutputFormats now generally available (GA). Notably, the default private key rotation policy for Certificate resources has changed to Always in cert-manager v1.18.0 and later, which is reflected in the updated chart.
  • IPv6 Support for Webhook Network Policies: Network policies for the webhook component now include IPv6 CIDR (::/0) in both ingress and egress rules, enhancing compatibility and security in IPv6 environments.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • packages/system/cert-manager-crds/Makefile
    • Added NAME and NAMESPACE exports for package configuration.
  • packages/system/cert-manager-crds/charts/cert-manager/Chart.yaml
    • Updated appVersion and version to v1.19.3.
  • packages/system/cert-manager-crds/charts/cert-manager/README.md
    • Updated cert-manager description for clarity.
    • Revised installation instructions to use crds.enabled=true with Helm.
    • Updated CRD deletion instructions to list specific CRDs.
  • packages/system/cert-manager-crds/charts/cert-manager/templates/_helpers.tpl
    • Added a new template cert-manager.crd-labels for consistent CRD labeling.
  • packages/system/cert-manager-crds/charts/cert-manager/values.schema.json
    • Updated descriptions for various Helm values, including approveSignerNames, podDisruptionBudget, config feature gates, and Prometheus settings.
    • Added schema definitions for new global hostUsers and nodeSelector parameters.
    • Modified prometheus.servicemonitor.targetPort type to accept string,integer.
  • packages/system/cert-manager-crds/charts/cert-manager/values.yaml
    • Introduced global nodeSelector and hostUsers parameters with documentation.
    • Updated comments and descriptions for various existing parameters to reflect changes or improve clarity.
    • Changed prometheus.servicemonitor.targetPort default value to http-metrics.
  • packages/system/cert-manager/charts/cert-manager/Chart.yaml
    • Updated appVersion and version to v1.19.3.
  • packages/system/cert-manager/charts/cert-manager/README.md
    • Updated cert-manager description for clarity.
    • Revised installation instructions to use crds.enabled=true with Helm.
    • Updated CRD deletion instructions to list specific CRDs.
  • packages/system/cert-manager/charts/cert-manager/templates/NOTES.txt
    • Added a warning about the new default private key rotation policy (Always) in cert-manager v1.18.0+.
  • packages/system/cert-manager/charts/cert-manager/templates/_helpers.tpl
    • Added a new template cert-manager.crd-labels for consistent CRD labeling.
  • packages/system/cert-manager/charts/cert-manager/templates/cainjector-deployment.yaml
    • Implemented conditional hostUsers setting based on global values.
    • Updated nodeSelector logic to merge component-specific settings with global ones.
  • packages/system/cert-manager/charts/cert-manager/templates/crd-acme.cert-manager.io_orders.yaml
    • Added a new CustomResourceDefinition (CRD) for orders.acme.cert-manager.io.
  • packages/system/cert-manager/charts/cert-manager/templates/crd-cert-manager.io_certificaterequests.yaml
    • Added a new CustomResourceDefinition (CRD) for certificaterequests.cert-manager.io.
  • packages/system/cert-manager/charts/cert-manager/templates/crd-cert-manager.io_certificates.yaml
    • Added a new CustomResourceDefinition (CRD) for certificates.cert-manager.io.
  • packages/system/cert-manager/charts/cert-manager/templates/deployment.yaml
    • Implemented conditional hostUsers setting based on global values.
    • Updated nodeSelector logic to merge component-specific settings with global ones.
  • packages/system/cert-manager/charts/cert-manager/templates/rbac.yaml
    • Simplified the naming convention for the tokenrequest Role and RoleBinding.
    • Adjusted formatting for Gateway API group in cluster role rules.
  • packages/system/cert-manager/charts/cert-manager/templates/serviceaccount.yaml
    • Improved templating for service account annotations to handle quoted values correctly.
  • packages/system/cert-manager/charts/cert-manager/templates/servicemonitor.yaml
    • Added conditional rendering for prometheusInstance, interval, and scrapeTimeout in ServiceMonitor endpoints.
  • packages/system/cert-manager/charts/cert-manager/templates/startupapicheck-job.yaml
    • Implemented conditional hostUsers setting based on global values.
    • Updated nodeSelector logic to merge component-specific settings with global ones.
  • packages/system/cert-manager/charts/cert-manager/templates/webhook-deployment.yaml
    • Implemented conditional hostUsers setting based on global values.
    • Updated nodeSelector logic to merge component-specific settings with global ones.
    • Corrected conditional logic for webhook.url.host.
    • Updated health check port to use healthcheck named port.
  • packages/system/cert-manager/charts/cert-manager/values.schema.json
    • Updated descriptions for various Helm values, including approveSignerNames, podDisruptionBudget, config feature gates, and Prometheus settings.
    • Added schema definitions for new global hostUsers and nodeSelector parameters.
    • Modified prometheus.servicemonitor.targetPort type to accept string,integer.
  • packages/system/cert-manager/charts/cert-manager/values.yaml
    • Introduced global nodeSelector and hostUsers parameters with documentation.
    • Updated comments and descriptions for various existing parameters to reflect changes or improve clarity.
    • Changed prometheus.servicemonitor.targetPort default value to http-metrics.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request updates cert-manager to v1.19.3. The changes include version bumps in Chart.yaml, and updates to documentation, values, and templates to align with the new upstream version. While many of the changes are positive improvements, such as better Helm templating and support for new features, I've identified two critical issues related to how the upstream chart was vendored, which result in missing Custom Resource Definitions (CRDs). These issues will prevent cert-manager from deploying or functioning correctly and must be addressed.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
packages/system/cert-manager-crds/charts/cert-manager/README.md (1)

96-140: ⚠️ Potential issue | 🟡 Minor

Add [cert-manager-crds] prefix and --signoff to commit message.

The commit message should follow the [component] Description format with a Signed-off-by line, per repository guidelines. The current message "Update cert-manager v1.19.3" is missing the [cert-manager-crds] component prefix and lacks signoff. Amend the commit using git commit --amend --signoff and update the message to [cert-manager-crds] Update cert-manager v1.19.3.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/system/cert-manager-crds/charts/cert-manager/README.md` around lines
96 - 140, Amend the last commit message to include the component prefix and a
sign-off: change the message to "[cert-manager-crds] Update cert-manager
v1.19.3" and add a Signed-off-by line; update the existing commit (amend) so the
repository history contains the corrected message and signoff for this
cert-manager-crds change.
🧹 Nitpick comments (1)
packages/system/cert-manager/charts/cert-manager/README.md (1)

1-2011: Direct edits to vendored upstream chart files violate the **/*.yaml coding guideline

All YAML and Markdown files changed in this PR reside under charts/cert-manager/ — the vendored upstream chart directory. The guideline prohibits directly editing files there; the proper mechanism is chart vendoring (e.g., helm pull jetstack/cert-manager --version v1.19.3 --untar). Direct manual edits make it difficult to track local divergences from upstream and can be silently overwritten on the next vendor operation.

If the Makefile already has a helm pull-based update target, use that. Otherwise, consider adding one so future updates follow the proper mechanism.

As per coding guidelines: "Do NOT directly edit upstream Helm charts in vendored charts directory; use proper chart vendoring mechanisms."

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/system/cert-manager/charts/cert-manager/README.md` around lines 1 -
2011, The README.md under the vendored cert-manager chart was edited directly
(local modifications to the vendored upstream chart), which violates the repo
rule to not edit vendored YAML/Markdown; revert these manual edits and replace
them by vendoring the upstream chart using Helm (e.g., run helm pull
jetstack/cert-manager --version v1.19.3 --untar to regenerate the chart files),
commit the regenerated chart instead of hand-editing README.md, and add a
Makefile target (e.g., update-cert-manager-chart or vendor-charts) that
encapsulates the helm pull/untar step so future updates follow the proper chart
vendoring mechanism.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@packages/system/cert-manager/charts/cert-manager/templates/deployment.yaml`:
- Around line 69-71: The hostUsers template line contains trailing spaces after
the Helm expression; update the line "hostUsers: {{ .Values.global.hostUsers }}"
to eliminate trailing whitespace and trim surrounding template whitespace (e.g.,
use the Helm whitespace-control hyphen on the expression such as changing the
expression to trim output) and apply the same change to the corresponding lines
that render hostUsers in the other templates (the cainjector,
startupapicheck-job, and webhook templates) so no trailing spaces remain after
the closing braces.
- Around line 215-222: The merge call currently uses "$nodeSelector = merge
$nodeSelector (.Values.nodeSelector | default dict)" which makes global values
win; change the merge operand order so the component-level nodeSelector is the
destination and thus takes precedence, e.g. "$nodeSelector = merge
(.Values.nodeSelector | default dict) $nodeSelector" (keep the initial
"$nodeSelector := .Values.global.nodeSelector | default dict" setup), and apply
the identical operand swap for the same merge usage found in the other templates
(the cainjector, startupapicheck job, and webhook templates) so
component-specific nodeSelector overrides global.

---

Outside diff comments:
In `@packages/system/cert-manager-crds/charts/cert-manager/README.md`:
- Around line 96-140: Amend the last commit message to include the component
prefix and a sign-off: change the message to "[cert-manager-crds] Update
cert-manager v1.19.3" and add a Signed-off-by line; update the existing commit
(amend) so the repository history contains the corrected message and signoff for
this cert-manager-crds change.

---

Duplicate comments:
In
`@packages/system/cert-manager/charts/cert-manager/templates/cainjector-deployment.yaml`:
- Around line 70-72: The hostUsers block has trailing whitespace and the Helm
tpl merge operands are inverted; remove the trailing space after {{
.Values.global.hostUsers }} and correct the merge operand order wherever you
used merge (e.g., the same pattern around the other block) so that the
destination map is the first argument and the source map is the second — update
the conditional block using hasKey .Values.global "hostUsers" and the merge(...)
call that handles global values to use merge(dest, src) and ensure
.Values.global.hostUsers has no trailing whitespace.

In
`@packages/system/cert-manager/charts/cert-manager/templates/crd-acme.cert-manager.io_orders.yaml`:
- Around line 1-274: The change directly edits the vendored Helm chart template
crd-acme.cert-manager.io_orders.yaml in packages/system/cert-manager/charts,
which violates the guideline to not modify upstream charts in-place; revert the
edits to crd-acme.cert-manager.io_orders.yaml and instead apply your change via
the proper vendoring mechanism (e.g., update the upstream cert-manager chart
version and re-vendor, add a patch/overlay using kustomize/helmfile/helm
chart-operator, or supply values in values.yaml) so the CRD change is introduced
through the chart dependency or an overlay; ensure you update the chart
lock/metadata (or add a documented patch) rather than committing direct edits to
the template.

In
`@packages/system/cert-manager/charts/cert-manager/templates/crd-cert-manager.io_certificates.yaml`:
- Around line 1-816: This change directly edits the vendored Helm chart template
(the Certificate CRD defined as kind: CustomResourceDefinition with metadata
name "certificates.cert-manager.io" in
cert-manager/templates/crd-cert-manager.io_certificates.yaml), which violates
the rule to not modify upstream charts in-place; revert this file to the
vendored upstream state and instead apply your modifications by updating the
vendored chart properly (bump the chart version / update Chart.yaml to the
desired upstream cert-manager version and re-vendor using the project’s chart
vendoring workflow such as running helm repo update + helm pull/helm dependency
update or your repository’s chart-vendoring script), or put required overrides
into values.yaml / a wrapper chart so no direct edits to templates/*.yaml are
made.

In
`@packages/system/cert-manager/charts/cert-manager/templates/startupapicheck-job.yaml`:
- Around line 44-46: The template's conditional uses hasKey with inverted
operand order and the hostUsers value line contains trailing whitespace; update
the hasKey call to use the correct operand order (call hasKey with the map first
and the key second as in hasKey .Values.global "hostUsers") and remove the
trailing spaces after {{ .Values.global.hostUsers }} so the line is trimmed;
apply the same fixes to the other duplicate block referenced (lines 82–89) to
mirror the corrections made in deployment.yaml.

In
`@packages/system/cert-manager/charts/cert-manager/templates/webhook-deployment.yaml`:
- Around line 69-71: The helm template snippet uses hasKey and hostUsers but
leaves trailing whitespace after the hostUsers value and also uses the merge
operator with inverted operand order elsewhere; remove the trailing space after
"{{ .Values.global.hostUsers }}" and fix the merge operand order by swapping the
operands so the target/default ordering matches the other deployment.yaml fixes
(look for usages of merge and ensure the left/right operands are in the correct
order), updating the template block that references hasKey and
.Values.global.hostUsers accordingly.

---

Nitpick comments:
In `@packages/system/cert-manager/charts/cert-manager/README.md`:
- Around line 1-2011: The README.md under the vendored cert-manager chart was
edited directly (local modifications to the vendored upstream chart), which
violates the repo rule to not edit vendored YAML/Markdown; revert these manual
edits and replace them by vendoring the upstream chart using Helm (e.g., run
helm pull jetstack/cert-manager --version v1.19.3 --untar to regenerate the
chart files), commit the regenerated chart instead of hand-editing README.md,
and add a Makefile target (e.g., update-cert-manager-chart or vendor-charts)
that encapsulates the helm pull/untar step so future updates follow the proper
chart vendoring mechanism.

@myasnikovdaniil myasnikovdaniil marked this pull request as draft February 18, 2026 17:35
@myasnikovdaniil myasnikovdaniil marked this pull request as ready for review February 18, 2026 19:33
@dosubot dosubot bot added the enhancement New feature or request label Feb 18, 2026
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (2)
packages/system/cert-manager-crds/templates/_helpers.tpl (1)

1-213: Consider trimming unused helper templates from the CRDs chart.

This _helpers.tpl is a full copy of the main cert-manager chart's helpers, but the CRD templates only invoke cert-manager.crd-labels (and its transitive dependencies: cert-manager.name, labels, chartName). The remaining templates (webhook.*, cainjector.*, startupapicheck.*, image, cert-manager.serviceAccountName, cert-manager.fullname, cert-manager.namespace, cert-manager.crd-check) are dead code in this chart context.

Keeping the full file simplifies re-vendoring but increases the maintenance surface. A minimal _helpers.tpl with only the needed templates would be cleaner, though this can be deferred.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/system/cert-manager-crds/templates/_helpers.tpl` around lines 1 -
213, This helpers file contains many templates not used by the CRDs chart; keep
only the templates required by the CRD manifests (cert-manager.crd-labels and
its transitive dependencies: cert-manager.name, labels, chartName) and remove
dead templates (e.g., webhook.*, cainjector.*, startupapicheck.*, image,
cert-manager.serviceAccountName, cert-manager.fullname, cert-manager.namespace,
cert-manager.crd-check) so the file is minimal; ensure you preserve any small
helper fragments referenced by cert-manager.crd-labels (and update any include/
template names if needed) and run helm template to verify no missing template
references.
packages/system/cert-manager/charts/cert-manager/values.yaml (1)

529-550: Heads-up: v1.19 removes a Prometheus metric label — existing dashboards/alerts may break.

The v1.19 release removes the high-cardinality path label from the certmanager_acme_client_request_count and certmanager_acme_client_request_duration_seconds metrics, replacing it with a new bounded-cardinality action label. This may require updates to dashboards and alerts. Additionally, certificate metrics were updated to the collector approach.

Before deploying, audit any Prometheus alerts or Grafana dashboards that query these metrics using .path and update them to use .action instead.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/system/cert-manager/charts/cert-manager/values.yaml` around lines
529 - 550, Add a clear upgrade note in this values.yaml (near the
servicemonitor/prometheus settings) warning that v1.19 removed the
high-cardinality path label and replaced it with action for
certmanager_acme_client_request_count and
certmanager_acme_client_request_duration_seconds, and that certificate metrics
now use the collector approach; instruct operators to audit and update any
Prometheus alerts or Grafana dashboards that reference .path to use .action (or
update queries for the collector-style certificate metrics) before enabling
ServiceMonitor/Prometheus scraping via the
servicemonitor/prometheusInstance/targetPort configuration.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@packages/system/cert-manager-crds/values.yaml`:
- Around line 1-6: The values.yaml is missing the top-level creator key so the
cert-manager.crd-labels template (which checks {{- if eq .Values.creator "helm"
}}) omits managed-by/helm.sh/chart labels; add a top-level creator: "helm" entry
in this values.yaml (next to existing global/crds keys) so .Values.creator
resolves to "helm" and the labels are rendered.

---

Duplicate comments:
In
`@packages/system/cert-manager/charts/cert-manager/templates/cainjector-deployment.yaml`:
- Around line 70-72: The hostUsers line in the cainjector-deployment.yaml
template contains trailing whitespace ("hostUsers: {{ .Values.global.hostUsers
}}       "); remove the extra spaces after the template expression so the line
ends immediately after the closing braces, and mirror the same fix applied to
deployment.yaml; update the hostUsers line in the cainjector-deployment.yaml
template and run your YAML/lint checks to confirm no trailing spaces remain.
- Around line 142-143: The nodeSelector merge currently uses merge $nodeSelector
(.Values.cainjector.nodeSelector | default dict) so the global map ends up
winning; flip the operands so the cainjector-specific map takes precedence by
changing the merge call to merge (.Values.cainjector.nodeSelector | default
dict) $nodeSelector in the cainjector-deployment.yaml block that defines
$nodeSelector to ensure .Values.cainjector.nodeSelector overrides
.Values.global.nodeSelector.

In `@packages/system/cert-manager/charts/cert-manager/templates/deployment.yaml`:
- Around line 69-71: The deployment template block that checks for the presence
of hostUsers (the conditional using hasKey .Values.global "hostUsers" and the
hostUsers: {{ .Values.global.hostUsers }} line) contains trailing whitespace
after the interpolation; remove the extra spaces after the closing }} so the
line is exactly `hostUsers: {{ .Values.global.hostUsers }}` (no trailing spaces)
and ensure similar lines have no trailing whitespace.
- Around line 215-221: The merge currently gives global nodeSelector precedence;
swap the operands so the component-specific selector wins by changing the merge
invocation from merge $nodeSelector (.Values.nodeSelector | default dict) to
merge (.Values.nodeSelector | default dict) $nodeSelector (and make the
identical change in cainjector-deployment.yaml and webhook-deployment.yaml where
lines show the same merge usage) so component-specific .Values.nodeSelector
overrides the global value.

In
`@packages/system/cert-manager/charts/cert-manager/templates/webhook-deployment.yaml`:
- Around line 69-71: The template line setting hostUsers contains trailing
whitespace; remove the extra spaces after {{ .Values.global.hostUsers }} so the
hostUsers line is clean (in the webhook-deployment template where hostUsers is
rendered using .Values.global.hostUsers) to match other deployment templates and
avoid formatting lint errors.
- Around line 186-192: The nodeSelector merge uses merge $nodeSelector
(.Values.webhook.nodeSelector | default dict) with global values taking
precedence; change the merge operand order so the webhook-specific selector
overrides globals — i.e., compute $nodeSelector by merging
(.Values.webhook.nodeSelector | default dict) with .Values.global.nodeSelector |
default dict instead of the current order, updating the $nodeSelector assignment
where merge is called (referencing the $nodeSelector variable and the
.Values.webhook.nodeSelector and .Values.global.nodeSelector operands).

---

Nitpick comments:
In `@packages/system/cert-manager-crds/templates/_helpers.tpl`:
- Around line 1-213: This helpers file contains many templates not used by the
CRDs chart; keep only the templates required by the CRD manifests
(cert-manager.crd-labels and its transitive dependencies: cert-manager.name,
labels, chartName) and remove dead templates (e.g., webhook.*, cainjector.*,
startupapicheck.*, image, cert-manager.serviceAccountName,
cert-manager.fullname, cert-manager.namespace, cert-manager.crd-check) so the
file is minimal; ensure you preserve any small helper fragments referenced by
cert-manager.crd-labels (and update any include/ template names if needed) and
run helm template to verify no missing template references.

In `@packages/system/cert-manager/charts/cert-manager/values.yaml`:
- Around line 529-550: Add a clear upgrade note in this values.yaml (near the
servicemonitor/prometheus settings) warning that v1.19 removed the
high-cardinality path label and replaced it with action for
certmanager_acme_client_request_count and
certmanager_acme_client_request_duration_seconds, and that certificate metrics
now use the collector approach; instruct operators to audit and update any
Prometheus alerts or Grafana dashboards that reference .path to use .action (or
update queries for the collector-style certificate metrics) before enabling
ServiceMonitor/Prometheus scraping via the
servicemonitor/prometheusInstance/targetPort configuration.

Copy link
Contributor

@lexfrei lexfrei left a comment

Choose a reason for hiding this comment

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

E2E Test Failure: kubernetes-latest (v1.33) — Nodes Never Become Ready

Test Failure Summary

The kubernetes-latest E2E test consistently fails (3 attempts, all fail). The kubernetes-previous (v1.32) test passes on this same PR. Both tests pass on main.

cert-manager tenant K8s Node Ready time Result
v1.17.2 (main) v1.33 ~71s PASS
v1.17.2 (main) v1.32 ~95s PASS
v1.19.3 (this PR) v1.33 >120s, never FAIL
v1.19.3 (this PR) v1.32 ~83s PASS

The management cluster is K8s v1.33.2 in both cases. cert-manager is disabled in the tenant cluster (certManager: enabled: false).

What happens: The tenant v1.33 control plane comes up fully Ready (KamajiControlPlane INITIALIZED=true, READY=true, all deployments available, MachineDeployment replicas=2). Worker nodes appear (2 nodes found), but they never become Ready — even after 7+ minutes across 3 retries. This is not a flaky test or timeout edge case — something is fundamentally broken.

Refs:


cert-manager v1.17 → v1.19 Breaking Changes

This update skips v1.18, which introduced significant behavioral changes:

v1.17 → v1.18:

  • PrivateKeyRotationPolicy default changed from Never to Always (feature gate DefaultPrivateKeyRotationPolicyAlways). Any certificate renewal now generates a new private key. For CA certificates, this can break the entire trust chain if downstream certs aren't re-issued.
  • RevisionHistoryLimit default: nil → 1. Old CertificateRequest resources are auto-deleted.
  • RSA signing: SHA-256 → SHA-384 for ≥3072-bit keys, SHA-512 for ≥4096-bit keys.

v1.18 → v1.19:

  • CRD-based API defaults for issuerRef: group now defaults to cert-manager.io, kind to Issuer. This caused mass certificate re-issuance (#8158, #8182).
  • v1.19.3 fixes infinite re-issuance loop when issuer returns cert with mismatched public key.
  • SKI (Subject Key Identifier) generation changed due to Go runtime update (#8289).

Affected Certificate Resources in Cozystack

All webhook Certificate resources in the management cluster define issuerRef without the group field:

Kamaji (packages/system/kamaji/charts/kamaji/templates/certmanager_certificate.yaml):

issuerRef:
  kind: Issuer
  name: kamaji-selfsigned-issuer
  # group: NOT specified

CAPI Core (packages/system/capi-providers-core/files/core-components.yaml):

issuerRef:
  kind: Issuer
  name: capi-selfsigned-issuer
  # group: NOT specified

CAPI Bootstrap and Infrastructure providers follow the same pattern.

With v1.19 CRDs, the API server adds group: cert-manager.io automatically. Combined with PrivateKeyRotationPolicy: Always, this could trigger webhook certificate re-issuance with new keys, temporarily or permanently breaking webhook availability for Kamaji and CAPI providers.


Values Configuration

# Old (main) - correctly nested under subchart name:
cert-manager:
  installCRDs: false

# New (this PR) - NOT nested under subchart:
crds:
  enabled: true

The crds: enabled: true is at the top level of the umbrella chart, not nested under cert-manager:. The subchart receives only its default values. Functionally this works since CRDs are in a separate package and the only override was installCRDs: false, but the structure is misleading.

Also: _helpers.tpl in the CRDs package references .Values.creator which is not defined in cert-manager-crds/values.yaml (it comes from the cert-manager chart defaults where it equals "helm").


Recommended Next Steps

To debug the v1.33 node readiness failure, you can add temporary diagnostic output to the E2E test. For example, in hack/e2e-apps/run-kubernetes.sh before the wait node --all --for=condition=Ready call (line 101), add commands to dump node conditions and pod status via the tenant kubeconfig:

kubectl --kubeconfig "tenantkubeconfig-${test_name}" get nodes -o wide
kubectl --kubeconfig "tenantkubeconfig-${test_name}" describe nodes
kubectl -n tenant-test get hr  # Cilium/CoreDNS HelmRelease status
kubectl -n tenant-test get certificates  # cert-manager certificate health

Push the change, and the CI output will show what's blocking node readiness (missing CNI, uninitialized taint, etc.).

Beyond debugging, consider these fixes:

  1. Pin privateKey.rotationPolicy: Never for webhook certificates (Kamaji, CAPI providers) to avoid unexpected key rotation introduced in v1.18+

  2. Add explicit group: cert-manager.io to issuerRef in Kamaji/CAPI Certificate resources to avoid CRD defaulting side effects (see #8158, #8182)

  3. Ensure kubernetes-latest E2E passes before merging

lexfrei

This comment was marked as duplicate.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@hack/e2e-apps/run-kubernetes.sh`:
- Line 101: The kubectl node readiness wait in run-kubernetes.sh currently
swallows failures with "|| true"; change it to capture the kubectl exit code
from the wait (the command starting with "kubectl --kubeconfig
\"tenantkubeconfig-${test_name}\" wait node --all --timeout=2m
--for=condition=Ready"), run the diagnostic dump when that exit code is
non-zero, then exit the script with that captured non-zero code so the test
still fails after diagnostics are printed.
- Around line 104-105: The two diagnostic kubectl commands (kubectl -n
tenant-test get hr and kubectl -n tenant-test get certificates) can fail under
set -e and should not abort the script; modify those commands to append "||
true" so they always succeed (e.g., change "kubectl -n tenant-test get hr" and
"kubectl -n tenant-test get certificates" to "kubectl -n tenant-test get hr ||
true" and "kubectl -n tenant-test get certificates || true").

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Duplicate comments:
In `@hack/e2e-apps/run-kubernetes.sh`:
- Around line 101-105: The current replacement of "|| true" with the if !
kubectl --kubeconfig "tenantkubeconfig-${test_name}" wait node --all
--timeout=2m --for=condition=Ready; then ... fi block prints diagnostics when
nodes are not Ready but still allows the script to continue; update the block so
that after running diagnostics (the kubectl describe nodes and kubectl -n
tenant-test get hr commands) the script exits with a non-zero status
(propagating the kubectl wait failure) — e.g., capture the wait command's exit
code or use an explicit exit with that code — to ensure the test gate fails when
nodes are NotReady.
- Line 104: The diagnostic kubectl call "kubectl -n tenant-test get hr" can
return non-zero and abort the script under set -e; change that invocation in
hack/e2e-apps/run-kubernetes.sh (the kubectl -n tenant-test get hr line) to be
non-fatal by appending a safe-fail suffix (e.g., use "|| true") so it won't
terminate the script if the HelmRelease CRD is missing while still running the
rest of the diagnostics and failure handling.

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 think this changed is related to the PRs intent.

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Feb 26, 2026
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In
`@packages/system/cert-manager/charts/cert-manager/templates/cainjector-deployment.yaml`:
- Around line 142-143: The merge invocation uses global first so
component-specific values are being preserved instead of overriding; fix by
creating a vendored-chart overlay/patch that flips the merge argument order
(i.e., call merge with the component-specific nodeSelector as the first arg and
the global one second) for the templates referencing $nodeSelector and merge
(specifically in the cainjector-deployment.yaml, deployment.yaml,
webhook-deployment.yaml and startupapicheck-job.yaml templates), or
alternatively open an upstream cert-manager bug/PR to change the merge
precedence in those template usages rather than editing upstream directly.

In
`@packages/system/cert-manager/charts/cert-manager/templates/startupapicheck-job.yaml`:
- Around line 82-83: The merge call for $nodeSelector is using the wrong
argument order so global values take precedence; change the merge invocation so
component-specific values override global by merging the global dict into the
component dict (i.e. call merge with (.Values.startupapicheck.nodeSelector |
default dict) as the first/primary map and .Values.global.nodeSelector as the
second), updating the lines that set $nodeSelector (the variables $nodeSelector,
.Values.global.nodeSelector, .Values.startupapicheck.nodeSelector and the merge
call).

In `@packages/system/cert-manager/charts/cert-manager/values.yaml`:
- Around line 41-50: The comment for the configuration key global.hostUsers is
ambiguous; update the block so it clearly states the boolean semantics in one
place (e.g., "global.hostUsers: true = pods run with host user IDs and may
access host resources; false = pods run in user namespaces without host
access"), include the required Kubernetes version/feature-gate note and the
limitations link, and ensure any previous contradictory sentence ("Set to
false...") is removed or replaced so only the explicit true/false behavior is
described for global.hostUsers.

ℹ️ Review info

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between cd94b77 and 3d341c9.

📒 Files selected for processing (30)
  • packages/system/cert-manager-crds/Makefile
  • packages/system/cert-manager-crds/charts/cert-manager/Chart.yaml
  • packages/system/cert-manager-crds/charts/cert-manager/README.md
  • packages/system/cert-manager-crds/charts/cert-manager/templates/crds.yaml
  • packages/system/cert-manager-crds/charts/cert-manager/values.schema.json
  • packages/system/cert-manager-crds/charts/cert-manager/values.yaml
  • packages/system/cert-manager-crds/templates/_helpers.tpl
  • packages/system/cert-manager-crds/templates/crd-acme.cert-manager.io_challenges.yaml
  • packages/system/cert-manager-crds/templates/crd-acme.cert-manager.io_orders.yaml
  • packages/system/cert-manager-crds/templates/crd-cert-manager.io_certificaterequests.yaml
  • packages/system/cert-manager-crds/templates/crd-cert-manager.io_certificates.yaml
  • packages/system/cert-manager-crds/templates/crd-cert-manager.io_clusterissuers.yaml
  • packages/system/cert-manager-crds/templates/crd-cert-manager.io_issuers.yaml
  • packages/system/cert-manager-crds/values.yaml
  • packages/system/cert-manager/Makefile
  • packages/system/cert-manager/charts/cert-manager/Chart.yaml
  • packages/system/cert-manager/charts/cert-manager/README.md
  • packages/system/cert-manager/charts/cert-manager/templates/NOTES.txt
  • packages/system/cert-manager/charts/cert-manager/templates/_helpers.tpl
  • packages/system/cert-manager/charts/cert-manager/templates/cainjector-deployment.yaml
  • packages/system/cert-manager/charts/cert-manager/templates/crds.yaml
  • packages/system/cert-manager/charts/cert-manager/templates/deployment.yaml
  • packages/system/cert-manager/charts/cert-manager/templates/rbac.yaml
  • packages/system/cert-manager/charts/cert-manager/templates/serviceaccount.yaml
  • packages/system/cert-manager/charts/cert-manager/templates/servicemonitor.yaml
  • packages/system/cert-manager/charts/cert-manager/templates/startupapicheck-job.yaml
  • packages/system/cert-manager/charts/cert-manager/templates/webhook-deployment.yaml
  • packages/system/cert-manager/charts/cert-manager/values.schema.json
  • packages/system/cert-manager/charts/cert-manager/values.yaml
  • packages/system/cert-manager/values.yaml
💤 Files with no reviewable changes (5)
  • packages/system/cert-manager-crds/charts/cert-manager/values.schema.json
  • packages/system/cert-manager/values.yaml
  • packages/system/cert-manager-crds/charts/cert-manager/README.md
  • packages/system/cert-manager-crds/charts/cert-manager/Chart.yaml
  • packages/system/cert-manager-crds/charts/cert-manager/values.yaml
🚧 Files skipped from review as they are similar to previous changes (5)
  • packages/system/cert-manager/charts/cert-manager/templates/servicemonitor.yaml
  • packages/system/cert-manager/charts/cert-manager/templates/deployment.yaml
  • packages/system/cert-manager/charts/cert-manager/templates/webhook-deployment.yaml
  • packages/system/cert-manager/charts/cert-manager/templates/rbac.yaml
  • packages/system/cert-manager-crds/templates/_helpers.tpl

@lexfrei lexfrei force-pushed the update-cert-manager branch from 3d341c9 to 4df456f Compare February 26, 2026 12:29
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

♻️ Duplicate comments (1)
packages/system/cert-manager/charts/cert-manager/templates/cainjector-deployment.yaml (1)

142-143: ⚠️ Potential issue | 🟠 Major

Component nodeSelector precedence is currently reversed (and mutates shared map state).

At Line 142 and Line 143, merge is called with the global selector as the first argument, so conflicting keys keep global values instead of component values. Because merge mutates its first argument, component-only keys can also bleed into later renders.

Suggested fix
-      {{- $nodeSelector := .Values.global.nodeSelector | default dict }}
-      {{- $nodeSelector = merge $nodeSelector (.Values.cainjector.nodeSelector | default dict) }}
+      {{- $nodeSelector := deepCopy (.Values.global.nodeSelector | default dict) }}
+      {{- $nodeSelector = mergeOverwrite $nodeSelector (.Values.cainjector.nodeSelector | default dict) }}

Based on learnings: In Helm templates, mergeOverwrite has right-to-left precedence, so defaults should be left and user/component values should be right to take precedence.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@packages/system/cert-manager/charts/cert-manager/templates/cainjector-deployment.yaml`
around lines 142 - 143, The nodeSelector merge is using merge with the global
selector first which preserves global keys and mutates the first map (variable
$nodeSelector), causing component keys to be ignored or bleed into later
renders; change the logic to use mergeOverwrite (which has right-to-left
precedence) and pass defaults on the left and the component/user selector on the
right so .Values.cainjector.nodeSelector overrides .Values.global.nodeSelector,
and avoid mutating shared state by assigning the merged result back to
$nodeSelector (reference the variables $nodeSelector,
.Values.global.nodeSelector, .Values.cainjector.nodeSelector and replace merge
with mergeOverwrite).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@packages/system/cert-manager/charts/cert-manager/Chart.yaml`:
- Line 9: The Chart.yaml change bumping appVersion to v1.19.3 was made directly
in the vendored cert-manager chart; revert that direct edit and update the
vendored chart using the project's chart dependency/vendoring workflow instead
(e.g., update the Helm dependency entry or run the vendoring tool to fetch
cert-manager v1.19.3), ensure Chart.yaml and Chart.lock (or vendor metadata) are
updated via the tooling rather than manual edits, and include a short commit
message referencing the cert-manager version and the vendoring command used so
reviewers can verify the proper dependency update.

In `@packages/system/cert-manager/charts/cert-manager/values.schema.json`:
- Around line 727-729: The description for helm-values.global.hostUsers in
values.schema.json is contradictory about the true/false behavior; update the
source values metadata (the original values.yaml/metadata used by
cozyvalues-gen) so the description unambiguously states what true and false do
(e.g., "true = run pods in a user namespace without host access; false = do not
use user namespaces and allow host access"), ensure any mention of requirements
remains, then regenerate values.schema.json and docs using cozyvalues-gen so the
produced schema contains the clarified description for
helm-values.global.hostUsers.

---

Duplicate comments:
In
`@packages/system/cert-manager/charts/cert-manager/templates/cainjector-deployment.yaml`:
- Around line 142-143: The nodeSelector merge is using merge with the global
selector first which preserves global keys and mutates the first map (variable
$nodeSelector), causing component keys to be ignored or bleed into later
renders; change the logic to use mergeOverwrite (which has right-to-left
precedence) and pass defaults on the left and the component/user selector on the
right so .Values.cainjector.nodeSelector overrides .Values.global.nodeSelector,
and avoid mutating shared state by assigning the merged result back to
$nodeSelector (reference the variables $nodeSelector,
.Values.global.nodeSelector, .Values.cainjector.nodeSelector and replace merge
with mergeOverwrite).

ℹ️ Review info

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3d341c9 and 4df456f.

📒 Files selected for processing (30)
  • packages/system/cert-manager-crds/Makefile
  • packages/system/cert-manager-crds/charts/cert-manager/Chart.yaml
  • packages/system/cert-manager-crds/charts/cert-manager/README.md
  • packages/system/cert-manager-crds/charts/cert-manager/templates/crds.yaml
  • packages/system/cert-manager-crds/charts/cert-manager/values.schema.json
  • packages/system/cert-manager-crds/charts/cert-manager/values.yaml
  • packages/system/cert-manager-crds/templates/_helpers.tpl
  • packages/system/cert-manager-crds/templates/crd-acme.cert-manager.io_challenges.yaml
  • packages/system/cert-manager-crds/templates/crd-acme.cert-manager.io_orders.yaml
  • packages/system/cert-manager-crds/templates/crd-cert-manager.io_certificaterequests.yaml
  • packages/system/cert-manager-crds/templates/crd-cert-manager.io_certificates.yaml
  • packages/system/cert-manager-crds/templates/crd-cert-manager.io_clusterissuers.yaml
  • packages/system/cert-manager-crds/templates/crd-cert-manager.io_issuers.yaml
  • packages/system/cert-manager-crds/values.yaml
  • packages/system/cert-manager/Makefile
  • packages/system/cert-manager/charts/cert-manager/Chart.yaml
  • packages/system/cert-manager/charts/cert-manager/README.md
  • packages/system/cert-manager/charts/cert-manager/templates/NOTES.txt
  • packages/system/cert-manager/charts/cert-manager/templates/_helpers.tpl
  • packages/system/cert-manager/charts/cert-manager/templates/cainjector-deployment.yaml
  • packages/system/cert-manager/charts/cert-manager/templates/crds.yaml
  • packages/system/cert-manager/charts/cert-manager/templates/deployment.yaml
  • packages/system/cert-manager/charts/cert-manager/templates/rbac.yaml
  • packages/system/cert-manager/charts/cert-manager/templates/serviceaccount.yaml
  • packages/system/cert-manager/charts/cert-manager/templates/servicemonitor.yaml
  • packages/system/cert-manager/charts/cert-manager/templates/startupapicheck-job.yaml
  • packages/system/cert-manager/charts/cert-manager/templates/webhook-deployment.yaml
  • packages/system/cert-manager/charts/cert-manager/values.schema.json
  • packages/system/cert-manager/charts/cert-manager/values.yaml
  • packages/system/cert-manager/values.yaml
💤 Files with no reviewable changes (5)
  • packages/system/cert-manager/values.yaml
  • packages/system/cert-manager-crds/charts/cert-manager/README.md
  • packages/system/cert-manager-crds/charts/cert-manager/values.schema.json
  • packages/system/cert-manager-crds/charts/cert-manager/Chart.yaml
  • packages/system/cert-manager-crds/charts/cert-manager/values.yaml
✅ Files skipped from review due to trivial changes (1)
  • packages/system/cert-manager-crds/values.yaml
🚧 Files skipped from review as they are similar to previous changes (4)
  • packages/system/cert-manager-crds/templates/_helpers.tpl
  • packages/system/cert-manager/charts/cert-manager/templates/_helpers.tpl
  • packages/system/cert-manager/charts/cert-manager/templates/webhook-deployment.yaml
  • packages/system/cert-manager/charts/cert-manager/templates/startupapicheck-job.yaml

Copy link
Contributor

@lexfrei lexfrei left a comment

Choose a reason for hiding this comment

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

Overview

The structural change from a subchart-based CRD packaging to direct templates is a solid improvement — cleaner, simpler, and aligned with upstream cert-manager's evolution in v1.19.x where the monolithic crds.yaml was split into individual crd-*.yaml files with native Helm templating.

What looks good

  • CRD/chart separation is correct: installCRDs: false and crds.enabled: false in cert-manager, crds.enabled: true and crds.keep: true in cert-manager-crds — no CRD duplication, resource-policy keep annotation is in place.
  • Version alignment: both cert-manager and cert-manager-crds now use v1.19.3 from the same chart pull (previously they were on different versions: v1.17.2 and v1.16.3 respectively).
  • Dependency chain (cert-manager-crds → cert-manager → cert-manager-issuers) is not affected, no platform-level changes needed.
  • NAME and NAMESPACE exports added to cert-manager-crds/Makefile fix what was previously missing for make show, make apply, etc.
  • Both charts render cleanly with helm template.

Blocking issues

  1. make update does not clean stale CRD files — see inline comment on Makefile.
  2. Breaking behavior change crossing v1.18.0 — the DefaultPrivateKeyRotationPolicyAlways feature gate is now Beta and enabled by default. This changes the default Certificate.Spec.PrivateKey.RotationPolicy from Never to Always — all Certificate resources without an explicit rotationPolicy will start regenerating private keys on every renewal. This should either be explicitly disabled in packages/system/cert-manager/values.yaml to preserve pre-1.18 behavior:
    cert-manager:
      config:
        featureGates:
          DefaultPrivateKeyRotationPolicyAlways: false
    or documented as a known behavior change so operators are aware before upgrading.

Non-blocking suggestions

  1. Missing appVersion in cert-manager-crds/Chart.yaml: _helpers.tpl renders app.kubernetes.io/version: {{ .Chart.AppVersion }} which produces an empty string. Consider adding appVersion: v1.19.3 for informational purposes.

  2. No update target in cert-manager-crds/Makefile: CRD updates now happen through cert-manager/Makefile, but there's no indication of this for a developer running make update in the cert-manager-crds directory. A stub target would help:

    update:
    	@echo "CRDs are updated via ../cert-manager/Makefile: make update"

helm repo add jetstack https://charts.jetstack.io
helm repo update jetstack
helm pull jetstack/cert-manager --untar --untardir charts
mv charts/cert-manager/templates/crd-*.yaml ../cert-manager-crds/templates/
Copy link
Contributor

Choose a reason for hiding this comment

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

mv and cp add files to ../cert-manager-crds/templates/ but never clean up existing ones first. If a future upstream release renames or removes a CRD file, stale files will remain and continue to be rendered.

Add a cleanup step before mv:

	rm -f ../cert-manager-crds/templates/crd-*.yaml ../cert-manager-crds/templates/_helpers.tpl
	mv charts/cert-manager/templates/crd-*.yaml ../cert-manager-crds/templates/
	cp charts/cert-manager/templates/_helpers.tpl ../cert-manager-crds/templates/

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added less specific cleanup for crds, anyway if upstream cert-manager chart will change its structure again (filenames, etc.) than we'll need to refactor this script again

@dosubot dosubot bot removed the lgtm This PR has been approved by a maintainer label Feb 26, 2026
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Feb 26, 2026
@kvaps kvaps merged commit ac48228 into main Feb 27, 2026
8 checks passed
@kvaps kvaps deleted the update-cert-manager branch February 27, 2026 12:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request lgtm This PR has been approved by a maintainer size:XXL This PR changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants