From 4e81b415ccb8554710fdd3980e9d7eb34394c9fe Mon Sep 17 00:00:00 2001 From: Mario Constanti Date: Tue, 10 Dec 2019 09:55:29 +0100 Subject: [PATCH] minio: add PodDisruptionBudget (#19303) * add configurable PDB for minio * change label for post-install-create-bucket-job because until https://github.com/kubernetes/kubernetes/pull/85553 is merged, PDB will also detect the minio-create-bucket-job and PDB won't work correctly (https://github.com/kubernetes/kubernetes/issues/77383) Signed-off-by: Mario Constanti --- stable/minio/Chart.yaml | 2 +- stable/minio/templates/poddisruptionbudget.yaml | 13 +++++++++++++ .../templates/post-install-create-bucket-job.yaml | 2 +- stable/minio/values.yaml | 7 +++++++ 4 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 stable/minio/templates/poddisruptionbudget.yaml diff --git a/stable/minio/Chart.yaml b/stable/minio/Chart.yaml index de58f73b8f..0985145f06 100755 --- a/stable/minio/Chart.yaml +++ b/stable/minio/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v1 description: MinIO is a high performance distributed object storage server, designed for large-scale private cloud infrastructure. name: minio -version: 3.0.2 +version: 3.0.3 appVersion: RELEASE.2019-08-07T01-59-21Z keywords: - storage diff --git a/stable/minio/templates/poddisruptionbudget.yaml b/stable/minio/templates/poddisruptionbudget.yaml new file mode 100644 index 0000000000..1de813b8b8 --- /dev/null +++ b/stable/minio/templates/poddisruptionbudget.yaml @@ -0,0 +1,13 @@ +{{- if .Values.podDisruptionBudget.enabled }} +apiVersion: policy/v1beta1 +kind: PodDisruptionBudget +metadata: + name: minio + labels: + app: {{ template "minio.name" . }} +spec: + maxUnavailable: {{ .Values.podDisruptionBudget.maxUnavailable }} + selector: + matchLabels: + app: {{ template "minio.name" . }} +{{- end }} \ No newline at end of file diff --git a/stable/minio/templates/post-install-create-bucket-job.yaml b/stable/minio/templates/post-install-create-bucket-job.yaml index 75a6def5ef..e21a3c171c 100755 --- a/stable/minio/templates/post-install-create-bucket-job.yaml +++ b/stable/minio/templates/post-install-create-bucket-job.yaml @@ -4,7 +4,7 @@ kind: Job metadata: name: {{ template "minio.fullname" . }}-make-bucket-job labels: - app: {{ template "minio.name" . }} + app: {{ template "minio.name" . }}-make-bucket-job chart: {{ template "minio.chart" . }} release: {{ .Release.Name }} heritage: {{ .Release.Service }} diff --git a/stable/minio/values.yaml b/stable/minio/values.yaml index c209cdbe05..07bbcb9131 100755 --- a/stable/minio/values.yaml +++ b/stable/minio/values.yaml @@ -265,6 +265,13 @@ networkPolicy: enabled: false allowExternal: true +## PodDisruptionBudget settings +## ref: https://kubernetes.io/docs/concepts/workloads/pods/disruptions/ +## +podDisruptionBudget: + enabled: false + maxUnavailable: 1 + ## Specify the service account to use for the Minio pods. If 'create' is set to 'false' ## and 'name' is left unspecified, the account 'default' will be used. serviceAccount: