Skip to content

Commit

Permalink
Merge pull request #179 from trierra/k8s-registry-update
Browse files Browse the repository at this point in the history
changed the k8s registry url for certain k8s versions
  • Loading branch information
Oksana Naumov authored Sep 15, 2020
2 parents 523f14d + b8283ff commit 61530b3
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 61530b3

Please sign in to comment.