Skip to content

Commit

Permalink
fix panic in Viewer cleanup
Browse files Browse the repository at this point in the history
addresses issue kubeflow#2253. Passing `nil` as an argument to the varargs
`...DeleteOption` parameter of `client.Delete()` will panic since
client-go will iterate over the DeleteOption array and invoke each
(since DeleteOption is defined as
`type DeleteOptionFunc func(*DeleteOptions)`.
  • Loading branch information
mattnworb committed Jan 16, 2020
1 parent 4031395 commit b078982
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/src/crd/controller/viewer/reconciler/reconciler.go
Original file line number Diff line number Diff line change
Expand Up @@ -288,5 +288,5 @@ func (r *Reconciler) maybeDeleteOldestViewer(t viewerV1beta1.ViewerType, namespa
}
}

return r.Client.Delete(context.Background(), oldest, nil)
return r.Client.Delete(context.Background(), oldest)
}

0 comments on commit b078982

Please sign in to comment.