Skip to content

[Cluster chart] Add support for failoverDelay #892

@olexiyb

Description

@olexiyb

The CNPG Cluster CRD supports spec.failoverDelay (integer seconds — delay before a primary is failed over once judged unhealthy), but the cluster chart does not expose it as a values key. Setting cluster.failoverDelay in values is silently dropped by the template.

This makes it impossible to use the chart for clusters that need to ride out brief instance-manager / kubelet hiccups without spurious failovers — which on storage without WAL archiving (eg. file-thinpool, local PV) can leave the old primary divergent with no pg_rewind archive to fall back to.

Reproducer

# values.yaml
cluster:
  failoverDelay: 30
helm template foo cloudnative-pg/cluster --version 0.6.1 -f values.yaml | grep failoverDelay
# (no output — chart never templates the field)

Proposed shape

Same pattern as #834 / #867 — small wire-up.

values.yaml (under cluster:):

  # -- Seconds to wait before triggering a failover after the primary is considered unhealthy.
  # See https://cloudnative-pg.io/documentation/current/cluster_conf/#failover
  failoverDelay: 0

templates/cluster.yaml (next to primaryUpdateMethod):

  failoverDelay: {{ .Values.cluster.failoverDelay }}

Happy to open a PR if the direction looks right.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions