diff --git a/packages/rke2-canal/charts/Chart.yaml b/packages/rke2-canal/charts/Chart.yaml index 34c1200..14358f5 100644 --- a/packages/rke2-canal/charts/Chart.yaml +++ b/packages/rke2-canal/charts/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v1 name: rke2-canal description: Install Canal Network Plugin. -version: v3.21.4-build20220317 +version: v3.21.4-build20220427 appVersion: v3.21.4 home: https://www.projectcalico.org/ keywords: diff --git a/packages/rke2-canal/charts/templates/config.yaml b/packages/rke2-canal/charts/templates/config.yaml index 02e0ac7..ac3f136 100644 --- a/packages/rke2-canal/charts/templates/config.yaml +++ b/packages/rke2-canal/charts/templates/config.yaml @@ -37,18 +37,24 @@ data: "ipam": { "type": "host-local", "ranges": [ +{{- if coalesce .Values.global.clusterCIDRv4 .Values.podCidr }} [ { "subnet": "usePodCidr" } {{- if coalesce .Values.global.clusterCIDRv6 .Values.podCidrv6 }} ], +{{- else }} + ] +{{- end }} +{{- end }} +{{- if coalesce .Values.global.clusterCIDRv6 .Values.podCidrv6 }} [ { "subnet": "usePodCidrIPv6" } -{{- end }} ] +{{- end }} ] }, "policy": { @@ -73,7 +79,11 @@ data: # Flannel network configuration. Mounted into the flannel container. net-conf.json: | { +{{- if coalesce .Values.global.clusterCIDRv4 .Values.podCidr }} "Network": {{ coalesce .Values.global.clusterCIDRv4 .Values.podCidr | quote }}, +{{- else }} + "EnableIPv4": false, +{{- end }} {{- if coalesce .Values.global.clusterCIDRv6 .Values.podCidrv6 }} "IPv6Network": {{ coalesce .Values.global.clusterCIDRv6 .Values.podCidrv6 | quote }}, "EnableIPv6": true, diff --git a/packages/rke2-canal/charts/values.yaml b/packages/rke2-canal/charts/values.yaml index 5d0ce5c..0754816 100644 --- a/packages/rke2-canal/charts/values.yaml +++ b/packages/rke2-canal/charts/values.yaml @@ -2,7 +2,7 @@ # The IPv4 cidr pool to create on startup if none exists. Pod IPs will be # chosen from this range. -podCidr: "10.42.0.0/16" +#podCidr: "10.42.0.0/16" flannel: # kube-flannel image