Merge pull request #1347 from evrardjp/bump-golangci-lint

Bump golangci lint
This commit is contained in:
Jean-Philippe Evrard
2026-06-08 15:55:51 +02:00
committed by GitHub
2 changed files with 6 additions and 5 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
[tools]
cosign = "2.2.3"
go = "1.25.11"
golangci-lint = "2.7.2"
golangci-lint = "2.12.2"
goreleaser = "1.24.0"
kind = "0.31.0"
kubectl = "1.35.0"
+5 -4
View File
@@ -15,6 +15,8 @@ import (
"k8s.io/client-go/kubernetes"
)
const addOrRemoveJSONOp = "add"
// Taint allows to set soft and hard limitations for scheduling and executing pods on nodes.
type Taint struct {
client *kubernetes.Clientset
@@ -107,7 +109,6 @@ func preferNoSchedule(client *kubernetes.Clientset, nodeID, taintName string, ef
}
var patches []patchTaints
if len(updatedNode.Spec.Taints) == 0 {
// add first taint and ensure to keep current taints
patches = []patchTaints{
@@ -117,12 +118,12 @@ func preferNoSchedule(client *kubernetes.Clientset, nodeID, taintName string, ef
Value: updatedNode.Spec,
},
{
Op: "add",
Op: addOrRemoveJSONOp,
Path: "/spec/taints",
Value: []v1.Taint{},
},
{
Op: "add",
Op: addOrRemoveJSONOp,
Path: "/spec/taints/-",
Value: taint,
},
@@ -144,7 +145,7 @@ func preferNoSchedule(client *kubernetes.Clientset, nodeID, taintName string, ef
// add missing taint to exsting list
patches = []patchTaints{
{
Op: "add",
Op: addOrRemoveJSONOp,
Path: "/spec/taints/-",
Value: taint,
},