[stable/elasticsearch-curator] Added compatibility for K8s 1.16 (#17509)

Signed-off-by: Christian Kotzbauer <christian.kotzbauer@gmail.com>
This commit is contained in:
Christian Kotzbauer
2019-10-02 01:55:08 -07:00
committed by Kubernetes Prow Robot
parent d973c8ba0b
commit 031bb2708d
3 changed files with 13 additions and 2 deletions
+1 -1
View File
@@ -2,7 +2,7 @@ apiVersion: v1
appVersion: "5.5.4"
description: A Helm chart for Elasticsearch Curator
name: elasticsearch-curator
version: 2.0.1
version: 2.0.2
home: https://github.com/elastic/curator
keywords:
- curator
@@ -11,6 +11,17 @@ Return the appropriate apiVersion for cronjob APIs.
{{- end -}}
{{- end -}}
{{/*
Return the appropriate apiVersion for podsecuritypolicy.
*/}}
{{- define "podsecuritypolicy.apiVersion" -}}
{{- if semverCompare "<1.10-0" .Capabilities.KubeVersion.GitVersion -}}
{{- print "extensions/v1beta1" -}}
{{- else -}}
{{- print "policy/v1beta1" -}}
{{- end -}}
{{- end -}}
{{/*
Expand the name of the chart.
*/}}
@@ -1,5 +1,5 @@
{{- if .Values.psp.create }}
apiVersion: extensions/v1beta1
apiVersion: {{ template "podsecuritypolicy.apiVersion" . }}
kind: PodSecurityPolicy
metadata:
labels: