mirror of https://git.rancher.io/rke2-charts
37 lines
1.9 KiB
Diff
37 lines
1.9 KiB
Diff
--- charts-original/templates/crs/custom-resources.yaml
|
|
+++ charts/templates/crs/custom-resources.yaml
|
|
@@ -2,6 +2,33 @@
|
|
{{ $installSpec := omit .Values.installation "enabled" }}
|
|
{{ $_ := set $installSpec "imagePullSecrets" (include "tigera-operator.imagePullSecrets" . | fromYamlArray) }}
|
|
{{ $_ := set $installSpec "kubeletVolumePluginPath" .Values.kubeletVolumePluginPath }}
|
|
+{{ $defaultRegistry := get $installSpec "registry" }}
|
|
+{{ $finalRegistry := coalesce .Values.global.systemDefaultRegistry $defaultRegistry }}
|
|
+{{ $_ := set $installSpec "registry" $finalRegistry }}
|
|
+{{ if empty .Values.installation.calicoNetwork.ipPools }}
|
|
+{{ $calicoNetwork := get .Values.installation "calicoNetwork" }}
|
|
+{{ if not (empty .Values.global.clusterCIDRv4) }}
|
|
+{{ $myIP4Dict := dict "natOutgoing" "Enabled" "encapsulation" "VXLAN" "cidr" .Values.global.clusterCIDRv4 }}
|
|
+{{ if not (empty .Values.global.clusterCIDRv6) }}
|
|
+{{ $myIP6Dict := dict "natOutgoing" "Enabled" "encapsulation" "VXLAN" "cidr" .Values.global.clusterCIDRv6 }}
|
|
+{{ $ipPoolList := list $myIP4Dict }}
|
|
+{{ $finalIpPoolList := append $ipPoolList $myIP6Dict }}
|
|
+{{ $_ := set $calicoNetwork "ipPools" $finalIpPoolList }}
|
|
+{{ else }}
|
|
+{{ $finalIpPoolList := list $myIP4Dict }}
|
|
+{{ $_ := set $calicoNetwork "ipPools" $finalIpPoolList }}
|
|
+{{ end }}
|
|
+{{ else if not (empty .Values.global.clusterCIDRv6) }}
|
|
+{{ $myIP6Dict := dict "natOutgoing" "Enabled" "encapsulation" "VXLAN" "cidr" .Values.global.clusterCIDRv6 }}
|
|
+{{ $finalIpPoolList := list $myIP6Dict }}
|
|
+{{ $_ := set $calicoNetwork "ipPools" $finalIpPoolList }}
|
|
+{{ end }}
|
|
+{{ if empty .Values.installation.calicoNetwork.nodeAddressAutodetectionV4 }}
|
|
+{{ $calicoNetwork := get .Values.installation "calicoNetwork" }}
|
|
+{{ $autodetect := dict "firstFound" true }}
|
|
+{{ $_ := set $calicoNetwork "nodeAddressAutodetectionV4" $autodetect }}
|
|
+{{ end }}
|
|
+{{ end }}
|
|
|
|
apiVersion: operator.tigera.io/v1
|
|
kind: Installation
|