clockworksoul / helm-elasticsearch

An Elasticsearch cluster on top of Kubernetes, made easier, with Helm.
Apache License 2.0
118 stars 76 forks source link

String comparison in version detection #55

Open AnatolyRugalev opened 6 years ago

AnatolyRugalev commented 6 years ago

This is a BUG REPORT

On Kubernetes 1.10.0 I got a problem with version detection. I have .Capabilities.KubeVersion.Minor equal to "10" and this is less than "8" by rules of Golang. We need to convert minor version to integer and then compare.

This line works fine for me

{{- if ge (int (.Capabilities.KubeVersion.Minor)) 8 -}}

Version of Helm and Kubernetes: Kubernetes 1.10.0 Helm 2.8.2