helm icon indicating copy to clipboard operation
helm copied to clipboard

Error when installing on OpenShift

Open namloc2001 opened this issue 3 years ago • 0 comments

Is this a BUG REPORT or FEATURE REQUEST?:

BUG REPORT

What happened:

Tried installing on OpenShift and received an error, installation did not complete.

helm install --debug my-release --set etcdEndPoint=etcd:http://192.168.70.90:2379,clusterName=$(uuidgen) ./helm/charts/portworx/ --set openshiftInstall=true --set registrySecret=sbu-pipeline

install.go:172: [debug] Original chart version: ""
install.go:189: [debug] CHART PATH: /helm/charts/portworx

I0706 10:00:32.149409     662 request.go:645] Throttling request took 1.0930126s, request: GET:https://c108-e.eu-gb.containers.cloud.ibm.com:30469/apis/tekton.dev/v1alpha1?timeout=32s
Error: template: portworx/templates/portworx-ds.yaml:219:23: executing "portworx/templates/portworx-ds.yaml" at <(semverCompare ">=1.9" .Capabilities.KubeVersion.GitVersion) or (.Values.openshiftInstall and semverCompare ">=1.8" .Capabilities.KubeVersion.GitVersion)>: can't give argument to non-function semverCompare ">=1.9" .Capabilities.KubeVersion.GitVersion
helm.go:81: [debug] template: portworx/templates/portworx-ds.yaml:219:23: executing "portworx/templates/portworx-ds.yaml" at <(semverCompare ">=1.9" .Capabilities.KubeVersion.GitVersion) or (.Values.openshiftInstall and semverCompare ">=1.8" .Capabilities.KubeVersion.GitVersion)>: can't give argument to non-function semverCompare ">=1.9" .Capabilities.KubeVersion.GitVersion

What you expected to happen: I expect the install to be performed.

How to reproduce it (as minimally and precisely as possible): I did the following:

git clone https://github.com/portworx/helm.git
helm install --debug my-release --set etcdEndPoint=etcd:http://192.168.70.90:2379,clusterName=$(uuidgen) ./helm/charts/portworx/ --set openshiftInstall=true --set registrySecret=sbu-pipeline

Anything else we need to know?: I believe this can be fixed by amending https://github.com/portworx/helm/blob/master/charts/portworx/templates/portworx-ds.yaml#L219 from:

{{- if (semverCompare ">=1.9" .Capabilities.KubeVersion.GitVersion) or (.Values.openshiftInstall and semverCompare ">=1.8" .Capabilities.KubeVersion.GitVersion) }}

to

{{- if or (semverCompare ">=1.9" .Capabilities.KubeVersion.GitVersion) (and (.Values.openshiftInstall) (semverCompare ">=1.8" .Capabilities.KubeVersion.GitVersion)) }}

I have done this in my environment and the installation was then performed successfully.

Environment:

  • Container Orchestrator and version: OpenShift 4.6.34 on IBM Cloud
  • Cloud provider or hardware configuration: IBM Cloud
  • OS (e.g. from /etc/os-release):
  • Kernel (e.g. uname -a):
  • Install tools:
  • Others:

namloc2001 avatar Jul 06 '21 09:07 namloc2001