Fix for version comparison from strings to semver (#4608)

* Fix for version comparison from strings to semver

See #3002 for more detail

* Include pre-releases in the semver ranges

This is important when testing against alpha and beta builds of
Kubernetes along with environments that use pre-releases to denote
things other than pre-releases (e.g., gke denotes the environment
with a pre-releases)
This commit is contained in:
Matt Farina
2018-05-17 14:49:52 -07:00
committed by k8s-ci-robot
parent 41a11e92d0
commit 8d00832aa9
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
apiVersion: v1
name: traefik
version: 1.29.2
version: 1.29.3
appVersion: 1.5.4
description: A Traefik based Kubernetes ingress controller with Let's Encrypt support
keywords:
+2 -2
View File
@@ -17,7 +17,7 @@ spec:
metadata:
annotations:
checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
{{- if and (.Values.tolerations) (le .Capabilities.KubeVersion.Minor "5") }}
{{- if and (.Values.tolerations) (semverCompare "<1.6-0" .Capabilities.KubeVersion.GitVersion) }}
scheduler.alpha.kubernetes.io/tolerations: '{{ toJson .Values.tolerations }}'
{{- end }}
{{- range $key, $value := .Values.deployment.podAnnotations }}
@@ -134,7 +134,7 @@ spec:
emptyDir: {}
{{- end }}
{{- end }}
{{- if and (.Values.tolerations) (ge .Capabilities.KubeVersion.Minor "6") }}
{{- if and (.Values.tolerations) (semverCompare "^1.6-0" .Capabilities.KubeVersion.GitVersion) }}
tolerations:
{{ toYaml .Values.tolerations | indent 6 }}
{{- end }}