Skip to content

Commit

Permalink
Update according to comments.
Browse files Browse the repository at this point in the history
Signed-off-by: arkbriar <arkbriar@gmail.com>
  • Loading branch information
arkbriar committed Jun 2, 2023
1 parent 601faf2 commit 0cf3b4c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/client/fake/client.go
Expand Up @@ -1302,7 +1302,7 @@ func allowsGracefulDelete(gvk schema.GroupVersionKind, obj runtime.Object) bool
// If the object is a Pod, it can have the deletionTimestamp set without any finalizers.
// This is a special case allowed with graceful deletion. For more details, please see:
// https://github.com/kubernetes/kubernetes/blob/7935006af2925dc081605c17fcb5e656cedee286/pkg/registry/core/pod/strategy.go#L163-L194
if gvk.Group == corev1.GroupName && gvk.Kind == "Pod" && gvk.Version == "v1" {
if gvk == corev1.SchemeGroupVersion.WithKind("Pod") {
pod := obj.(*corev1.Pod)
// If the pod is not scheduled, it will be deleted immediately.
if len(pod.Spec.NodeName) == 0 {
Expand Down

0 comments on commit 0cf3b4c

Please sign in to comment.