← Back to Pull requests

Add renewal policy scenarios and link release notes to docs #2210

Merged
wallrj-cyberark merged 2 files (54 lines) on Aug 08, 2026 17:30 UTC
View on GitHub
wallrj-cyberark wallrj-cyberark commented on Jul 17, 2026 10:51 UTC
Author

Preview: https://deploy-preview-2210--cert-manager.netlify.app/docs/usage/certificate/#renewal-policies-and-renewal-windows

Summary

Adds worked, realistic scenarios to the "Renewal policies and renewal windows" documentation (added in #2018 for the v1.21 release), and fixes the v1.21 release notes entry for the feature.

  • Realistic scenarios, drawn from the original feature request (cert-manager/cert-manager#6754) so that each matches the feature's actual semantics — windows express a preference, not a guarantee, because cert-manager falls back to renewing at the calculated renewal time when no valid window exists before expiry:

  • - Renewing outside business hours: for workloads that restart when their certificate is renewed (Stakater Reloader, Strimzi), where renewal timing is outage timing — including the production Kafka outage reported in cert-manager/cert-manager#6754.
    - Renewing during staffed hours: so failures surface while engineers are at their desks, mirroring the preferred maintenance windows of managed services such as Amazon RDS and GKE.
    - Manually-managed root and intermediate CAs: policy: Disabled, with the claim scoped to automatic renewal since other reissuance triggers (spec changes, deleted Secret, cmctl renew) still apply.
    - A note advising that windows must recur comfortably more often than the effective renewBefore slack, so a valid window always exists before expiry.
  • Release notes fix: the existing v1.21 release notes entry referenced a renewalPolicies field which doesn't exist — the actual API field is spec.renewal — and linked the implementation PR (cert-manager/cert-manager#8258) rather than user-facing documentation. Updated to link the relevant section of certificate.md, using the heading anchor generated by rehype-slug rather than adding a duplicate explicit anchor.
  • Motivation

    While triaging cert-manager/cert-manager#9031 (a crash-loop bug specific to renewal.policy: Disabled, introduced by the same feature), I noticed the release notes pointed at the implementation PR rather than the docs, and the docs' motivation for the feature was a single terse line with no worked examples.

    An earlier revision of this PR invented scenarios (change freezes, coordinating rotation with a paired HSM/partner system) that promised hard guarantees the feature's fallback behaviour deliberately breaks. Review found those examples broken — a 5-field cron cannot exclude a freeze week, and a monthly window with 30d renewBefore leaves a dead zone in 31-day months — so they were replaced with the use cases real users actually asked for in cert-manager/cert-manager#6754. See https://github.com/cert-manager/website/pull/2210#issuecomment-5226307126 for details.

    Test plan

  • npm run check:spelling, npm run check:markdown and npm run check:links pass locally on the two changed files.

  • Netlify deploy preview (linked above): the "Realistic scenarios" section renders correctly and the #renewal-policies-and-renewal-windows anchor resolves; times inside fenced YAML blocks are unaffected by the MDX emoji-shortcode pipeline, matching the existing pattern earlier in the same file.
  • Diff: 54 lines (+53 / -1) across 2 files Reviewer: hjoshi123 Review duration: 32078m
    All Vouch review confidence checks passed
    Residual risk 0.03 = Change Risk (0.28) × (1 − Review Confidence (0.89)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.28 · 54 lines diff across 2 files
    0.28
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.89 · 5 substantive comment(s)
    0.89
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    89%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.240
    Real PR Conversation Timeline
    12 items
    netlify[bot] netlify[bot] commented on Jul 17, 2026 10:53 UTC
    Bot

    <span aria-hidden="true">✅</span> Deploy Preview for cert-manager ready!


    Built without sensitive environment variables

    | Name | Link |
    |:-:|------------------------|
    |<span aria-hidden="true">🔨</span> Latest commit | 6019705cd10dcac0389218c1572c960790ed855e |
    |<span aria-hidden="true">🔍</span> Latest deploy log | https://app.netlify.com/projects/cert-manager/deploys/6a77664f1797a900089889b7 |
    |<span aria-hidden="true">😎</span> Deploy Preview | https://deploy-preview-2210--cert-manager.netlify.app |
    |<span aria-hidden="true">📱</span> Preview on mobile | <details><summary> Toggle QR Code... </summary><br /><br />!QR Code<br /><br />_Use your smartphone camera to open QR code link._</details> |
    ---
    <!-- cert-manager Preview -->
    _To edit notification comments on pull requests, go to your Netlify project configuration._

    hjoshi123 hjoshi123 commented on code on Jul 18, 2026 16:43 UTC
    Code Review
    content/docs/usage/certificate.md:1
    @@ -411,6 +412,80 @@ To disable automatic renewal for a certificate, set `spec.renewal.policy` to `Di
     > will still happen at the calculated `desiredRenewalTime` using the `spec.renewBefore`/ `spec.renewBeforePercentage` fields.
     > This behavior is intentional and is done to avoid certificates from expiring due to window misconfiguration.
     
    +#### Realistic scenarios
    +
    +**Regulated change-control windows.** Organizations subject to formal change management (for
    +example, financial services or healthcare) often require that any production change, including
    +certificate rotation, only happens inside a pre-approved maintenance window, so that on-call
    +staff are available if something goes wrong and so the change is auditable against a change
    +ticket. A weekly Sunday-morning window keeps renewal off the calculated `renewBefore` time and
    +onto a predictable, approved schedule instead:
    +
    +```yaml
    +spec:
    +  duration: 2160h # 90d
    +  renewBefore: 360h # 15d
    +  renewal:
    +    policy: RenewBefore
    +    windows:
    +      - cron: "0 3 * * 0" # every Sunday at 03:00
    +        timezone: America/New_York
    +        windowDuration: 2h
    +```
    +
    +**Coordinating rotation with a paired system.** Some certificates are consumed by more than one

    **Coordinating rotation with a paired system:** Some certificates are consumed by more than one
    

    hjoshi123 hjoshi123 commented on code on Jul 18, 2026 16:44 UTC
    Code Review
    content/docs/usage/certificate.md:1
    @@ -411,6 +412,80 @@ To disable automatic renewal for a certificate, set `spec.renewal.policy` to `Di
     > will still happen at the calculated `desiredRenewalTime` using the `spec.renewBefore`/ `spec.renewBeforePercentage` fields.
     > This behavior is intentional and is done to avoid certificates from expiring due to window misconfiguration.
     
    +#### Realistic scenarios
    +
    +**Regulated change-control windows.** Organizations subject to formal change management (for
    +example, financial services or healthcare) often require that any production change, including
    +certificate rotation, only happens inside a pre-approved maintenance window, so that on-call
    +staff are available if something goes wrong and so the change is auditable against a change
    +ticket. A weekly Sunday-morning window keeps renewal off the calculated `renewBefore` time and
    +onto a predictable, approved schedule instead:
    +
    +```yaml
    +spec:
    +  duration: 2160h # 90d
    +  renewBefore: 360h # 15d
    +  renewal:
    +    policy: RenewBefore
    +    windows:
    +      - cron: "0 3 * * 0" # every Sunday at 03:00
    +        timezone: America/New_York
    +        windowDuration: 2h
    +```
    +
    +**Coordinating rotation with a paired system.** Some certificates are consumed by more than one
    +independently-managed system that must pick up a new certificate together — for example, an
    +mTLS certificate shared with an external partner, or a certificate whose private key is mirrored
    +into a hardware security module (HSM) by a separate process. Renewing on an unpredictable
    +schedule risks one side rotating before the other is ready. Restricting renewal to a known
    +window (agreed with the partner team, or aligned with the HSM sync job's own schedule) means
    +downstream automation can reliably run immediately afterwards:

    downstream automation can reliably run immediately afterwards.
    

    hjoshi123 hjoshi123 commented on code on Jul 18, 2026 16:44 UTC
    Code Review
    content/docs/usage/certificate.md:1
    @@ -411,6 +412,80 @@ To disable automatic renewal for a certificate, set `spec.renewal.policy` to `Di
     > will still happen at the calculated `desiredRenewalTime` using the `spec.renewBefore`/ `spec.renewBeforePercentage` fields.
     > This behavior is intentional and is done to avoid certificates from expiring due to window misconfiguration.
     
    +#### Realistic scenarios
    +
    +**Regulated change-control windows.** Organizations subject to formal change management (for
    +example, financial services or healthcare) often require that any production change, including
    +certificate rotation, only happens inside a pre-approved maintenance window, so that on-call
    +staff are available if something goes wrong and so the change is auditable against a change
    +ticket. A weekly Sunday-morning window keeps renewal off the calculated `renewBefore` time and
    +onto a predictable, approved schedule instead:
    +
    +```yaml
    +spec:
    +  duration: 2160h # 90d
    +  renewBefore: 360h # 15d
    +  renewal:
    +    policy: RenewBefore
    +    windows:
    +      - cron: "0 3 * * 0" # every Sunday at 03:00
    +        timezone: America/New_York
    +        windowDuration: 2h
    +```
    +
    +**Coordinating rotation with a paired system.** Some certificates are consumed by more than one
    +independently-managed system that must pick up a new certificate together — for example, an
    +mTLS certificate shared with an external partner, or a certificate whose private key is mirrored
    +into a hardware security module (HSM) by a separate process. Renewing on an unpredictable
    +schedule risks one side rotating before the other is ready. Restricting renewal to a known
    +window (agreed with the partner team, or aligned with the HSM sync job's own schedule) means
    +downstream automation can reliably run immediately afterwards:
    +
    +```yaml
    +spec:
    +  duration: 8760h # 365d
    +  renewBefore: 720h # 30d
    +  renewal:
    +    policy: RenewBefore
    +    windows:
    +      - cron: "0 1 1 * *" # 01:00 on the first of each month
    +        timezone: UTC
    +        windowDuration: 4h
    +```
    +
    +**Avoiding renewal during a traffic freeze.** A retailer running a change freeze during a

    **Avoiding renewal during a traffic freeze:** A retailer running a change freeze during a
    

    hjoshi123 hjoshi123 commented on code on Jul 18, 2026 16:44 UTC
    Code Review
    content/docs/usage/certificate.md:1
    @@ -411,6 +412,80 @@ To disable automatic renewal for a certificate, set `spec.renewal.policy` to `Di
     > will still happen at the calculated `desiredRenewalTime` using the `spec.renewBefore`/ `spec.renewBeforePercentage` fields.
     > This behavior is intentional and is done to avoid certificates from expiring due to window misconfiguration.
     
    +#### Realistic scenarios
    +
    +**Regulated change-control windows.** Organizations subject to formal change management (for
    +example, financial services or healthcare) often require that any production change, including
    +certificate rotation, only happens inside a pre-approved maintenance window, so that on-call
    +staff are available if something goes wrong and so the change is auditable against a change
    +ticket. A weekly Sunday-morning window keeps renewal off the calculated `renewBefore` time and
    +onto a predictable, approved schedule instead:
    +
    +```yaml
    +spec:
    +  duration: 2160h # 90d
    +  renewBefore: 360h # 15d
    +  renewal:
    +    policy: RenewBefore
    +    windows:
    +      - cron: "0 3 * * 0" # every Sunday at 03:00
    +        timezone: America/New_York
    +        windowDuration: 2h
    +```
    +
    +**Coordinating rotation with a paired system.** Some certificates are consumed by more than one
    +independently-managed system that must pick up a new certificate together — for example, an
    +mTLS certificate shared with an external partner, or a certificate whose private key is mirrored
    +into a hardware security module (HSM) by a separate process. Renewing on an unpredictable
    +schedule risks one side rotating before the other is ready. Restricting renewal to a known
    +window (agreed with the partner team, or aligned with the HSM sync job's own schedule) means
    +downstream automation can reliably run immediately afterwards:
    +
    +```yaml
    +spec:
    +  duration: 8760h # 365d
    +  renewBefore: 720h # 30d
    +  renewal:
    +    policy: RenewBefore
    +    windows:
    +      - cron: "0 1 1 * *" # 01:00 on the first of each month
    +        timezone: UTC
    +        windowDuration: 4h
    +```
    +
    +**Avoiding renewal during a traffic freeze.** A retailer running a change freeze during a
    +high-traffic sales event (for example, Black Friday week) wants to guarantee that no certificate
    +rotation happens during that period, even if the calculated `renewBefore` time falls inside it.
    +Configuring windows that only open outside the freeze period defers renewal until the next
    +matching window after the freeze ends, provided one still exists before the certificate expires:

    matching window after the freeze ends, provided one still exists before the certificate expires.
    

    hjoshi123 hjoshi123 commented on code on Jul 18, 2026 16:44 UTC
    Code Review
    content/docs/usage/certificate.md:1
    @@ -411,6 +412,80 @@ To disable automatic renewal for a certificate, set `spec.renewal.policy` to `Di
     > will still happen at the calculated `desiredRenewalTime` using the `spec.renewBefore`/ `spec.renewBeforePercentage` fields.
     > This behavior is intentional and is done to avoid certificates from expiring due to window misconfiguration.
     
    +#### Realistic scenarios
    +
    +**Regulated change-control windows.** Organizations subject to formal change management (for
    +example, financial services or healthcare) often require that any production change, including
    +certificate rotation, only happens inside a pre-approved maintenance window, so that on-call
    +staff are available if something goes wrong and so the change is auditable against a change
    +ticket. A weekly Sunday-morning window keeps renewal off the calculated `renewBefore` time and
    +onto a predictable, approved schedule instead:
    +
    +```yaml
    +spec:
    +  duration: 2160h # 90d
    +  renewBefore: 360h # 15d
    +  renewal:
    +    policy: RenewBefore
    +    windows:
    +      - cron: "0 3 * * 0" # every Sunday at 03:00
    +        timezone: America/New_York
    +        windowDuration: 2h
    +```
    +
    +**Coordinating rotation with a paired system.** Some certificates are consumed by more than one
    +independently-managed system that must pick up a new certificate together — for example, an
    +mTLS certificate shared with an external partner, or a certificate whose private key is mirrored
    +into a hardware security module (HSM) by a separate process. Renewing on an unpredictable
    +schedule risks one side rotating before the other is ready. Restricting renewal to a known
    +window (agreed with the partner team, or aligned with the HSM sync job's own schedule) means
    +downstream automation can reliably run immediately afterwards:
    +
    +```yaml
    +spec:
    +  duration: 8760h # 365d
    +  renewBefore: 720h # 30d
    +  renewal:
    +    policy: RenewBefore
    +    windows:
    +      - cron: "0 1 1 * *" # 01:00 on the first of each month
    +        timezone: UTC
    +        windowDuration: 4h
    +```
    +
    +**Avoiding renewal during a traffic freeze.** A retailer running a change freeze during a
    +high-traffic sales event (for example, Black Friday week) wants to guarantee that no certificate
    +rotation happens during that period, even if the calculated `renewBefore` time falls inside it.
    +Configuring windows that only open outside the freeze period defers renewal until the next
    +matching window after the freeze ends, provided one still exists before the certificate expires:
    +
    +```yaml
    +spec:
    +  duration: 2160h # 90d
    +  renewBefore: 720h # 30d
    +  renewal:
    +    policy: RenewBefore
    +    windows:
    +      - cron: "0 4 * * 2" # Tuesdays at 04:00, well outside the freeze
    +        timezone: America/Chicago
    +        windowDuration: 3h
    +```
    +
    +**Manually-managed root and intermediate CAs.** A root or long-lived intermediate CA certificate
    +is sometimes deliberately excluded from automated rotation because reissuing it requires an
    +offline key ceremony, updating distributed trust bundles across many clusters, or other manual
    +coordination that cert-manager cannot perform on its own. Setting `policy: Disabled` documents
    +that intent directly on the resource and prevents cert-manager from ever attempting an
    +unattended rotation of it:

    unattended rotation of it.
    

    hjoshi123 hjoshi123 commented on code on Jul 18, 2026 16:44 UTC
    Code Review
    content/docs/usage/certificate.md:1
    @@ -411,6 +412,80 @@ To disable automatic renewal for a certificate, set `spec.renewal.policy` to `Di
     > will still happen at the calculated `desiredRenewalTime` using the `spec.renewBefore`/ `spec.renewBeforePercentage` fields.
     > This behavior is intentional and is done to avoid certificates from expiring due to window misconfiguration.
     
    +#### Realistic scenarios
    +
    +**Regulated change-control windows.** Organizations subject to formal change management (for
    +example, financial services or healthcare) often require that any production change, including
    +certificate rotation, only happens inside a pre-approved maintenance window, so that on-call
    +staff are available if something goes wrong and so the change is auditable against a change
    +ticket. A weekly Sunday-morning window keeps renewal off the calculated `renewBefore` time and
    +onto a predictable, approved schedule instead:
    +
    +```yaml
    +spec:
    +  duration: 2160h # 90d
    +  renewBefore: 360h # 15d
    +  renewal:
    +    policy: RenewBefore
    +    windows:
    +      - cron: "0 3 * * 0" # every Sunday at 03:00
    +        timezone: America/New_York
    +        windowDuration: 2h
    +```
    +
    +**Coordinating rotation with a paired system.** Some certificates are consumed by more than one
    +independently-managed system that must pick up a new certificate together — for example, an
    +mTLS certificate shared with an external partner, or a certificate whose private key is mirrored
    +into a hardware security module (HSM) by a separate process. Renewing on an unpredictable
    +schedule risks one side rotating before the other is ready. Restricting renewal to a known
    +window (agreed with the partner team, or aligned with the HSM sync job's own schedule) means
    +downstream automation can reliably run immediately afterwards:
    +
    +```yaml
    +spec:
    +  duration: 8760h # 365d
    +  renewBefore: 720h # 30d
    +  renewal:
    +    policy: RenewBefore
    +    windows:
    +      - cron: "0 1 1 * *" # 01:00 on the first of each month
    +        timezone: UTC
    +        windowDuration: 4h
    +```
    +
    +**Avoiding renewal during a traffic freeze.** A retailer running a change freeze during a
    +high-traffic sales event (for example, Black Friday week) wants to guarantee that no certificate
    +rotation happens during that period, even if the calculated `renewBefore` time falls inside it.
    +Configuring windows that only open outside the freeze period defers renewal until the next
    +matching window after the freeze ends, provided one still exists before the certificate expires:
    +
    +```yaml
    +spec:
    +  duration: 2160h # 90d
    +  renewBefore: 720h # 30d
    +  renewal:
    +    policy: RenewBefore
    +    windows:
    +      - cron: "0 4 * * 2" # Tuesdays at 04:00, well outside the freeze
    +        timezone: America/Chicago
    +        windowDuration: 3h
    +```
    +
    +**Manually-managed root and intermediate CAs.** A root or long-lived intermediate CA certificate

    **Manually-managed root and intermediate CAs:** A root or long-lived intermediate CA certificate
    

    wallrj wallrj commented on Aug 08, 2026 13:27 UTC
    Contributor

    I've replaced the change-freeze and paired-system scenarios: both promised guarantees that the desiredRenewalTime fallback deliberately breaks (a 5-field cron can't exclude a freeze week, and a monthly window with 30d renewBefore leaves a dead zone in 31-day months). The scenarios are now the ones with real users behind them — renewal-triggered restarts rolling a Kafka cluster at peak load (#6754, the original request) and staffed-hours renewal, mirroring RDS/GKE maintenance windows — plus a note that windows must recur more often than the renewBefore slack, and that they express a preference, not a guarantee.

    Also scoped the policy: Disabled claim to automatic renewal (other reissuance triggers still apply) and linked the auto-generated heading anchor from the release notes instead of adding a duplicate.

    with claude fable-5

    wallrj wallrj commented on Aug 08, 2026 17:27 UTC
    Contributor

    /label tide/merge-method-squash

    wallrj wallrj commented on Aug 08, 2026 17:29 UTC
    Contributor

    /lgtm
    /approve

    with claude fable-5

    cert-manager-prow[bot] cert-manager-prow[bot] commented on Aug 08, 2026 17:30 UTC
    Bot

    [APPROVALNOTIFIER] This PR is APPROVED

    This pull-request has been approved by: <a href="https://github.com/cert-manager/website/pull/2210#issuecomment-5227281336" title="Approved">wallrj</a>

    The full list of commands accepted by this bot can be found here.

    The pull request process is described here

    <details >
    Needs approval from an approver in each of these files:

  • ~~OWNERS~~ [wallrj]
  • Approvers can indicate their approval by writing /approve in a comment
    Approvers can cancel approval by writing /approve cancel in a comment
    </details>
    <!-- META={"approvers":[]} -->

    Reviewers
    Assignees
    wallrj-cyberark wallrj-cyberark
    Labels
    risk: low confidence: 89.1% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 28.4% (LOW) · Higher = larger blast radius
    28.4%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 89.1% · Lower = rushed or shallow review
    89.1%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 3.1% · Safe to merge
    3.1%