--- charts-original/templates/crs/custom-resources.yaml +++ charts/templates/crs/custom-resources.yaml @@ -6,6 +6,28 @@ {{ $secrets = append $secrets $item }} {{ end }} {{ $_ := set $installSpec "imagePullSecrets" $secrets }} +{{ $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 }} +{{ end }} apiVersion: operator.tigera.io/v1 kind: Installation