From 61ccd501c8119e2908eccceebecbd3b060caa1a9 Mon Sep 17 00:00:00 2001 From: Albin Vass Date: Fri, 9 Jul 2021 16:14:30 +0200 Subject: [PATCH] Gracefully shutdown executor on SIGTERM Depends-On: https://review.opendev.org/c/zuul/zuul/+/799701 Change-Id: Id8d9208ee5d5c2c76b181657af0f7a4497c159ec --- zuul_operator/templates/zuul.yaml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/zuul_operator/templates/zuul.yaml b/zuul_operator/templates/zuul.yaml index b93c0a2..8cb13c5 100644 --- a/zuul_operator/templates/zuul.yaml +++ b/zuul_operator/templates/zuul.yaml @@ -332,6 +332,9 @@ spec: ports: - name: logs containerPort: 7900 + env: + - name: ZUUL_EXECUTOR_SIGTERM_GRACEFUL + value: "1" volumeMounts: - name: zuul-config mountPath: /etc/zuul @@ -359,12 +362,6 @@ spec: securityContext: privileged: true terminationGracePeriodSeconds: {{ spec.executor.terminationGracePeriodSeconds }} - lifecycle: - preStop: - exec: - command: [ - "/usr/local/bin/zuul-executor", "graceful" - ] volumes: - name: zuul-var emptyDir: {}