From ad531c8dce97279914eac2b501fad84a5c98bdb4 Mon Sep 17 00:00:00 2001 From: Stanislav Zaprudskiy Date: Thu, 26 Jan 2023 17:09:42 +0100 Subject: [PATCH] Do not wait for a new Pod name after Deployment change Proper waiting is already performed earlier during Deplyment{apply: yes, wait: yes} - https://github.com/ansible-collections/kubernetes.core/blob/e6ac87409830b6c698b05dba875cca87d45ea761/plugins/module_utils/k8s/waiter.py#L27. And also not every Deployment change produces new RS/Pods. For example, changing Deployment labels won't cause new rollout, but will cause `until` loop to be invoked unnecessarily (when replicas=1). --- roles/installer/tasks/resources_configuration.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/roles/installer/tasks/resources_configuration.yml b/roles/installer/tasks/resources_configuration.yml index 64c73cf0..fd2db1cf 100644 --- a/roles/installer/tasks/resources_configuration.yml +++ b/roles/installer/tasks/resources_configuration.yml @@ -237,11 +237,6 @@ field_selectors: - status.phase=Running register: _new_pod - until: - - _new_pod['resources'] | length - - _new_pod['resources'][0]['metadata']['name'] != tower_pod_name - delay: 5 - retries: 60 - name: Update new resource pod name as a variable. set_fact: