mirror of
https://github.com/helm/charts.git
synced 2026-08-23 22:37:45 +00:00
Fix for version comparison from strings to semver (#4602)
* Fix for version comparison from strings to semver See #3002 for more detail * Adding minio version for validation * 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:
committed by
k8s-ci-robot
parent
f0bdfde774
commit
3e85eaff1c
@@ -1,7 +1,8 @@
|
||||
apiVersion: v1
|
||||
description: Distributed object storage server built for cloud applications and devops.
|
||||
name: minio
|
||||
version: 1.0.0
|
||||
version: 1.0.1
|
||||
appVersion: RELEASE.2018-03-16T22-52-12Z
|
||||
keywords:
|
||||
- storage
|
||||
- object-storage
|
||||
|
||||
@@ -35,9 +35,9 @@ Create chart name and version as used by the chart label.
|
||||
Return the appropriate apiVersion for networkpolicy.
|
||||
*/}}
|
||||
{{- define "minio.networkPolicy.apiVersion" -}}
|
||||
{{- if and (ge .Capabilities.KubeVersion.Minor "4") (le .Capabilities.KubeVersion.Minor "6") -}}
|
||||
{{- if semverCompare ">=1.4-0, <1.7-0" .Capabilities.KubeVersion.GitVersion -}}
|
||||
{{- print "extensions/v1beta1" -}}
|
||||
{{- else if ge .Capabilities.KubeVersion.Minor "7" -}}
|
||||
{{- else if semverCompare "^1.7-0" .Capabilities.KubeVersion.GitVersion -}}
|
||||
{{- print "networking.k8s.io/v1" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
Reference in New Issue
Block a user