From b1655479d25594d5b362918dc6a8d3d2a41a4cfb Mon Sep 17 00:00:00 2001 From: rakesh561 Date: Fri, 9 Jun 2023 16:33:31 -0400 Subject: [PATCH] Updated task.yaml.j2 rsyslog container to have preStop hook (#1422) Co-authored-by: Stanislav Zaprudskiy --- roles/installer/templates/deployments/task.yaml.j2 | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/roles/installer/templates/deployments/task.yaml.j2 b/roles/installer/templates/deployments/task.yaml.j2 index 78a36896..dfdf9d2c 100644 --- a/roles/installer/templates/deployments/task.yaml.j2 +++ b/roles/installer/templates/deployments/task.yaml.j2 @@ -381,6 +381,18 @@ spec: {% if development_mode | bool %} - name: awx-devel mountPath: "/awx_devel" +{% endif %} +{% if termination_grace_period_seconds is defined %} + - name: pre-stop-data + mountPath: /var/lib/pre-stop + - name: pre-stop-scripts + mountPath: /var/lib/pre-stop/scripts + lifecycle: + preStop: + exec: + command: + - bash + - /var/lib/pre-stop/scripts/termination-waiter {% endif %} env: - name: SUPERVISOR_CONFIG_PATH