Files
k8scd/apps/templates/snapshot-controller-helm.yaml
T
Ruben Hensen 858904384c Give leader-elected controllers longer leases
The snapshot-controller (1,059 restarts), the CNPG operator and Envoy
Gateway restart whenever a lease renewal takes more than 10 seconds,
which happens when heavy writes stall dqlite on the node's SSD. Raise
lease duration, renew deadline and retry period from 15s/10s/2s to
60s/40s/5s so they ride out stalls of up to ~40 seconds. With one
replica, or a standby, a slower takeover costs nothing here.
2026-10-24 14:43:38 +02:00

40 lines
1.2 KiB
YAML

apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: external-snapshotter
namespace: argocd
spec:
project: default
source:
repoURL: https://github.com/kubernetes-csi/external-snapshotter.git
targetRevision: v8.2.1
path: deploy/kubernetes/snapshot-controller
kustomize:
patches:
# Ride out dqlite stalls of up to ~40s instead of restarting when a
# lease renewal takes over 10s (docs/upgrade-k8s-1.33.md).
- target:
kind: Deployment
name: snapshot-controller
patch: |-
- op: add
path: /spec/template/spec/containers/0/args/-
value: --leader-election-lease-duration=60s
- op: add
path: /spec/template/spec/containers/0/args/-
value: --leader-election-renew-deadline=40s
- op: add
path: /spec/template/spec/containers/0/args/-
value: --leader-election-retry-period=5s
destination:
server: https://kubernetes.default.svc
namespace: kube-system
syncPolicy:
automated:
selfHeal: true
prune: true
syncOptions:
- CreateNamespace=true
automated:
selfHeal: true