diff --git a/helm/minio/templates/_helpers.tpl b/helm/minio/templates/_helpers.tpl index 313618440..55ae1e193 100644 --- a/helm/minio/templates/_helpers.tpl +++ b/helm/minio/templates/_helpers.tpl @@ -37,8 +37,10 @@ Return the appropriate apiVersion for networkpolicy. {{- define "minio.networkPolicy.apiVersion" -}} {{- if semverCompare ">=1.4-0, <1.7-0" .Capabilities.KubeVersion.Version -}} {{- print "extensions/v1beta1" -}} -{{- else if semverCompare "^1.7-0" .Capabilities.KubeVersion.Version -}} +{{- else if semverCompare ">=1.7-0, <1.16-0" .Capabilities.KubeVersion.Version -}} {{- print "networking.k8s.io/v1beta1" -}} +{{- else if semverCompare "^1.16-0" .Capabilities.KubeVersion.Version -}} +{{- print "networking.k8s.io/v1" -}} {{- end -}} {{- end -}}