Skip to content
This repository was archived by the owner on Aug 16, 2023. It is now read-only.

Commit 8db40ba

Browse files
vladwaVinayaka Ladwa - v0l008y
andauthored
[milvus-minio]Minio pdb apiversion support (#469)
Signed-off-by: Vinayaka Ladwa - v0l008y <Vinayaka.Ladwa@walmartlabs.com> Co-authored-by: Vinayaka Ladwa - v0l008y <Vinayaka.Ladwa@walmartlabs.com>
1 parent 0121fbb commit 8db40ba

3 files changed

Lines changed: 14 additions & 3 deletions

File tree

charts/minio/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
apiVersion: v1
22
description: High Performance, Kubernetes Native Object Storage
33
name: minio
4-
version: 8.0.16
4+
version: 8.0.17
55
appVersion: master
66
keywords:
77
- storage

charts/minio/templates/_helpers.tpl

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,17 @@ Create chart name and version as used by the chart label.
3131
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
3232
{{- end -}}
3333

34+
{{/*
35+
Return the appropriate apiVersion for poddisruptionbudget.
36+
*/}}
37+
{{- define "minio.pdb.apiVersion" -}}
38+
{{- if semverCompare "<1.21-0" .Capabilities.KubeVersion.Version -}}
39+
{{- print "policy/v1beta1" -}}
40+
{{- else -}}
41+
{{- print "policy/v1" -}}
42+
{{- end -}}
43+
{{- end -}}
44+
3445
{{/*
3546
Return the appropriate apiVersion for networkpolicy.
3647
*/}}

charts/minio/templates/poddisruptionbudget.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{{- if .Values.podDisruptionBudget.enabled }}
2-
apiVersion: policy/v1beta1
2+
apiVersion: {{ template "minio.pdb.apiVersion" . }}
33
kind: PodDisruptionBudget
44
metadata:
55
name: minio
@@ -10,4 +10,4 @@ spec:
1010
selector:
1111
matchLabels:
1212
app: {{ template "minio.name" . }}
13-
{{- end }}
13+
{{- end }}

0 commit comments

Comments
 (0)