Skip to content
This repository has been archived by the owner on Feb 22, 2022. It is now read-only.

Commit

Permalink
[stable/percona-xtradb-cluster] fix StatefulSet apiVersion for Kubern…
Browse files Browse the repository at this point in the history
…etes 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>
  • Loading branch information
ustuzhanin and Устюжанин Антон Александрович authored Jun 5, 2020
1 parent 54011d7 commit 2eb8517
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion stable/percona-xtradb-cluster/Chart.yaml
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
8 changes: 8 additions & 0 deletions stable/percona-xtradb-cluster/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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 -}}
2 changes: 1 addition & 1 deletion stable/percona-xtradb-cluster/templates/statefulset.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: apps/v1beta2
apiVersion: {{ template "percona-xtradb-cluster.statefulset.apiVersion" . }}
kind: StatefulSet
metadata:
name: {{ template "percona-xtradb-cluster.fullname" . }}
Expand Down

0 comments on commit 2eb8517

Please sign in to comment.