From fecdfe92287cde252876e1a85bb8cc7048eaccaf Mon Sep 17 00:00:00 2001 From: Cecile Robert-Michon Date: Mon, 28 Feb 2022 11:46:38 -0800 Subject: [PATCH] Add patch for ipv6 calico config --- templates/addons/calico-ipv6.yaml | 3 +- .../addons/calico-ipv6/kustomization.yaml | 1 + .../calico-ipv6/patches/calico-config.yaml | 41 +++++++++++++++++++ .../test/ci/cluster-template-prow-ipv6.yaml | 3 +- 4 files changed, 46 insertions(+), 2 deletions(-) create mode 100644 templates/addons/calico-ipv6/patches/calico-config.yaml diff --git a/templates/addons/calico-ipv6.yaml b/templates/addons/calico-ipv6.yaml index 2d23c3e72b5b..b6c7111fe227 100644 --- a/templates/addons/calico-ipv6.yaml +++ b/templates/addons/calico-ipv6.yaml @@ -3937,7 +3937,8 @@ data: "mtu": 1500, "ipam": { "type": "host-local", - "subnet": "usePodCidr" + "assign_ipv4": "false", + "assign_ipv6": "true" }, "policy": { "type": "k8s" diff --git a/templates/addons/calico-ipv6/kustomization.yaml b/templates/addons/calico-ipv6/kustomization.yaml index c5f104542586..bdb117a6d240 100644 --- a/templates/addons/calico-ipv6/kustomization.yaml +++ b/templates/addons/calico-ipv6/kustomization.yaml @@ -4,6 +4,7 @@ resources: - https://docs.projectcalico.org/v3.22/manifests/calico-policy-only.yaml patchesStrategicMerge: - patches/azure-mtu.yaml + - patches/calico-config.yaml patches: - target: group: apps diff --git a/templates/addons/calico-ipv6/patches/calico-config.yaml b/templates/addons/calico-ipv6/patches/calico-config.yaml new file mode 100644 index 000000000000..31304b93770c --- /dev/null +++ b/templates/addons/calico-ipv6/patches/calico-config.yaml @@ -0,0 +1,41 @@ +kind: ConfigMap +apiVersion: v1 +metadata: + name: calico-config + namespace: kube-system +data: + cni_network_config: |- + { + "name": "k8s-pod-network", + "cniVersion": "0.3.1", + "plugins": [ + { + "type": "calico", + "log_level": "info", + "log_file_path": "/var/log/calico/cni/cni.log", + "datastore_type": "kubernetes", + "nodename": "__KUBERNETES_NODE_NAME__", + "mtu": 1500, + "ipam": { + "type": "host-local", + "assign_ipv4": "false", + "assign_ipv6": "true" + }, + "policy": { + "type": "k8s" + }, + "kubernetes": { + "kubeconfig": "__KUBECONFIG_FILEPATH__" + } + }, + { + "type": "portmap", + "snat": true, + "capabilities": {"portMappings": true} + }, + { + "type": "bandwidth", + "capabilities": {"bandwidth": true} + } + ] + } diff --git a/templates/test/ci/cluster-template-prow-ipv6.yaml b/templates/test/ci/cluster-template-prow-ipv6.yaml index c15a84b46ca8..cdc3339b5930 100644 --- a/templates/test/ci/cluster-template-prow-ipv6.yaml +++ b/templates/test/ci/cluster-template-prow-ipv6.yaml @@ -4240,7 +4240,8 @@ data: "mtu": 1500, "ipam": { "type": "host-local", - "subnet": "usePodCidr" + "assign_ipv4": "false", + "assign_ipv6": "true" }, "policy": { "type": "k8s"