diff --git a/go.mod b/go.mod index f108ed0595ef..c5b63252abb2 100644 --- a/go.mod +++ b/go.mod @@ -117,4 +117,4 @@ require ( sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect ) -replace sigs.k8s.io/karpenter v0.36.0 => github.com/smartnews/karpenter v0.36.0-sn-2 +replace sigs.k8s.io/karpenter v0.37.0 => github.com/smartnews/karpenter v0.37.0-sn-1 diff --git a/go.sum b/go.sum index a48b91325d88..425a561a8905 100644 --- a/go.sum +++ b/go.sum @@ -337,8 +337,8 @@ github.com/samber/lo v1.39.0/go.mod h1:+m/ZKRl6ClXCE2Lgf3MsQlWfh4bn1bz6CXEOxnEXn github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= -github.com/smartnews/karpenter v0.36.0-sn-2 h1:OxCO1zuLbG3M18RdeQ7JWO9Lt3hxKDTCN853/qQYiLQ= -github.com/smartnews/karpenter v0.36.0-sn-2/go.mod h1:fieFojxOec/l0tDmFT7R+g/Y+SGQbL9VlcYO8xb3sLo= +github.com/smartnews/karpenter v0.37.0-sn-1 h1:thaABSIfSnrPhqaYHAMfNIcvIc6ihtyYwuVrQ1Q6DVk= +github.com/smartnews/karpenter v0.37.0-sn-1/go.mod h1:5XYrIz9Bi7HgQyaUsx7O08ft+TJjrH+htlnPq8Sz9J8= github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0= github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= @@ -763,8 +763,6 @@ sigs.k8s.io/controller-runtime v0.18.2 h1:RqVW6Kpeaji67CY5nPEfRz6ZfFMk0lWQlNrLql sigs.k8s.io/controller-runtime v0.18.2/go.mod h1:tuAt1+wbVsXIT8lPtk5RURxqAnq7xkpv2Mhttslg7Hw= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd h1:EDPBXCAspyGV4jQlpZSudPeMmr1bNJefnuqLsRAsHZo= sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd/go.mod h1:B8JuhiUyNFVKdsE8h686QcCxMaH6HrOAZj4vswFpcB0= -sigs.k8s.io/karpenter v0.37.0 h1:eUFD9hJ2mpZrw31OUYhpbxLWEDmbXT05wX27dZB2E5o= -sigs.k8s.io/karpenter v0.37.0/go.mod h1:5XYrIz9Bi7HgQyaUsx7O08ft+TJjrH+htlnPq8Sz9J8= sigs.k8s.io/structured-merge-diff/v4 v4.4.1 h1:150L+0vs/8DA78h1u02ooW1/fFq/Lwr+sGiqlzvrtq4= sigs.k8s.io/structured-merge-diff/v4 v4.4.1/go.mod h1:N8hJocpFajUSSeSJ9bOZ77VzejKZaXsTtZo4/u7Io08= sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= diff --git a/pkg/controllers/interruption/controller.go b/pkg/controllers/interruption/controller.go index a4448d8b4c40..ea649add9904 100644 --- a/pkg/controllers/interruption/controller.go +++ b/pkg/controllers/interruption/controller.go @@ -205,9 +205,9 @@ func (c *Controller) handleNodeClaim(ctx context.Context, msg messages.Message, spotTotal.WithLabelValues(instanceType, zone, nodeClaim.Status.NodeName, nodeClaim.Labels["karpenter.sh/nodepool"]).Inc() // try to create a new nodeclaim immediately but ignore error if it fails if err := c.createNodeClaim(ctx, nodeClaim); err != nil { - logging.FromContext(ctx).Errorf("[interruption handling]failed to create a new nodeclaim, %v", err) + log.FromContext(ctx).Error(err, "[interruption handling]failed to create a new nodeclaim") } else { - logging.FromContext(ctx).Infof("Created new nodeclaim due to spot interruption") + log.FromContext(ctx).Info("Created new nodeclaim due to spot interruption") // wait for the node provisioning before draining time.Sleep(60 * time.Second) }