Skip to content

Commit

Permalink
[incubator/kafka] Adding the ability to define a pod disruption budge…
Browse files Browse the repository at this point in the history
…t for brokers (helm#15345)

* feature: adding the ability to define a pod disruption budget to the kafka brokers

Signed-off-by: Kealan Murphy <kealan.murphy@aspect.com>

* address PR comments

Signed-off-by: Kealan Murphy <kealan.murphy@aspect.com>

* bump chart version

Signed-off-by: Murphy, Kealan <kealan.murphy@aspect.com>
Signed-off-by: Marius Voila <myself@mariusv.com>
  • Loading branch information
KealanM authored and mariusv committed Sep 16, 2019
1 parent acc88bf commit 9f2772a
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 1 deletion.
2 changes: 1 addition & 1 deletion incubator/kafka/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v1
description: Apache Kafka is publish-subscribe messaging rethought as a distributed
commit log.
name: kafka
version: 0.17.0
version: 0.17.1
appVersion: 5.0.1
keywords:
- kafka
Expand Down
1 change: 1 addition & 0 deletions incubator/kafka/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ following configurable parameters:
| `external.loadBalancerIP` | Add Static IP to the type Load Balancer. Depends on the provider if enabled | `[]`
| `podAnnotations` | Annotation to be added to Kafka pods | `{}` |
| `podLabels` | Labels to be added to Kafka pods | `{}` |
| `podDisruptionBudget` | Define a Disruption Budget for the Kafka Pods | `{}` |
| `envOverrides` | Add additional Environment Variables in the dictionary format | `{ zookeeper.sasl.enabled: "False" }` |
| `configurationOverrides` | `Kafka ` [configuration setting][brokerconfigs] overrides in the dictionary format | `{ "confluent.support.metrics.enable": false }` |
| `secrets` | Pass any secrets to the kafka pods. Each secret will be passed as an environment variable by default. The secret can also be mounted to a specific path if required. Environment variable names are generated as: `<secretName>_<secretKey>` (All upper case) | `{}` |
Expand Down
18 changes: 18 additions & 0 deletions incubator/kafka/templates/podisruptionbudget.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{{- if .Values.podDisruptionBudget }}
apiVersion: policy/v1beta1
kind: PodDisruptionBudget
metadata:
name: {{ include "kafka.fullname" . }}
labels:
app: {{ template "kafka.name" . }}
chart: {{ template "kafka.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
selector:
matchLabels:
app: {{ template "kafka.name" . }}
release: {{ .Release.Name }}
{{ toYaml .Values.podDisruptionBudget | indent 2 }}

{{- end }}
2 changes: 2 additions & 0 deletions incubator/kafka/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,8 @@ podLabels: {}
# service: broker
# team: developers

podDisruptionBudget: {}
# maxUnavailable: 1 # Limits how many Kafka pods may be unavailable due to voluntary disruptions.

## Configuration Overrides. Specify any Kafka settings you would like set on the StatefulSet
## here in map format, as defined in the official docs.
Expand Down

0 comments on commit 9f2772a

Please sign in to comment.