diff --git a/packages/rke2-canal/charts/templates/_helpers.tpl b/packages/rke2-canal/charts/templates/_helpers.tpl index b647c75..bccf2cb 100644 --- a/packages/rke2-canal/charts/templates/_helpers.tpl +++ b/packages/rke2-canal/charts/templates/_helpers.tpl @@ -5,3 +5,9 @@ {{- "" -}} {{- end -}} {{- end -}} + +{{- define "enableIPv6?" -}} +{{- $cidrv6 := coalesce .Values.global.clusterCIDRv6 .Values.podCidrv6 -}} +{{- ternary "false" "true" (empty .Values.global.clusterCIDRv6) -}} +{{- end -}} + diff --git a/packages/rke2-canal/charts/templates/config.yaml b/packages/rke2-canal/charts/templates/config.yaml index 7229863..fbc776a 100644 --- a/packages/rke2-canal/charts/templates/config.yaml +++ b/packages/rke2-canal/charts/templates/config.yaml @@ -60,7 +60,9 @@ data: # Flannel network configuration. Mounted into the flannel container. net-conf.json: | { - "Network": {{ coalesce .Values.global.clusterCIDR .Values.podCidr | quote }}, + "Network": {{ coalesce .Values.global.clusterCIDRv4 .Values.podCidr | quote }}, + "IPv6Network": {{ coalesce .Values.global.clusterCIDRv6 .Values.podCidrv6 | quote }}, + "EnableIPv6": {{ template "enableIPv6?" . }}, "Backend": { "Type": {{ .Values.flannel.backend | quote }} } diff --git a/packages/rke2-canal/charts/values.yaml b/packages/rke2-canal/charts/values.yaml index a997198..443d4c1 100644 --- a/packages/rke2-canal/charts/values.yaml +++ b/packages/rke2-canal/charts/values.yaml @@ -78,3 +78,5 @@ calico: global: systemDefaultRegistry: "" + clusterCIDRv4: "" + clusterCIDRv6: "" diff --git a/packages/rke2-canal/package.yaml b/packages/rke2-canal/package.yaml index d8023a1..f36a366 100644 --- a/packages/rke2-canal/package.yaml +++ b/packages/rke2-canal/package.yaml @@ -1,4 +1,4 @@ url: local -packageVersion: 07 +packageVersion: 08 # This repository does not use releaseCandidateVersions, so you can leave this as 00. releaseCandidateVersion: 00