Change:
}, requestCount: 5, }, <ins> { name: "add taint to non-exist node", nodeHandler: &testutil.FakeNodeHandler{ Existing: []*v1.Node{ { ObjectMeta: metav1.ObjectMeta{ Name:            "node1", ResourceVersion: "1", }, Spec: v1.NodeSpec{ Taints: []v1.Taint{ {Key: "key1", Value: "value1", Effect: "NoSchedule"}, }, }, }, }, Clientset: fake.NewSimpleClientset(&v1.PodList{Items: []v1.Pod{*testutil.NewPod("pod0", "node0")}}), }, nodeName:    "node2", taintsToAdd: []*v1.Taint{{Key: "key2", Value: "value2", Effect: "NoExecute"}}, expectedErr: apierrors.NewNotFound(schema.GroupResource{Resource: "nodes"}, "node2"), }, </ins> } for _, test := range tests { err := AddOrUpdateTaintOnNode(context.TODO(), test.nodeHandler, test.nodeName, test.taintsToAdd...) <ins> if test.expectedErr != nil { assert.Equal(t, test.expectedErr, err, "AddOrUpdateTaintOnNode get unexpected error") continue } </ins> assert.NoError(t, err, "%s: AddOrUpdateTaintOnNode() error = %v", test.name, err) node, _ := test.nodeHandler.Get(context.TODO(), test.nodeName, metav1.GetOptions{})

Discussion:
pkg/controller in I transformed that testcase into a fuzz driver and tested it with ]() It crash with "invalid memory address or nil pointer dereference" when some argument related data are fuzzed. Always No response No response Simplified PoC code is here: and it crashed as: /sig
This issue is currently awaiting triage. If a SIG or subproject determines this is a relevant issue, they will accept it by applying the label and provide further guidance. The label can be by org members by writing in a comment. <detailsInstructions for interacting with me using PR comments are available . If you have questions or suggestions related to my behavior, please file an issue against the repository. </details
/kind cleanup /sig node /priority backlog This nil pointer is never reported by end users which means that before we call AddOrUpdateTaintOnNode, the node existence is checked. To make the code more stable, fixing it is valid. This would avoid future bugs if somewhere calls AddOrUpdateTaintOnNode without checking whether the node exists. I opened for this. /remove-kind failing-test (which means falling test ci )
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules: After 90d of inactivity, is applied After 30d of inactivity since was applied, is applied After 30d of inactivity since was applied, the issue is closed You can: Mark this issue or PR as fresh with Mark this issue or PR as rotten with Close this issue or PR with Offer to help out with [Issue Triage][1] Please send feedback to sig-contributor-experience at . /lifecycle stale [1]:
/remove-lifecycle stale
The Kubernetes project currently lacks enough contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules: After 90d of inactivity, is applied After 30d of inactivity since was applied, is applied After 30d of inactivity since was applied, the issue is closed You can: Mark this issue as fresh with Close this issue with Offer to help out with [Issue Triage][1] Please send feedback to sig-contributor-experience at . /lifecycle stale [1]:
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules: After 90d of inactivity, is applied After 30d of inactivity since was applied, is applied After 30d of inactivity since was applied, the issue is closed You can: Mark this issue as fresh with Close this issue with Offer to help out with [Issue Triage][1] Please send feedback to sig-contributor-experience at . /lifecycle rotten [1]: