mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-02-19 04:00:11 -03:30
add blockSize to IPPool spec for Calico >= v3.3.0 (#4224)
* add blockSize to IPPool spec for Calico >= v3.3.0 * fix "cidr" spec in Calico IPPool resource for my PR
This commit is contained in:
committed by
Kubernetes Prow Robot
parent
acbf3db233
commit
d469282f1c
@@ -93,7 +93,7 @@
|
|||||||
- 'calico_conf.stdout == "0"'
|
- 'calico_conf.stdout == "0"'
|
||||||
- calico_pool_cidr is defined
|
- calico_pool_cidr is defined
|
||||||
|
|
||||||
- name: Calico | Configure calico network pool
|
- name: Calico | Configure calico network pool (v3.0.0 <= version < v3.3.0)
|
||||||
shell: >
|
shell: >
|
||||||
echo "
|
echo "
|
||||||
{ "kind": "IPPool",
|
{ "kind": "IPPool",
|
||||||
@@ -110,6 +110,26 @@
|
|||||||
when:
|
when:
|
||||||
- 'calico_conf.stdout == "0"'
|
- 'calico_conf.stdout == "0"'
|
||||||
- calico_version is version("v3.0.0", ">=")
|
- calico_version is version("v3.0.0", ">=")
|
||||||
|
- calico_version is version("v3.3.0", "<")
|
||||||
|
|
||||||
|
- name: Calico | Configure calico network pool (version >= v3.3.0)
|
||||||
|
shell: >
|
||||||
|
echo "
|
||||||
|
{ "kind": "IPPool",
|
||||||
|
"apiVersion": "projectcalico.org/v3",
|
||||||
|
"metadata": {
|
||||||
|
"name": "{{ calico_pool_name }}",
|
||||||
|
},
|
||||||
|
"spec": {
|
||||||
|
"blockSize": "{{ 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 create -f -
|
||||||
|
run_once: true
|
||||||
|
delegate_to: "{{ groups['kube-master'][0] }}"
|
||||||
|
when:
|
||||||
|
- 'calico_conf.stdout == "0"'
|
||||||
|
- calico_version is version("v3.3.0", ">=")
|
||||||
|
|
||||||
- name: Calico | Configure calico network pool (legacy)
|
- name: Calico | Configure calico network pool (legacy)
|
||||||
shell: >
|
shell: >
|
||||||
|
|||||||
Reference in New Issue
Block a user