[stable/percona-xtradb-cluster] fix StatefulSet apiVersion for Kubernetes 1.16+ (#22236)

* fix StatefulSet apiVersion for Kubernetes 1.16+

Signed-off-by: Устюжанин Антон Александрович <ustuzhanin@tochka.com>

* fix StatefulSet apiVersion for Kubernetes 1.16+

Signed-off-by: Устюжанин Антон Александрович <ustuzhanin@tochka.com>

Co-authored-by: Устюжанин Антон Александрович <ustuzhanin@tochka.com>
This commit is contained in:
ustuzhanin
2020-06-05 12:39:46 -07:00
committed by GitHub
co-authored by Устюжанин Антон Александрович
parent 54011d7e57
commit 2eb8517203
3 changed files with 10 additions and 2 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
apiVersion: v1
name: percona-xtradb-cluster
version: 1.0.3
version: 1.0.4
appVersion: 5.7.19
description: free, fully compatible, enhanced, open source drop-in replacement for
MySQL with Galera Replication (xtradb)
@@ -23,3 +23,11 @@ https://www.percona.com/doc/percona-xtradb-cluster/LATEST/wsrep-system-index.htm
{{- $name := default "pxc" .Values.nameOverride -}}
{{- printf "%s-%s" .Release.Name $name | trunc 32 | trimSuffix "-" -}}
{{- end -}}
{{- define "percona-xtradb-cluster.statefulset.apiVersion" -}}
{{- if .Capabilities.APIVersions.Has "apps/v1/StatefulSet" -}}
{{- print "apps/v1" -}}
{{- else -}}
{{- print "apps/v1beta2" -}}
{{- end -}}
{{- end -}}
@@ -1,4 +1,4 @@
apiVersion: apps/v1beta2
apiVersion: {{ template "percona-xtradb-cluster.statefulset.apiVersion" . }}
kind: StatefulSet
metadata:
name: {{ template "percona-xtradb-cluster.fullname" . }}