From b2dd1c37fb9d1cf1ab5aea480b0ca957b8d5e98a Mon Sep 17 00:00:00 2001 From: Roberto Bonafiglia Date: Mon, 23 May 2022 20:44:08 +0200 Subject: [PATCH] Fixed Canal for IPv6 only setup Signed-off-by: Roberto Bonafiglia --- .../rke2-canal/charts/templates/daemonset.yaml | 15 ++++++++++++--- packages/rke2-canal/package.yaml | 2 +- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/packages/rke2-canal/charts/templates/daemonset.yaml b/packages/rke2-canal/charts/templates/daemonset.yaml index 1a49610..8e80e8e 100644 --- a/packages/rke2-canal/charts/templates/daemonset.yaml +++ b/packages/rke2-canal/charts/templates/daemonset.yaml @@ -121,9 +121,6 @@ spec: value: {{ .Values.calico.felixIptablesRefreshInterval | quote}} - name: FELIX_IPTABLESBACKEND value: {{ .Values.calico.felixIptablesBackend | quote}} - # No IP address needed. - - name: IP - value: "" # The default IPv4 pool to create on startup if none exists. Pod IPs will be # chosen from this range. Changing this value after installation will have # no effect. This should fall within `--cluster-cidr`. @@ -135,9 +132,14 @@ spec: # Set Felix endpoint to host default action to ACCEPT. - name: FELIX_DEFAULTENDPOINTTOHOSTACTION value: {{ .Values.calico.felixDefaultEndpointToHostAction | quote }} +{{- if coalesce .Values.global.clusterCIDRv6 .Values.podCidrv6 }} + - name: FELIX_IPV6SUPPORT + value: "true" +{{- else }} # Disable IPv6 on Kubernetes. - name: FELIX_IPV6SUPPORT value: {{ .Values.calico.felixIpv6Support | quote }} +{{- end }} # Set Felix logging to "info" - name: FELIX_LOGSEVERITYSCREEN value: {{ .Values.calico.felixLogSeverityScreen | quote }} @@ -152,12 +154,19 @@ spec: value: {{ .Values.calico.felixFailsafeInboundHostPorts | quote }} - name: FELIX_FAILSAFEOUTBOUNDHOSTPORTS value: {{ .Values.calico.felixFailsafeOutboundHostPorts | quote }} +{{- if coalesce .Values.global.clusterCIDRv4 .Values.podCidr }} # The method to use to autodetect the IPv4 address for this host. - name: IP_AUTODETECTION_METHOD value: {{ .Values.calico.ipAutoDetectionMethod | quote }} +{{- else }} + - name: IP + value: "none" +{{- end }} +{{- if coalesce .Values.global.clusterCIDRv6 .Values.podCidrv6 }} # The method to use to autodetect the IPv6 address for this host. - name: IP6_AUTODETECTION_METHOD value: {{ .Values.calico.ip6AutoDetectionMethod | quote }} +{{- end }} securityContext: privileged: true resources: diff --git a/packages/rke2-canal/package.yaml b/packages/rke2-canal/package.yaml index 85d97b2..be04e61 100644 --- a/packages/rke2-canal/package.yaml +++ b/packages/rke2-canal/package.yaml @@ -1,2 +1,2 @@ url: local -packageVersion: 01 +packageVersion: 02