Skip to content

Commit b301e67

Browse files
committed
helm: Add unhealthyPodEvictionPolicy to PDB
Signed-off-by: Pat Riehecky <riehecky@fnal.gov>
1 parent 2a56156 commit b301e67

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

packaging/helm-charts/helm3/strimzi-kafka-operator/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ the documentation for more details.
127127
| `podDisruptionBudget.enabled` | Whether to enable the podDisruptionBudget feature | `false` |
128128
| `podDisruptionBudget.minAvailable` | Default value for how many pods must be running in a cluster | `1` |
129129
| `podDisruptionBudget.maxUnavailable` | Default value for how many pods can be down | `nil` |
130+
| `podDisruptionBudget.unhealthyPodEvictionPolicy` | Default value for how to respond to unheathly pods | `IfHealthyBudget` |
130131
| `extraEnvs` | Extra environment variables for the Cluster operator container | `[]` |
131132
| `kafka.image.registry` | Override default Kafka image registry | `nil` |
132133
| `kafka.image.repository` | Override default Kafka image repository | `nil` |

packaging/helm-charts/helm3/strimzi-kafka-operator/templates/051-PodDisruptionBudget-strimzi-cluster-operator.yaml

+4-1
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,7 @@ spec:
1313
{{- if .Values.podDisruptionBudget.maxUnavailable }}
1414
maxUnavailable: {{ .Values.podDisruptionBudget.maxUnavailable }}
1515
{{- end }}
16-
{{- end }}
16+
{{- if (semverCompare ">= 1.27-0" .Capabilities.KubeVersion.Version) }}
17+
unhealthyPodEvictionPolicy: {{ .Values.podDisruptionBudget.unhealthyPodEvictionPolicy }}
18+
{{- end }}
19+
{{- end }}

packaging/helm-charts/helm3/strimzi-kafka-operator/values.yaml

+6-2
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,10 @@ leaderElection:
5757
# https://kubernetes.io/docs/tasks/run-application/configure-pdb/
5858
podDisruptionBudget:
5959
enabled: false
60-
# The PDB definition only has two attributes to control the availability requirements: minAvailable or maxUnavailable (mutually exclusive).
60+
# The PDB definition three attributes to control the availability requirements:
61+
# minAvailable or maxUnavailable (mutually exclusive).
62+
# unhealthyPodEvictionPolicy
63+
#
6164
# Field maxUnavailable tells how many pods can be down and minAvailable tells how many pods must be running in a cluster.
6265

6366
# The pdb template will check values according to below order
@@ -72,6 +75,7 @@ podDisruptionBudget:
7275
# If both values are set, the template will use the first one and ignore the second one. currently by default minAvailable is set to 1
7376
minAvailable: 1
7477
maxUnavailable:
78+
unhealthyPodEvictionPolicy: IfHealthyBudget
7579

7680
# If you are using the grafana dashboard sidecar,
7781
# you can import some default dashboards here
@@ -177,4 +181,4 @@ generateNetworkPolicy: true
177181
# Override the value for Connect build timeout
178182
connectBuildTimeoutMs: 300000
179183
# Controls whether Strimzi generates pod disruption budget resources (By default true)
180-
generatePodDisruptionBudget: true
184+
generatePodDisruptionBudget: true

0 commit comments

Comments
 (0)