File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,6 +7,10 @@ metadata:
77 {{- include "better-stack-collector.labels" . | nindent 4 }}
88 app.kubernetes.io/component : better-stack-collector
99spec :
10+ {{- with .Values.collector.updateStrategy }}
11+ updateStrategy :
12+ {{- toYaml . | nindent 4 }}
13+ {{- end }}
1014 selector :
1115 matchLabels :
1216 {{- include "better-stack-collector.selectorLabels" . | nindent 6 }}
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+ set -euo pipefail
3+ source " $( dirname " $0 " ) /helpers.sh"
4+
5+ output=$( render \
6+ --set collector.env.COLLECTOR_SECRET=test123 \
7+ --set ' collector.updateStrategy.type=RollingUpdate' \
8+ --set ' collector.updateStrategy.rollingUpdate.maxUnavailable=25%' \
9+ --set ' collector.updateStrategy.rollingUpdate.maxSurge=0' )
10+
11+ assert_contains " $output " ' updateStrategy:' " Missing updateStrategy block on DaemonSet"
12+ assert_contains " $output " ' type: RollingUpdate' " Missing updateStrategy.type"
13+ assert_contains " $output " ' maxUnavailable: 25%' " Missing maxUnavailable override"
14+ assert_contains " $output " ' maxSurge: 0' " Missing maxSurge override"
15+
16+ pass
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+ set -euo pipefail
3+ source " $( dirname " $0 " ) /helpers.sh"
4+
5+ # Default values must not emit an updateStrategy block, so Kubernetes
6+ # applies its DaemonSet default and existing installs see no change.
7+ output=$( render --set collector.env.COLLECTOR_SECRET=test123)
8+
9+ assert_not_contains " $output " ' updateStrategy:' \
10+ " Unexpected updateStrategy block when collector.updateStrategy is unset"
11+
12+ pass
Original file line number Diff line number Diff line change @@ -44,6 +44,20 @@ collector:
4444 # Affinity
4545 affinity : {}
4646
47+ # DaemonSet update strategy. When left empty, Kubernetes applies its default
48+ # for DaemonSets — RollingUpdate with maxUnavailable: 1 and maxSurge: 0 —
49+ # which rolls one pod at a time and serializes the rollout on large clusters
50+ # (e.g. ~15 min for 15 nodes, ~30 min for 32 nodes). Override to roll more
51+ # pods concurrently; a percentage scales naturally with cluster size.
52+ # See https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/#rolling-update
53+ updateStrategy : {}
54+ # Example:
55+ # updateStrategy:
56+ # type: RollingUpdate
57+ # rollingUpdate:
58+ # maxUnavailable: 25%
59+ # maxSurge: 0
60+
4761 livenessProbe :
4862 initialDelaySeconds : 180
4963 periodSeconds : 60
You can’t perform that action at this time.
0 commit comments