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

Fixes: #1131, Enable graceful sidecar kill #3013

Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix sidecar retrieval
  • Loading branch information
Shahnewaz Rifat committed Jul 24, 2020
commit cc993d63c31f747de907adeba3fe30f9fae70a83
5 changes: 3 additions & 2 deletions pkg/reconciler/taskrun/taskrun.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,9 @@ func (c *Reconciler) ReconcileKind(ctx context.Context, tr *v1beta1.TaskRun) pkg
c.timeoutHandler.Release(tr)
pod, err := c.KubeClientSet.CoreV1().Pods(tr.Namespace).Get(tr.Status.PodName, metav1.GetOptions{})
if err == nil {
fmt.Println("Stopping sidecars that are not marked for exemption.")
stoppableContainers := getStoppableContainers(pod, tr.Spec.TaskSpec.Sidecars)
fmt.Println("Stopping Sidecars that were not marked for exemption.")
sidecars := tr.Status.TaskSpec.Sidecars
stoppableContainers := getStoppableContainers(pod, sidecars)
err := podconvert.StopSidecars(c.Images.NopImage, c.KubeClientSet, *pod, &stoppableContainers)
if err == nil {
// Check if any SidecarStatuses are still shown as Running after stopping
Expand Down