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

Commit

Permalink
[milvus-minio]Minio pdb apiversion support (#469)
Browse files Browse the repository at this point in the history
Signed-off-by: Vinayaka Ladwa - v0l008y <[email protected]>
Co-authored-by: Vinayaka Ladwa - v0l008y <[email protected]>
  • Loading branch information
vladwa and Vinayaka Ladwa - v0l008y authored Jul 19, 2023
1 parent 0121fbb commit 8db40ba
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion charts/minio/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v1
description: High Performance, Kubernetes Native Object Storage
name: minio
version: 8.0.16
version: 8.0.17
appVersion: master
keywords:
- storage
Expand Down
11 changes: 11 additions & 0 deletions charts/minio/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,17 @@ Create chart name and version as used by the chart label.
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}

{{/*
Return the appropriate apiVersion for poddisruptionbudget.
*/}}
{{- define "minio.pdb.apiVersion" -}}
{{- if semverCompare "<1.21-0" .Capabilities.KubeVersion.Version -}}
{{- print "policy/v1beta1" -}}
{{- else -}}
{{- print "policy/v1" -}}
{{- end -}}
{{- end -}}

{{/*
Return the appropriate apiVersion for networkpolicy.
*/}}
Expand Down
4 changes: 2 additions & 2 deletions charts/minio/templates/poddisruptionbudget.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{- if .Values.podDisruptionBudget.enabled }}
apiVersion: policy/v1beta1
apiVersion: {{ template "minio.pdb.apiVersion" . }}
kind: PodDisruptionBudget
metadata:
name: minio
Expand All @@ -10,4 +10,4 @@ spec:
selector:
matchLabels:
app: {{ template "minio.name" . }}
{{- end }}
{{- end }}

0 comments on commit 8db40ba

Please sign in to comment.