From f18e77f1dbdabbafa2bacce6650baa9dd60d766a Mon Sep 17 00:00:00 2001 From: Erwan Miran Date: Wed, 25 Sep 2019 13:44:00 +0200 Subject: [PATCH] Blocksize for calico default pool should be configurable (#5198) --- inventory/sample/group_vars/k8s-cluster/k8s-net-calico.yml | 3 +++ roles/network_plugin/calico/tasks/install.yml | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) 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 1c938de19..a7c78f6e5 100644 --- a/inventory/sample/group_vars/k8s-cluster/k8s-net-calico.yml +++ b/inventory/sample/group_vars/k8s-cluster/k8s-net-calico.yml @@ -11,6 +11,9 @@ # add default ippool name # calico_pool_name: "default-pool" +# add default ippool blockSize (defaults kube_network_node_prefix) +# calico_pool_blocksize: 24 + # 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/tasks/install.yml b/roles/network_plugin/calico/tasks/install.yml index 7a920e41d..bd54e0201 100644 --- a/roles/network_plugin/calico/tasks/install.yml +++ b/roles/network_plugin/calico/tasks/install.yml @@ -128,7 +128,7 @@ "name": "{{ calico_pool_name }}", }, "spec": { - "blockSize": "{{ kube_network_node_prefix }}", + "blockSize": "{{ calico_pool_blocksize | default(kube_network_node_prefix) }}", "cidr": "{{ calico_pool_cidr | default(kube_pods_subnet) }}", "ipipMode": "{{ ipip_mode }}", "natOutgoing": {{ nat_outgoing|default(false) and not peer_with_router|default(false) }} }} " | {{ bin_dir }}/calicoctl.sh apply -f -