kubernetes/ingress-nginx

Distinguish wait-shutdown command from standard k8s SIGTERM

开放

#6,287 创建于 2020年10月6日

 (32 条评论) (1 个反应) (1 位负责人)Go (7,888 个派生)batch import
good first issuehelp wantedkind/featureneeds-triagepriority/backlog

仓库指标

星标
 (15,199 个星标)
PR 合并指标
 (30 天内没有已合并 PR)

描述

As of v0.26.0, we can specify /wait-shutdown as a pre-stop hook in our deployment spec. As currently implemented, it sends SIGTERM to the nginx-ingress-controller process. https://github.com/kubernetes/ingress-nginx/blob/59a7f51cd4f0c41f214c520ca8b2a502946ed08e/cmd/waitshutdown/main.go#L29

Since SIGTERM is also what k8s sends when shutting down a pod, there is no way for us to really tell for sure from the logs whether the pre-stop hook was properly configured or not. For this reason, it would be better if wait-shutdown used a different signal.

/kind feature

贡献者指南