[Cluster chart] Add support for failoverDelay

Open Beginner friendly
#892 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
82/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Quiet
Tech stack
helm
Domain
devops

Research direction

Update values.yaml under cluster and templates/cluster.yaml next to primaryUpdateMethod. Start by running the provided helm template command with the reproducer values, then verify the rendered Cluster includes failoverDelay and that the default remains 0.

Written by the indexing model from the issue text.

Description

chart( cluster )

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.

Dominant language
Go Template
Stars
622
Forks
264
Avg merge
6d 16h
Merged PRs (30d)
8

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from cloudnative-pg/charts

All issues in cloudnative-pg/charts

Similar issues

More DevOps issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.