mirror of
https://github.com/bitnami/charts.git
synced 2026-03-13 14:57:24 +08:00
Merge pull request #1178 from lcostea/master
[bitnami/kafka] Create a pod disruption budget when replicaCount is bigger than 1
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
apiVersion: v1
|
||||
name: kafka
|
||||
version: 2.0.2
|
||||
version: 2.1.0
|
||||
appVersion: 2.2.0
|
||||
description: Apache Kafka is a distributed streaming platform.
|
||||
keywords:
|
||||
|
||||
@@ -57,6 +57,7 @@ The following tables lists the configurable parameters of the Kafka chart and th
|
||||
| `image.debug` | Specify if debug values should be set | `false` |
|
||||
| `updateStrategy` | Update strategy for the stateful set | `RollingUpdate` |
|
||||
| `rollingUpdatePartition` | Partition update strategy | `nil` |
|
||||
| `podDisruptionBudget.maxUnavailable` | Max number of pods down simultaneously | `1` |
|
||||
| `replicaCount` | Number of Kafka nodes | `1` |
|
||||
| `config` | Configuration file for Kafka | `nil` |
|
||||
| `allowPlaintextListener` | Allow to use the PLAINTEXT listener | `true` |
|
||||
|
||||
20
bitnami/kafka/templates/poddisruptionbudget.yaml
Normal file
20
bitnami/kafka/templates/poddisruptionbudget.yaml
Normal file
@@ -0,0 +1,20 @@
|
||||
{{- $replicaCount := int .Values.replicaCount }}
|
||||
{{- if gt $replicaCount 1 }}
|
||||
apiVersion: policy/v1beta1
|
||||
kind: PodDisruptionBudget
|
||||
metadata:
|
||||
name: {{ template "kafka.fullname" . }}
|
||||
labels:
|
||||
app.kubernetes.io/name: {{ template "kafka.name" . }}
|
||||
helm.sh/chart: {{ template "kafka.chart" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
app.kubernetes.io/component: kafka
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: {{ template "kafka.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
app.kubernetes.io/component: kafka
|
||||
{{ toYaml .Values.podDisruptionBudget | indent 2 }}
|
||||
{{- end }}
|
||||
@@ -41,6 +41,14 @@ updateStrategy: RollingUpdate
|
||||
##
|
||||
# rollingUpdatePartition:
|
||||
|
||||
## Limits the number of pods of the replicated application that are down simultaneously from voluntary disruptions
|
||||
## The PDB will only be created if replicaCount is greater than 1
|
||||
## ref: https://kubernetes.io/docs/concepts/workloads/pods/disruptions
|
||||
##
|
||||
podDisruptionBudget:
|
||||
maxUnavailable: 1
|
||||
|
||||
|
||||
replicaCount: 3
|
||||
|
||||
config: |-
|
||||
|
||||
@@ -41,6 +41,14 @@ updateStrategy: RollingUpdate
|
||||
##
|
||||
# rollingUpdatePartition:
|
||||
|
||||
## Limits the number of pods of the replicated application that are down simultaneously from voluntary disruptions
|
||||
## The PDB will only be created if replicaCount is greater than 1
|
||||
## ref: https://kubernetes.io/docs/concepts/workloads/pods/disruptions
|
||||
##
|
||||
podDisruptionBudget:
|
||||
maxUnavailable: 1
|
||||
|
||||
|
||||
replicaCount: 1
|
||||
|
||||
config: |-
|
||||
|
||||
Reference in New Issue
Block a user