mirror of
https://github.com/bitnami/charts.git
synced 2026-03-06 15:10:15 +08:00
Manage disruptions when using more than 1 replicas
Created a pod distruption budget when replicas is bigger than 1 By default only 1 pod can be unavailable Added additional label so the pdb doesn't select the metrics pod
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
apiVersion: v1
|
||||
name: zookeeper
|
||||
version: 1.6.1
|
||||
version: 1.7.0
|
||||
appVersion: 3.4.14
|
||||
description: A centralized service for maintaining configuration information, naming, providing distributed synchronization, and providing group services for distributed applications.
|
||||
keywords:
|
||||
|
||||
@@ -56,6 +56,7 @@ The following tables lists the configurable parameters of the Zookeeper chart an
|
||||
| `image.pullSecrets` | Specify docker-registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) |
|
||||
| `image.debug` | Specify if debug values should be set | `false` |
|
||||
| `updateStrategy` | Update strategies | `RollingUpdate` |
|
||||
| `podDisruptionBudget.maxUnavailable` | Max number of pods down simultaneously | `1` |
|
||||
| `rollingUpdatePartition` | Partition update strategy | `nil` |
|
||||
| `podManagementpolicy` | Pod management policy | `Parallel` |
|
||||
| `replicaCount` | Number of ZooKeeper nodes | `1` |
|
||||
|
||||
20
bitnami/zookeeper/templates/poddisruptionbudget.yaml
Normal file
20
bitnami/zookeeper/templates/poddisruptionbudget.yaml
Normal file
@@ -0,0 +1,20 @@
|
||||
{{- if gt .Values.replicaCount 1.0 -}}
|
||||
apiVersion: policy/v1beta1
|
||||
kind: PodDisruptionBudget
|
||||
metadata:
|
||||
name: {{ template "zookeeper.fullname" . }}
|
||||
labels:
|
||||
app: {{ template "zookeeper.name" . }}
|
||||
chart: {{ template "zookeeper.chart" . }}
|
||||
release: {{ .Release.Name | quote }}
|
||||
heritage: {{ .Release.Service | quote }}
|
||||
app.kubernetes.io/component: {{ template "zookeeper.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name | quote }}
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: {{ template "zookeeper.name" . }}
|
||||
release: {{ .Release.Name | quote }}
|
||||
app.kubernetes.io/component: {{ template "zookeeper.name" . }}
|
||||
{{ toYaml .Values.podDisruptionBudget | indent 2 }}
|
||||
{{- end }}
|
||||
@@ -36,6 +36,14 @@ image:
|
||||
##
|
||||
updateStrategy: RollingUpdate
|
||||
|
||||
|
||||
## Limits the number of pods of the replicated application that are down simultaneously from voluntary disruptions
|
||||
## ref: https://kubernetes.io/docs/concepts/workloads/pods/disruptions
|
||||
##
|
||||
podDisruptionBudget:
|
||||
maxUnavailable: 1
|
||||
|
||||
|
||||
## Partition update strategy
|
||||
## https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#partitions
|
||||
##
|
||||
|
||||
@@ -36,6 +36,15 @@ image:
|
||||
##
|
||||
updateStrategy: RollingUpdate
|
||||
|
||||
|
||||
## 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
|
||||
|
||||
|
||||
## Partition update strategy
|
||||
## https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#partitions
|
||||
##
|
||||
|
||||
Reference in New Issue
Block a user