From 70bbb3e280a88cbfaa44fd6ecbc56d54806a1d3d Mon Sep 17 00:00:00 2001
From: Hans Feldt <2808287+hafe@users.noreply.github.com>
Date: Fri, 13 Nov 2020 09:02:23 +0100
Subject: [PATCH] calico: avoid POD restart during initial deploy (#6886)

calico PODs are first started and then in a handler killed and
restarted for no reason, nothing has changed.

By using the existing variable 'calico_cni_config' (only defined when
calico has already started) the restart can be skipped.
---
 roles/network_plugin/calico/handlers/main.yml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/roles/network_plugin/calico/handlers/main.yml b/roles/network_plugin/calico/handlers/main.yml
index 75fe2296c..696729a24 100644
--- a/roles/network_plugin/calico/handlers/main.yml
+++ b/roles/network_plugin/calico/handlers/main.yml
@@ -1,6 +1,7 @@
 ---
 - name: reset_calico_cni
   command: /bin/true
+  when: calico_cni_config is defined
   notify:
     - delete 10-calico.conflist
     - docker | delete calico-node containers
-- 
GitLab