Skip to content

Commit

Permalink
minio: add PodDisruptionBudget
Browse files Browse the repository at this point in the history
* add configurable PDB for minio
* change label for post-install-create-bucket-job because
  until kubernetes/kubernetes#85553 is merged,
  PDB will also detect the minio-create-bucket-job and
  PDB won't work correctly (kubernetes/kubernetes#77383)

Signed-off-by: Mario Constanti <github@constanti.de>
  • Loading branch information
bavarianbidi committed Dec 9, 2019
1 parent f6e5784 commit cd53fce
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 2 deletions.
2 changes: 1 addition & 1 deletion stable/minio/Chart.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
13 changes: 13 additions & 0 deletions stable/minio/templates/poddisruptionbudget.yaml
Original file line number Diff line number Diff line change
@@ -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 }}
2 changes: 1 addition & 1 deletion stable/minio/templates/post-install-create-bucket-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
7 changes: 7 additions & 0 deletions stable/minio/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit cd53fce

Please sign in to comment.