From c4752a308d983343f521d321303f413e394bce9d Mon Sep 17 00:00:00 2001 From: emiran-orange Date: Mon, 20 Dec 2021 15:34:29 +0100 Subject: [PATCH 1/2] calico_pool_blocksize must be cast as string in assertion when defined --- roles/network_plugin/calico/tasks/check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/network_plugin/calico/tasks/check.yml b/roles/network_plugin/calico/tasks/check.yml index 8d72448b810..e7bbdad4175 100644 --- a/roles/network_plugin/calico/tasks/check.yml +++ b/roles/network_plugin/calico/tasks/check.yml @@ -53,7 +53,7 @@ - name: "Check if inventory match current cluster configuration" assert: that: - - calico_pool_conf.spec.blockSize|string == (calico_pool_blocksize | default(kube_network_node_prefix | string)) + - calico_pool_conf.spec.blockSize|string == (calico_pool_blocksize | default(kube_network_node_prefix) | string) - calico_pool_conf.spec.cidr == (calico_pool_cidr | default(kube_pods_subnet)) - not calico_pool_conf.spec.ipipMode is defined or calico_pool_conf.spec.ipipMode == calico_ipip_mode - not calico_pool_conf.spec.vxlanMode is defined or calico_pool_conf.spec.vxlanMode == calico_vxlan_mode From 0d8ff4b54219e995c35582cec7435ee17872221b Mon Sep 17 00:00:00 2001 From: emiran-orange Date: Wed, 22 Dec 2021 08:16:29 +0100 Subject: [PATCH 2/2] Cast as int rather than string --- roles/network_plugin/calico/tasks/check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/network_plugin/calico/tasks/check.yml b/roles/network_plugin/calico/tasks/check.yml index e7bbdad4175..4134944be43 100644 --- a/roles/network_plugin/calico/tasks/check.yml +++ b/roles/network_plugin/calico/tasks/check.yml @@ -53,7 +53,7 @@ - name: "Check if inventory match current cluster configuration" assert: that: - - calico_pool_conf.spec.blockSize|string == (calico_pool_blocksize | default(kube_network_node_prefix) | string) + - calico_pool_conf.spec.blockSize|int == (calico_pool_blocksize | default(kube_network_node_prefix) | int) - calico_pool_conf.spec.cidr == (calico_pool_cidr | default(kube_pods_subnet)) - not calico_pool_conf.spec.ipipMode is defined or calico_pool_conf.spec.ipipMode == calico_ipip_mode - not calico_pool_conf.spec.vxlanMode is defined or calico_pool_conf.spec.vxlanMode == calico_vxlan_mode