-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
fix(kaniko): delete kaniko pod on graceful shutdown #9270
fix(kaniko): delete kaniko pod on graceful shutdown #9270
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #9270 +/- ##
==========================================
- Coverage 70.48% 63.56% -6.92%
==========================================
Files 515 634 +119
Lines 23150 32711 +9561
==========================================
+ Hits 16317 20793 +4476
- Misses 5776 10316 +4540
- Partials 1057 1602 +545 ☔ View full report in Codecov by Sentry. |
@ericzzzzzzz hi! Check please the PR, it's very important because all my colleagues have this issue which leads to 100500 undelete kaniko pods. |
Thanks for the fix! There's something wrong with integration tests, but it doesn't seems related to the change, I'm still investigating, after the issue resolved, I'll merge this change. Sorry for the delay. |
defer func() { | ||
ctx, cancel := context.WithTimeout(context.Background(), 3*time.Second) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, can you add a comment to explains that if build interrupted the original context is cancelled and pod deletion will not be called, so we need a new ctx?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, yea, good idea. Pushed changes
Fixes: #8800
Description
Fixed kaniko pod delete in case of graceful shutdown
User facing changes
Before: skaffold doesn't delete kaniko pod if build is interrupted with ctrl-c after creating the pod
After: skaffold triggers deletion of kaniko pod if build is interrupted with ctrl-c after creating the pod