Fixing version comparisons from strings to semver (#4596)

* Fixing version comparisons from strings to semver

This impacts the jump to kubernetes 1.10. For more information
see issue 3002

* Updating chart owner to github id
This commit is contained in:
Matt Farina
2018-04-02 10:15:03 -07:00
committed by k8s-ci-robot
parent 09a54c66d1
commit df2610ad3f
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -1,11 +1,11 @@
name: cockroachdb
home: https://www.cockroachlabs.com
version: 1.0.1
version: 1.0.2
appVersion: 1.1.7
description: CockroachDB is a scalable, survivable, strongly-consistent SQL database.
icon: https://raw.githubusercontent.com/cockroachdb/cockroach/master/docs/media/cockroach_db.png
sources:
- https://github.com/cockroachdb/cockroach
maintainers:
- name: Alex Robinson
- name: a-robinson
email: alex@cockroachlabs.com
+2 -2
View File
@@ -2,9 +2,9 @@
Return the appropriate apiVersion for networkpolicy.
*/}}
{{- define "cockroachdb.networkPolicy.apiVersion" -}}
{{- if and (ge .Capabilities.KubeVersion.Minor "4") (le .Capabilities.KubeVersion.Minor "6") -}}
{{- if semverCompare ">=1.4, <=1.6" .Capabilities.KubeVersion.GitVersion -}}
{{- print "extensions/v1beta1" -}}
{{- else if ge .Capabilities.KubeVersion.Minor "7" -}}
{{- else if semverCompare "^1.7" .Capabilities.KubeVersion.GitVersion -}}
{{- print "networking.k8s.io/v1" -}}
{{- end -}}
{{- end -}}