Fixed dualstack config

Signed-off-by: Roberto Bonafiglia <roberto.bonafiglia@suse.com>
pull/258/head
Roberto Bonafiglia 2022-05-12 12:17:16 +02:00
parent d0394665b5
commit 3e64875d53
1 changed files with 6 additions and 5 deletions

View File

@ -1,6 +1,6 @@
--- charts-original/templates/crs/custom-resources.yaml
+++ charts/templates/crs/custom-resources.yaml
@@ -6,6 +6,27 @@
@@ -6,6 +6,28 @@
{{ $secrets = append $secrets $item }}
{{ end }}
{{ $_ := set $installSpec "imagePullSecrets" $secrets }}
@ -16,14 +16,15 @@
+*/}}
+{{ if not (empty .Values.global.clusterCIDRv6) }}
+{{ $myIP6Dict := dict "natOutgoing" "Enabled" "encapsulation" "VXLAN" "cidr" .Values.global.clusterCIDRv6 }}
+{{ $finalIpPoolList := list $myIP6Dict }}
+{{ $calicoNetwork := get .Values.installation "calicoNetwork" }}
+{{ if not (empty .Values.global.clusterCIDRv4) }}
+{{ $allIpPools := get .Values.installation.calicoNetwork "ipPools" }}
+{{ $finalIpPoolList := append $allIpPools $myIP6Dict }}
+{{ end }}
+{{ $calicoNetwork := get .Values.installation "calicoNetwork" }}
+{{ $_ := set $calicoNetwork "ipPools" $finalIpPoolList }}
+{{ $_ := set $calicoNetwork "bgp" "Enabled" }}
+{{ else }}
+{{ $finalIpPoolList := list $myIP6Dict }}
+{{ $_ := set $calicoNetwork "ipPools" $finalIpPoolList }}
+{{ end }}
+{{ end }}
apiVersion: operator.tigera.io/v1