Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add lifecycle to controller container #3006

Closed
coolbry95 opened this issue Sep 2, 2022 · 3 comments · Fixed by #3005
Closed

Add lifecycle to controller container #3006

coolbry95 opened this issue Sep 2, 2022 · 3 comments · Fixed by #3005
Labels
proposal An issue that proposes a feature request
Milestone

Comments

@coolbry95
Copy link
Contributor

coolbry95 commented Sep 2, 2022

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

@coolbry95 coolbry95 added the proposal An issue that proposes a feature request label Sep 2, 2022
@github-actions
Copy link

github-actions bot commented Sep 2, 2022

Hi @coolbry95 thanks for reporting!

Be sure to check out the docs while you wait for a human to take a look at this 🙂

Cheers!

@lucacome
Copy link
Member

lucacome commented Sep 8, 2022

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?

@coolbry95
Copy link
Contributor Author

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.

@lucacome lucacome added this to the v2.4.0 milestone Sep 19, 2022
@lucacome lucacome linked a pull request Sep 19, 2022 that will close this issue
6 tasks
@lucacome lucacome closed this as completed Oct 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
proposal An issue that proposes a feature request
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants