diff --git a/inventory/sample/group_vars/k8s_cluster/k8s-net-calico.yml b/inventory/sample/group_vars/k8s_cluster/k8s-net-calico.yml index cb8cde067..553e48b98 100644 --- a/inventory/sample/group_vars/k8s_cluster/k8s-net-calico.yml +++ b/inventory/sample/group_vars/k8s_cluster/k8s-net-calico.yml @@ -19,7 +19,7 @@ calico_cni_name: k8s-pod-network # calico_pool_name: "default-pool" # add default ippool blockSize (defaults kube_network_node_prefix) -# calico_pool_blocksize: 24 +calico_pool_blocksize: 26 # add default ippool CIDR (must be inside kube_pods_subnet, defaults to kube_pods_subnet otherwise) # calico_pool_cidr: 1.2.3.4/5 diff --git a/roles/network_plugin/calico/defaults/main.yml b/roles/network_plugin/calico/defaults/main.yml index e77114244..2f1c42e0b 100644 --- a/roles/network_plugin/calico/defaults/main.yml +++ b/roles/network_plugin/calico/defaults/main.yml @@ -16,10 +16,15 @@ calico_vxlan_mode: Always # valid values are 'Always', 'Never' and 'CrossSubnet calico_cni_pool: true calico_cni_pool_ipv6: true +# add default ippool blockSize (defaults kube_network_node_prefix) +calico_pool_blocksize: 26 + # Calico doesn't support ipip tunneling for the IPv6. calico_ipip_mode_ipv6: Never calico_vxlan_mode_ipv6: Never -calico_pool_blocksize_ipv6: 116 + +# add default ipv6 ippool blockSize (defaults kube_network_node_prefix_ipv6) +calico_pool_blocksize_ipv6: 122 # Calico network backend can be 'bird', 'vxlan' and 'none' calico_network_backend: vxlan diff --git a/tests/files/packet_debian11-calico-upgrade-once.yml b/tests/files/packet_debian11-calico-upgrade-once.yml index 9dd264ad9..3c589a0bd 100644 --- a/tests/files/packet_debian11-calico-upgrade-once.yml +++ b/tests/files/packet_debian11-calico-upgrade-once.yml @@ -8,6 +8,7 @@ download_run_once: true # Pin disabling ipip mode to ensure proper upgrade ipip: false +calico_pool_blocksize: 26 calico_vxlan_mode: Always calico_network_backend: bird diff --git a/tests/files/packet_debian11-calico-upgrade.yml b/tests/files/packet_debian11-calico-upgrade.yml index 3df0f6d8d..1b05714e4 100644 --- a/tests/files/packet_debian11-calico-upgrade.yml +++ b/tests/files/packet_debian11-calico-upgrade.yml @@ -5,6 +5,7 @@ mode: default # Pin disabling ipip mode to ensure proper upgrade ipip: false +calico_pool_blocksize: 26 calico_vxlan_mode: Always calico_network_backend: bird diff --git a/tests/testcases/040_check-network-adv.yml b/tests/testcases/040_check-network-adv.yml index 2c765bd72..8d1e5122e 100644 --- a/tests/testcases/040_check-network-adv.yml +++ b/tests/testcases/040_check-network-adv.yml @@ -2,7 +2,7 @@ - hosts: kube_node tasks: - name: Test tunl0 routes - shell: "set -o pipefail && ! /sbin/ip ro | grep '/{{ calico_pool_blocksize}} | default(26) via' | grep -v tunl0" + shell: "set -o pipefail && ! /sbin/ip ro | grep '/{{ calico_pool_blocksize }} | default(26) via' | grep -v tunl0" args: executable: /bin/bash when: