kubernetes-ingress
kubernetes-ingress copied to clipboard
Add lifecycle to controller container
Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] Add lifecycle configuration for the controller container. This allows preStop hooks to allow for draining of connections at the ingress.
Describe the solution you'd like A clear and concise description of what you want to happen. Add lifecycle configuration to the helm chart.
lifecycle:
preStop:
exec:
command: ["/bin/sh","-c","sleep 10 && /usr/sbin/nginx -s reload"]
Describe alternatives you've considered Related #267
Additional context
Hi @coolbry95 thanks for reporting!
Be sure to check out the docs while you wait for a human to take a look at this :slightly_smiling_face:
Cheers!
Hi @coolbry95
I think I was a little bit confused by the issue that was mentioned as related. I think you're talking about a graceful shutdown before the Ingress Controller gets terminated, right? That's different from #267 and should be already happening.
When the IC pod gets a SIGTERM
from k8s, we send a quit
to nginx, which is a request for graceful shutdown, so if you're seeing something different it could be a bug.
Do you have any logs that you can share or anything that shows that nginx is not behaving correctly?
It looks like we are not having issues.
For testing we used a command like bombardier -k --http2 -r 200 -d10m -c48 -m POST --latencies https://dev-srl-usw2.starlightglade.com/performance/0
. While the command is running cycle the nginx pods by adding an annotation to the deployment spec, do a rollout restart deploy, or delete the pods manually. There shouldn't be any errors or 500s.