Allow calico settings to be modified (#5101)
Previous logic used calicoctl.sh create --skip-exists, which allowed setting initial values, but not permitting changes.pull/4895/head
parent
f255ce3f02
commit
7e1645845f
|
@ -113,7 +113,7 @@
|
||||||
"spec": {
|
"spec": {
|
||||||
"cidr": "{{ calico_pool_cidr | default(kube_pods_subnet) }}",
|
"cidr": "{{ calico_pool_cidr | default(kube_pods_subnet) }}",
|
||||||
"ipipMode": "{{ ipip_mode }}",
|
"ipipMode": "{{ ipip_mode }}",
|
||||||
"natOutgoing": {{ nat_outgoing|default(false) and not peer_with_router|default(false) }} }} " | {{ bin_dir }}/calicoctl.sh create -f -
|
"natOutgoing": {{ nat_outgoing|default(false) and not peer_with_router|default(false) }} }} " | {{ bin_dir }}/calicoctl.sh apply -f -
|
||||||
when:
|
when:
|
||||||
- inventory_hostname == groups['kube-master'][0]
|
- inventory_hostname == groups['kube-master'][0]
|
||||||
- 'calico_conf.stdout == "0"'
|
- 'calico_conf.stdout == "0"'
|
||||||
|
@ -131,7 +131,7 @@
|
||||||
"blockSize": "{{ kube_network_node_prefix }}",
|
"blockSize": "{{ kube_network_node_prefix }}",
|
||||||
"cidr": "{{ calico_pool_cidr | default(kube_pods_subnet) }}",
|
"cidr": "{{ calico_pool_cidr | default(kube_pods_subnet) }}",
|
||||||
"ipipMode": "{{ ipip_mode }}",
|
"ipipMode": "{{ ipip_mode }}",
|
||||||
"natOutgoing": {{ nat_outgoing|default(false) and not peer_with_router|default(false) }} }} " | {{ bin_dir }}/calicoctl.sh create -f -
|
"natOutgoing": {{ nat_outgoing|default(false) and not peer_with_router|default(false) }} }} " | {{ bin_dir }}/calicoctl.sh apply -f -
|
||||||
when:
|
when:
|
||||||
- inventory_hostname == groups['kube-master'][0]
|
- inventory_hostname == groups['kube-master'][0]
|
||||||
- 'calico_conf.stdout == "0"'
|
- 'calico_conf.stdout == "0"'
|
||||||
|
@ -156,7 +156,7 @@
|
||||||
"spec": {
|
"spec": {
|
||||||
"logSeverityScreen": "Info",
|
"logSeverityScreen": "Info",
|
||||||
"nodeToNodeMeshEnabled": {{ nodeToNodeMeshEnabled|default('true') }} ,
|
"nodeToNodeMeshEnabled": {{ nodeToNodeMeshEnabled|default('true') }} ,
|
||||||
"asNumber": {{ global_as_num }} }} ' | {{ bin_dir }}/calicoctl.sh create --skip-exists -f -
|
"asNumber": {{ global_as_num }} }} ' | {{ bin_dir }}/calicoctl.sh apply -f -
|
||||||
changed_when: false
|
changed_when: false
|
||||||
when:
|
when:
|
||||||
- inventory_hostname == groups['kube-master'][0]
|
- inventory_hostname == groups['kube-master'][0]
|
||||||
|
@ -172,7 +172,7 @@
|
||||||
"spec": {
|
"spec": {
|
||||||
"asNumber": "{{ item.as }}",
|
"asNumber": "{{ item.as }}",
|
||||||
"peerIP": "{{ item.router_id }}"
|
"peerIP": "{{ item.router_id }}"
|
||||||
}}' | {{ bin_dir }}/calicoctl.sh create --skip-exists -f -
|
}}' | {{ bin_dir }}/calicoctl.sh apply -f -
|
||||||
retries: 4
|
retries: 4
|
||||||
delay: "{{ retry_stagger | random + 3 }}"
|
delay: "{{ retry_stagger | random + 3 }}"
|
||||||
with_items:
|
with_items:
|
||||||
|
@ -192,7 +192,7 @@
|
||||||
"spec": {
|
"spec": {
|
||||||
"nodeSelector": "!has(i-am-a-route-reflector)",
|
"nodeSelector": "!has(i-am-a-route-reflector)",
|
||||||
"peerSelector": "has(i-am-a-route-reflector)"
|
"peerSelector": "has(i-am-a-route-reflector)"
|
||||||
}}' | {{ bin_dir }}/calicoctl.sh create --skip-exists -f -
|
}}' | {{ bin_dir }}/calicoctl.sh apply -f -
|
||||||
retries: 4
|
retries: 4
|
||||||
delay: "{{ retry_stagger | random + 3 }}"
|
delay: "{{ retry_stagger | random + 3 }}"
|
||||||
with_items:
|
with_items:
|
||||||
|
@ -212,7 +212,7 @@
|
||||||
"spec": {
|
"spec": {
|
||||||
"nodeSelector": "has(i-am-a-route-reflector)",
|
"nodeSelector": "has(i-am-a-route-reflector)",
|
||||||
"peerSelector": "has(i-am-a-route-reflector)"
|
"peerSelector": "has(i-am-a-route-reflector)"
|
||||||
}}' | {{ bin_dir }}/calicoctl.sh create --skip-exists -f -
|
}}' | {{ bin_dir }}/calicoctl.sh apply -f -
|
||||||
retries: 4
|
retries: 4
|
||||||
delay: "{{ retry_stagger | random + 3 }}"
|
delay: "{{ retry_stagger | random + 3 }}"
|
||||||
with_items:
|
with_items:
|
||||||
|
@ -285,7 +285,7 @@
|
||||||
"asNumber": "{{ local_as }}"
|
"asNumber": "{{ local_as }}"
|
||||||
},
|
},
|
||||||
"orchRefs":[{"nodeName":"{{ inventory_hostname }}","orchestrator":"k8s"}]
|
"orchRefs":[{"nodeName":"{{ inventory_hostname }}","orchestrator":"k8s"}]
|
||||||
}}' | {{ bin_dir }}/calicoctl.sh {{ 'apply -f -' if calico_datastore == "kdd" else 'create --skip-exists -f -' }}
|
}}' | {{ bin_dir }}/calicoctl.sh apply -f -
|
||||||
retries: 4
|
retries: 4
|
||||||
delay: "{{ retry_stagger | random + 3 }}"
|
delay: "{{ retry_stagger | random + 3 }}"
|
||||||
when:
|
when:
|
||||||
|
@ -306,7 +306,7 @@
|
||||||
"asNumber": "{{ item.as }}",
|
"asNumber": "{{ item.as }}",
|
||||||
"node": "{{ inventory_hostname }}",
|
"node": "{{ inventory_hostname }}",
|
||||||
"peerIP": "{{ item.router_id }}"
|
"peerIP": "{{ item.router_id }}"
|
||||||
}}' | {{ bin_dir }}/calicoctl.sh create --skip-exists -f -
|
}}' | {{ bin_dir }}/calicoctl.sh apply -f -
|
||||||
retries: 4
|
retries: 4
|
||||||
delay: "{{ retry_stagger | random + 3 }}"
|
delay: "{{ retry_stagger | random + 3 }}"
|
||||||
with_items:
|
with_items:
|
||||||
|
|
Loading…
Reference in New Issue