Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: change default blockSize for calico #9055

Merged
merged 1 commit into from
Jul 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion inventory/sample/group_vars/k8s_cluster/k8s-net-calico.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it appropriate to modify the existing env directly when the kubespray version is upgraded?

kubelet_max_pods: 250

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's appropriate in most scenarios, but there may be some variables that can't be updated, such as calico_pool_blocksize


# add default ippool CIDR (must be inside kube_pods_subnet, defaults to kube_pods_subnet otherwise)
# calico_pool_cidr: 1.2.3.4/5
Expand Down
7 changes: 6 additions & 1 deletion roles/network_plugin/calico/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions tests/files/packet_debian11-calico-upgrade-once.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions tests/files/packet_debian11-calico-upgrade.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion tests/testcases/040_check-network-adv.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down