Fix typos in calico (#9327)

This commit is contained in:
Ho Kim 2022-09-26 16:11:44 +09:00 committed by GitHub
parent 6dff39344b
commit 18efdc2c51
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 7 deletions

View file

@ -176,7 +176,7 @@ node5
[rack0:vars] [rack0:vars]
cluster_id="1.0.0.1" cluster_id="1.0.0.1"
calcio_rr_id=rr1 calico_rr_id=rr1
calico_group_id=rr1 calico_group_id=rr1
``` ```

View file

@ -7,13 +7,13 @@
retry_count: "{{ 0 if retry_count is undefined else retry_count|int + 1 }}" retry_count: "{{ 0 if retry_count is undefined else retry_count|int + 1 }}"
- name: Calico | Set label for route reflector # noqa 301 305 - name: Calico | Set label for route reflector # noqa 301 305
shell: "{{ bin_dir }}/calicoctl.sh label node {{ inventory_hostname }} calico-rr-id={{ calcio_rr_id }} --overwrite" shell: "{{ bin_dir }}/calicoctl.sh label node {{ inventory_hostname }} calico-rr-id={{ calico_rr_id }} --overwrite"
changed_when: false changed_when: false
register: calico_rr_id_label register: calico_rr_id_label
until: calico_rr_id_label is succeeded until: calico_rr_id_label is succeeded
delay: "{{ retry_stagger | random + 3 }}" delay: "{{ retry_stagger | random + 3 }}"
retries: 10 retries: 10
when: calcio_rr_id is defined when: calico_rr_id is defined
- name: Calico-rr | Fetch current node object - name: Calico-rr | Fetch current node object
command: "{{ bin_dir }}/calicoctl.sh get node {{ inventory_hostname }} -ojson" command: "{{ bin_dir }}/calicoctl.sh get node {{ inventory_hostname }} -ojson"

View file

@ -19,10 +19,10 @@
{"apiVersion": "projectcalico.org/v3", {"apiVersion": "projectcalico.org/v3",
"kind": "BGPPeer", "kind": "BGPPeer",
"metadata": { "metadata": {
"name": "{{ calcio_rr_id }}-to-node" "name": "{{ calico_rr_id }}-to-node"
}, },
"spec": { "spec": {
"peerSelector": "calico-rr-id == '{{ calcio_rr_id }}'", "peerSelector": "calico-rr-id == '{{ calico_rr_id }}'",
"nodeSelector": "calico-group-id == '{{ calico_group_id }}'" "nodeSelector": "calico-group-id == '{{ calico_group_id }}'"
}} }}
register: output register: output
@ -30,7 +30,7 @@
until: output.rc == 0 until: output.rc == 0
delay: "{{ retry_stagger | random + 3 }}" delay: "{{ retry_stagger | random + 3 }}"
when: when:
- calcio_rr_id is defined - calico_rr_id is defined
- calico_group_id is defined - calico_group_id is defined
- inventory_hostname in groups['calico_rr'] - inventory_hostname in groups['calico_rr']
@ -58,7 +58,7 @@
- "{{ groups['calico_rr'] | default([]) }}" - "{{ groups['calico_rr'] | default([]) }}"
when: when:
- inventory_hostname == groups['kube_control_plane'][0] - inventory_hostname == groups['kube_control_plane'][0]
- calcio_rr_id is not defined or calico_group_id is not defined - calico_rr_id is not defined or calico_group_id is not defined
- name: Calico | Configure route reflectors to peer with each other - name: Calico | Configure route reflectors to peer with each other
command: command: