Skip to content

Commit

Permalink
make sure peers is defined. (kubernetes-sigs#11259)
Browse files Browse the repository at this point in the history
* make sure peers is defined.

* Update peer_with_router.yml
  • Loading branch information
ehsan310 authored Jun 4, 2024
1 parent 351393e commit 0c8d294
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions roles/network_plugin/calico/tasks/peer_with_router.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
until: output.rc == 0
delay: "{{ retry_stagger | random + 3 }}"
with_items:
- "{{ peers | selectattr('scope', 'defined') | selectattr('scope', 'equalto', 'global') | list | default([]) }}"
- "{{ peers | default([]) | selectattr('scope', 'defined') | selectattr('scope', 'equalto', 'global') | list }}"
when:
- inventory_hostname == groups['kube_control_plane'][0]

Expand Down Expand Up @@ -107,7 +107,7 @@
until: output.rc == 0
delay: "{{ retry_stagger | random + 3 }}"
with_items:
- "{{ peers | selectattr('scope', 'undefined') | list | default([]) | union(peers | selectattr('scope', 'defined') | selectattr('scope', 'equalto', 'node') | list | default([])) }}"
- "{{ peers | default([]) | selectattr('scope', 'undefined') | list | union(peers | default([]) | selectattr('scope', 'defined') | selectattr('scope', 'equalto', 'node') | list ) }}"
delegate_to: "{{ groups['kube_control_plane'][0] }}"
when:
- inventory_hostname in groups['k8s_cluster']

0 comments on commit 0c8d294

Please sign in to comment.