Skip to content

Commit

Permalink
changed the k8s registry url for certain k8s versions
Browse files Browse the repository at this point in the history
Signed-off-by: trierra <[email protected]>
  • Loading branch information
trierra committed Sep 15, 2020
1 parent 523f14d commit b8283ff
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion charts/portworx/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,23 @@ release: {{ .Release.Name | quote }}
{{- end -}}

{{- define "px.getk8sImages" -}}
{{- $version := .Capabilities.KubeVersion.GitVersion -}}
{{- if (.Values.customRegistryURL) -}}
{{- if (eq "/" (.Values.customRegistryURL | regexFind "/")) -}}
{{ trim .Values.customRegistryURL }}
{{- else -}}
{{cat (trim .Values.customRegistryURL) "/gcr.io/google_containers" | replace " " ""}}
{{- if or (or (semverCompare ">= 1.16.14 <=1.17.0" $version ) (semverCompare ">= 1.17.10 <=1.18.0" $version )) (semverCompare ">=1.18.7" $version) -}}
{{cat (trim .Values.customRegistryURL) "/k8s.gcr.io" | replace " " ""}}
{{- else -}}
{{cat (trim .Values.customRegistryURL) "/gcr.io/google_containers" | replace " " ""}}
{{- end -}}
{{- end -}}
{{- else -}}
{{- if or (or (semverCompare ">= 1.16.14 <=1.17.0" $version ) (semverCompare ">= 1.17.10 <=1.18.0" $version )) (semverCompare ">=1.18.7" $version) -}}
{{ "k8s.gcr.io" }}
{{- else -}}
{{ "gcr.io/google_containers" }}
{{- end -}}
{{- end -}}
{{- end -}}

Expand Down

0 comments on commit b8283ff

Please sign in to comment.