Add additional checking for calico rr cluster_id (#11112)

Signed-off-by: tu1h <lihai.tu@daocloud.io>
pull/11147/head
Lihai Tu 2024-04-30 18:46:30 +08:00 committed by GitHub
parent 3a112e834c
commit 245454855d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 2 deletions

View File

@ -82,11 +82,12 @@
Minimum version is {{ calico_min_version_required }} supported by the previous kubespray release. Minimum version is {{ calico_min_version_required }} supported by the previous kubespray release.
But current version is {{ calico_version_on_server.stdout }}. But current version is {{ calico_version_on_server.stdout }}.
- name: "Check that cluster_id is set if calico_rr enabled" - name: "Check that cluster_id is set and a valid IPv4 address if calico_rr enabled"
assert: assert:
that: that:
- cluster_id is defined - cluster_id is defined
msg: "A unique cluster_id is required if using calico_rr" - cluster_id is ansible.utils.ipv4
msg: "A unique cluster_id is required if using calico_rr, and it must be a valid IPv4 address"
when: when:
- peer_with_calico_rr - peer_with_calico_rr
- inventory_hostname == groups['kube_control_plane'][0] - inventory_hostname == groups['kube_control_plane'][0]