From 1a9b296d9eaf39942c04a53823db418fa735f78b Mon Sep 17 00:00:00 2001 From: n-guitar Date: Sat, 8 Jan 2022 19:05:41 +0900 Subject: [PATCH] Add option IP autodetection methods See below for a detailed explanation of the options. https://projectcalico.docs.tigera.io/reference/node/configuration#ip-autodetection-methods --- packages/rke2-canal/charts/templates/daemonset.yaml | 6 ++++++ packages/rke2-canal/charts/values.yaml | 8 ++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/packages/rke2-canal/charts/templates/daemonset.yaml b/packages/rke2-canal/charts/templates/daemonset.yaml index cefe527..1a49610 100644 --- a/packages/rke2-canal/charts/templates/daemonset.yaml +++ b/packages/rke2-canal/charts/templates/daemonset.yaml @@ -152,6 +152,12 @@ spec: value: {{ .Values.calico.felixFailsafeInboundHostPorts | quote }} - name: FELIX_FAILSAFEOUTBOUNDHOSTPORTS value: {{ .Values.calico.felixFailsafeOutboundHostPorts | quote }} + # The method to use to autodetect the IPv4 address for this host. + - name: IP_AUTODETECTION_METHOD + value: {{ .Values.calico.ipAutoDetectionMethod | quote }} + # The method to use to autodetect the IPv6 address for this host. + - name: IP6_AUTODETECTION_METHOD + value: {{ .Values.calico.ip6AutoDetectionMethod | quote }} securityContext: privileged: true resources: diff --git a/packages/rke2-canal/charts/values.yaml b/packages/rke2-canal/charts/values.yaml index 1be44bf..9fdf995 100644 --- a/packages/rke2-canal/charts/values.yaml +++ b/packages/rke2-canal/charts/values.yaml @@ -13,14 +13,14 @@ flannel: # If left blank, then the interface is chosen using the node's # default route. iface: "" - # kube-flannel command arguments + # kube-flannel command arguments args: - "--ip-masq" - "--kube-subnet-mgr" # Backend for kube-flannel. Backend should not be changed # at runtime. backend: "vxlan" - + calico: # CNI installation image. cniImage: @@ -75,6 +75,10 @@ calico: felixFailsafeInboundHostPorts: "" # calico outbound failsafe ports. Empty string means defaults. Use 'none' to disable failsafe if you have your own rules. felixFailsafeOutboundHostPorts: "" + # The method to use to autodetect the IPv4 address for this host. + ipAutoDetectionMethod: "first-found" + # The method to use to autodetect the IPv6 address for this host. + ip6AutoDetectionMethod: "first-found" global: systemDefaultRegistry: ""