[stable/weave-cloud] Fixes compatibility with 1.16 (#17524)

* Fixes compatibility with 1.16

Signed-off-by: Xiang Dai <764524258@qq.com>

* fix a typo

Signed-off-by: Xiang Dai <764524258@qq.com>
This commit is contained in:
Xiang Dai
2019-09-30 02:35:38 -07:00
committed by Kubernetes Prow Robot
parent e413679993
commit 52e351fabc
3 changed files with 14 additions and 3 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
apiVersion: v1
appVersion: "1.3.0"
name: weave-cloud
version: 0.3.3
version: 0.3.4
description: |
Weave Cloud is a add-on to Kubernetes which provides Continuous Delivery, along with hosted Prometheus Monitoring and a visual dashboard for exploring & debugging microservices
home: https://weave.works
+12 -1
View File
@@ -40,4 +40,15 @@ Create the name of the service account to use
{{- else -}}
{{ default "default" .Values.serviceAccount.name }}
{{- end -}}
{{- end -}}
{{- end -}}
{{/*
Return the apiVerion of deployment.
*/}}
{{- define "deployment.apiVersion" -}}
{{- if semverCompare "<1.14-0" .Capabilities.KubeVersion.GitVersion -}}
{{- print "extensions/v1beta1" -}}
{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
{{- print "apps/v1" -}}
{{- end -}}
{{- end -}}
+1 -1
View File
@@ -1,4 +1,4 @@
apiVersion: apps/v1beta2
apiVersion: {{ template "deployment.apiVersion" . }}
kind: Deployment
metadata:
name: {{ .Values.agent.name }}