calico: fix warnings (#7121)

TASK [network_plugin/calico : Calico | Configure calico network pool] **********
task path: /builds/kargo-ci/kubernetes-sigs-kubespray/roles/network_plugin/calico/tasks/install.yml:138
Friday 08 January 2021  17:10:12 +0000 (0:00:01.521)       0:11:36.885 ********
[WARNING]: The value {'kind': 'IPPool', 'apiVersion': 'projectcalico.org/v3',
'metadata': {'name': 'default-pool'}, 'spec': {'blockSize': 24, 'cidr':
'10.233.64.0/18', 'ipipMode': 'Always', 'vxlanMode': 'Never', 'natOutgoing':
True}} (type dict) in a string field was converted to "{'kind': 'IPPool',
'apiVersion': 'projectcalico.org/v3', 'metadata': {'name': 'default-pool'},
'spec': {'blockSize': 24, 'cidr': '10.233.64.0/18', 'ipipMode': 'Always',
'vxlanMode': 'Never', 'natOutgoing': True}}" (type string). If this does not
look like what you expect, quote the entire value to ensure it does not change.

Signed-off-by: Etienne Champetier <champetier.etienne@gmail.com>
pull/7125/head
Etienne Champetier 2021-01-08 19:01:05 -05:00 committed by GitHub
parent e8a8a7b8cc
commit ff95292435
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 15 additions and 1 deletions

View File

@ -138,6 +138,8 @@
- name: Calico | Configure calico network pool - name: Calico | Configure calico network pool
command: command:
cmd: "{{ bin_dir }}/calicoctl.sh apply -f -" cmd: "{{ bin_dir }}/calicoctl.sh apply -f -"
stdin: "{{ stdin | to_json }}"
vars:
stdin: > stdin: >
{ "kind": "IPPool", { "kind": "IPPool",
"apiVersion": "projectcalico.org/v3", "apiVersion": "projectcalico.org/v3",
@ -171,6 +173,8 @@
- name: Calico | Set up BGP Configuration - name: Calico | Set up BGP Configuration
command: command:
cmd: "{{ bin_dir }}/calicoctl.sh apply -f -" cmd: "{{ bin_dir }}/calicoctl.sh apply -f -"
stdin: "{{ stdin | to_json }}"
vars:
stdin: > stdin: >
{ "kind": "BGPConfiguration", { "kind": "BGPConfiguration",
"apiVersion": "projectcalico.org/v3", "apiVersion": "projectcalico.org/v3",
@ -181,7 +185,7 @@
"logSeverityScreen": "Info", "logSeverityScreen": "Info",
{% if not calico_no_global_as_num|default(false) %}"asNumber": {{ global_as_num }},{% endif %} {% if not calico_no_global_as_num|default(false) %}"asNumber": {{ global_as_num }},{% endif %}
"nodeToNodeMeshEnabled": {{ nodeToNodeMeshEnabled|default('true') }} , "nodeToNodeMeshEnabled": {{ nodeToNodeMeshEnabled|default('true') }} ,
{% if calico_advertise_cluster_ips|default(false) %}"serviceClusterIPs": [{"cidr": {{ kube_service_addresses }} }],{% endif %} {% if calico_advertise_cluster_ips|default(false) %}"serviceClusterIPs": [{"cidr": "{{ kube_service_addresses }}" }],{% endif %}
"serviceExternalIPs": {{ _service_external_ips|default([]) }} }} "serviceExternalIPs": {{ _service_external_ips|default([]) }} }}
changed_when: false changed_when: false
when: when:
@ -190,6 +194,8 @@
- name: Calico | Configure peering with router(s) at global scope - name: Calico | Configure peering with router(s) at global scope
command: command:
cmd: "{{ bin_dir }}/calicoctl.sh apply -f -" cmd: "{{ bin_dir }}/calicoctl.sh apply -f -"
stdin: "{{ stdin | to_json }}"
vars:
stdin: > stdin: >
{"apiVersion": "projectcalico.org/v3", {"apiVersion": "projectcalico.org/v3",
"kind": "BGPPeer", "kind": "BGPPeer",
@ -213,6 +219,8 @@
- name: Calico | Configure peering with route reflectors at global scope - name: Calico | Configure peering with route reflectors at global scope
command: command:
cmd: "{{ bin_dir }}/calicoctl.sh apply -f -" cmd: "{{ bin_dir }}/calicoctl.sh apply -f -"
stdin: "{{ stdin | to_json }}"
vars:
stdin: > stdin: >
{"apiVersion": "projectcalico.org/v3", {"apiVersion": "projectcalico.org/v3",
"kind": "BGPPeer", "kind": "BGPPeer",
@ -236,6 +244,8 @@
- name: Calico | Configure route reflectors to peer with each other - name: Calico | Configure route reflectors to peer with each other
command: command:
cmd: "{{ bin_dir }}/calicoctl.sh apply -f -" cmd: "{{ bin_dir }}/calicoctl.sh apply -f -"
stdin: "{{ stdin | to_json }}"
vars:
stdin: > stdin: >
{"apiVersion": "projectcalico.org/v3", {"apiVersion": "projectcalico.org/v3",
"kind": "BGPPeer", "kind": "BGPPeer",
@ -310,6 +320,8 @@
- name: Calico | Configure node asNumber for per node peering - name: Calico | Configure node asNumber for per node peering
command: command:
cmd: "{{ bin_dir }}/calicoctl.sh apply -f -" cmd: "{{ bin_dir }}/calicoctl.sh apply -f -"
stdin: "{{ stdin | to_json }}"
vars:
stdin: > stdin: >
{"apiVersion": "projectcalico.org/v3", {"apiVersion": "projectcalico.org/v3",
"kind": "Node", "kind": "Node",
@ -335,6 +347,8 @@
- name: Calico | Configure peering with router(s) at node scope - name: Calico | Configure peering with router(s) at node scope
command: command:
cmd: "{{ bin_dir }}/calicoctl.sh apply -f -" cmd: "{{ bin_dir }}/calicoctl.sh apply -f -"
stdin: "{{ stdin | to_json }}"
vars:
stdin: > stdin: >
{"apiVersion": "projectcalico.org/v3", {"apiVersion": "projectcalico.org/v3",
"kind": "BGPPeer", "kind": "BGPPeer",