feat: change default blockSize for calico (#9055)

Signed-off-by: cyclinder qifeng.guo@daocloud.io
This commit is contained in:
Cyclinder 2022-07-20 04:05:27 +08:00 committed by GitHub
parent 2a282711df
commit 2e1863af78
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 10 additions and 3 deletions

View file

@ -19,7 +19,7 @@ calico_cni_name: k8s-pod-network
# calico_pool_name: "default-pool" # calico_pool_name: "default-pool"
# add default ippool blockSize (defaults kube_network_node_prefix) # 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) # add default ippool CIDR (must be inside kube_pods_subnet, defaults to kube_pods_subnet otherwise)
# calico_pool_cidr: 1.2.3.4/5 # calico_pool_cidr: 1.2.3.4/5

View file

@ -16,10 +16,15 @@ calico_vxlan_mode: Always # valid values are 'Always', 'Never' and 'CrossSubnet
calico_cni_pool: true calico_cni_pool: true
calico_cni_pool_ipv6: 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 doesn't support ipip tunneling for the IPv6.
calico_ipip_mode_ipv6: Never calico_ipip_mode_ipv6: Never
calico_vxlan_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 can be 'bird', 'vxlan' and 'none'
calico_network_backend: vxlan calico_network_backend: vxlan

View file

@ -8,6 +8,7 @@ download_run_once: true
# Pin disabling ipip mode to ensure proper upgrade # Pin disabling ipip mode to ensure proper upgrade
ipip: false ipip: false
calico_pool_blocksize: 26
calico_vxlan_mode: Always calico_vxlan_mode: Always
calico_network_backend: bird calico_network_backend: bird

View file

@ -5,6 +5,7 @@ mode: default
# Pin disabling ipip mode to ensure proper upgrade # Pin disabling ipip mode to ensure proper upgrade
ipip: false ipip: false
calico_pool_blocksize: 26
calico_vxlan_mode: Always calico_vxlan_mode: Always
calico_network_backend: bird calico_network_backend: bird

View file

@ -2,7 +2,7 @@
- hosts: kube_node - hosts: kube_node
tasks: tasks:
- name: Test tunl0 routes - 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: args:
executable: /bin/bash executable: /bin/bash
when: when: