Skip to content

Commit

Permalink
Merge pull request #5 from deckhouse/drain-kruise-daemonsets
Browse files Browse the repository at this point in the history
[drain] an additional check for the daemonset kind when draining
  • Loading branch information
miklezzzz authored Apr 18, 2024
2 parents 961db5c + 7a36d34 commit 25c0502
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/controller/drain.go
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ func (o *DrainOptions) daemonsetFilter(pod api.Pod) (bool, *warning, *fatal) {
// management resource - including DaemonSet - is not found).
// Such pods will be deleted if --force is used.
controllerRef := o.getPodController(pod)
if controllerRef == nil || controllerRef.Kind != "DaemonSet" {
if controllerRef == nil || controllerRef.Kind != "DaemonSet" || (controllerRef.Kind == "DaemonSet" && controllerRef.APIVersion == "apps.kruise.io/v1alpha1") {
return true, nil, nil
}
if !o.IgnoreDaemonsets {
Expand Down

0 comments on commit 25c0502

Please sign in to comment.