Skip to content
This repository was archived by the owner on Jun 12, 2025. It is now read-only.

Commit 6c49567

Browse files
committed
Removed get-cluster-version helper
1 parent f438bad commit 6c49567

1 file changed

Lines changed: 0 additions & 26 deletions

File tree

helm-charts/orchestrator/templates/_helpers.tpl

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -120,30 +120,4 @@
120120
{{- end -}}
121121
{{- .argoCDNamespace -}}
122122
{{- end -}}
123-
{{- end -}}
124-
125-
{{- define "get-cluster-version" -}}
126-
{{- $v := "" }}
127-
{{- $version :=(lookup "config.openshift.io/v1" "ClusterVersion" "" "version") }}
128-
{{- range $version.status.history }}
129-
{{- if eq .state "Completed" }}
130-
{{- $v = (semver .version) }}
131-
{{- end }}
132-
{{- end }}
133-
134-
{{- $validMinors := list "4.13" "4.14" "4.15" "4.16" -}}
135-
{{- $versionString := printf "%d.%d" $v.Major $v.Minor -}}
136-
{{- if not (semverCompare ">=4.13 <=4.16" $versionString) -}}
137-
{{- fail (printf "Unsupported OCP version: %s. Supported versions: %s." $versionString $validMinors) -}}
138-
{{- end -}}
139-
{{- $versionString -}}
140-
{{- end -}}
141-
142-
{{- define "get-tekton-version" -}}
143-
{{- $pipelinesSubs := lookup "operators.coreos.com/v1alpha1" "Subscription" "openshift-operators" "openshift-pipelines-operator-rh" -}}
144-
{{- $pipelineInstalledVersion := $pipelinesSubs.status.installedCSV}}
145-
{{- $pipelineVersion := substr 33 ( len $pipelineInstalledVersion) $pipelineInstalledVersion}}
146-
{{- $pipelineVersion = semver $pipelineVersion }}
147-
{{- $pipelineVersionString := printf "%d.%d" $pipelineVersion.Major $pipelineVersion.Minor -}}
148-
{{- $pipelineVersionString -}}
149123
{{- end -}}

0 commit comments

Comments
 (0)