mirror of
https://github.com/helm/charts.git
synced 2026-08-23 22:37:45 +00:00
[stable/cockroachdb] Fix for compatibiliy with Kubernetes 1.16 (#17837)
In Kubernetes 1.16, all resources under `apps/v1beta1` are now only available under `apps/v1`: https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG-1.16.md#deprecations-and-removals This updates our StatefulSet apiVersion, while maintaining compatibility with old versions of Kubernetes where StatefulSets are not available under the `apps/v1` APIVersion. Signed-off-by: Joel Kenny <joel@cockroachlabs.com>
This commit is contained in:
committed by
Kubernetes Prow Robot
parent
4ed872605a
commit
4b8330c36d
@@ -1,7 +1,7 @@
|
||||
apiVersion: v1
|
||||
name: cockroachdb
|
||||
home: https://www.cockroachlabs.com
|
||||
version: 2.1.14
|
||||
version: 2.1.15
|
||||
appVersion: 19.1.5
|
||||
description: CockroachDB is a scalable, survivable, strongly-consistent SQL database.
|
||||
icon: https://raw.githubusercontent.com/cockroachdb/cockroach/master/docs/media/cockroach_db.png
|
||||
|
||||
@@ -19,3 +19,14 @@ Create the name of the service account to use
|
||||
{{ default "default" .Values.Secure.ServiceAccount.Name }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the appropriate apiVersion for StatefulSets
|
||||
*/}}
|
||||
{{- define "statefulset.apiVersion" -}}
|
||||
{{- if semverCompare "<1.12-0" .Capabilities.KubeVersion.GitVersion -}}
|
||||
{{- print "apps/v1beta1" -}}
|
||||
{{- else -}}
|
||||
{{- print "apps/v1" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
apiVersion: apps/v1beta1
|
||||
apiVersion: {{ template "statefulset.apiVersion" . }}
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: "{{ printf "%s-%s" .Release.Name .Values.Name | trunc 56 }}"
|
||||
|
||||
Reference in New Issue
Block a user