Merge pull request #112 from manuelbuil/calico_systemDefaultRegistry

Bug: Propagate global.systemDefaultRegistry to calico images
pull/113/head
Manuel Buil 2021-07-07 10:17:46 +02:00 committed by GitHub
commit d799ec4a50
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View File

@ -1,9 +1,12 @@
--- charts-original/templates/crs/custom-resources.yaml --- charts-original/templates/crs/custom-resources.yaml
+++ charts/templates/crs/custom-resources.yaml +++ charts/templates/crs/custom-resources.yaml
@@ -6,6 +6,10 @@ @@ -6,6 +6,13 @@
{{ $secrets = append $secrets $item }} {{ $secrets = append $secrets $item }}
{{ end }} {{ end }}
{{ $_ := set $installSpec "imagePullSecrets" $secrets }} {{ $_ := set $installSpec "imagePullSecrets" $secrets }}
+{{ $defaultRegistry := get $installSpec "registry" }}
+{{ $finalRegistry := coalesce .Values.global.systemDefaultRegistry $defaultRegistry }}
+{{ $_ := set $installSpec "registry" $finalRegistry }}
+{{ $defaultipPools := get .Values.installation.calicoNetwork "ipPools" | first }} +{{ $defaultipPools := get .Values.installation.calicoNetwork "ipPools" | first }}
+{{ $defaultCIDR := get $defaultipPools "cidr" }} +{{ $defaultCIDR := get $defaultipPools "cidr" }}
+{{ $finalCIDR := coalesce .Values.global.clusterCIDR $defaultCIDR }} +{{ $finalCIDR := coalesce .Values.global.clusterCIDR $defaultCIDR }}

View File

@ -1,5 +1,5 @@
url: https://github.com/projectcalico/calico/releases/download/v3.19.1/tigera-operator-v3.19.1-2.tgz url: https://github.com/projectcalico/calico/releases/download/v3.19.1/tigera-operator-v3.19.1-2.tgz
packageVersion: 06 packageVersion: 07
additionalCharts: additionalCharts:
- workingDir: charts-crd - workingDir: charts-crd
crdOptions: crdOptions: