mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 23:15:14 +00:00
Update github.com/pkg/errors to go native errors pkg
Signed-off-by: Sahil Raja <sahil.raja@mayadata.io>
This commit is contained in:
parent
99c35dc37c
commit
8eee78a61f
@ -19,7 +19,6 @@ package codec
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
"k8s.io/klog/v2"
|
||||
|
||||
// ensure the core apis are installed
|
||||
@ -95,7 +94,7 @@ func DecodeKubeletConfiguration(kubeletCodecs *serializer.CodecFactory, data []b
|
||||
// decoder, which has only v1beta1 registered, and log a warning.
|
||||
// The lenient path is to be dropped when support for v1beta1 is dropped.
|
||||
if !runtime.IsStrictDecodingError(err) {
|
||||
return nil, errors.Wrap(err, "failed to decode")
|
||||
return nil, fmt.Errorf("failed to decode: %w", err)
|
||||
}
|
||||
|
||||
var lenientErr error
|
||||
|
@ -22,13 +22,13 @@ package operationexecutor
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"net"
|
||||
"time"
|
||||
|
||||
"k8s.io/klog/v2"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
"google.golang.org/grpc"
|
||||
"k8s.io/client-go/tools/record"
|
||||
registerapi "k8s.io/kubelet/pkg/apis/pluginregistration/v1"
|
||||
@ -163,7 +163,7 @@ func (og *operationGenerator) notifyPlugin(client registerapi.RegistrationClient
|
||||
}
|
||||
|
||||
if _, err := client.NotifyRegistrationStatus(ctx, status); err != nil {
|
||||
return errors.Wrap(err, errStr)
|
||||
return fmt.Errorf("%s: %w", errStr, err)
|
||||
}
|
||||
|
||||
if errStr != "" {
|
||||
|
@ -23,7 +23,6 @@ import (
|
||||
restful "github.com/emicklei/go-restful"
|
||||
cadvisorapi "github.com/google/cadvisor/info/v1"
|
||||
cadvisorv2 "github.com/google/cadvisor/info/v2"
|
||||
"github.com/pkg/errors"
|
||||
"k8s.io/klog/v2"
|
||||
|
||||
"k8s.io/api/core/v1"
|
||||
@ -143,7 +142,7 @@ func (h *handler) handleSummary(request *restful.Request, response *restful.Resp
|
||||
onlyCPUAndMemory := false
|
||||
err := request.Request.ParseForm()
|
||||
if err != nil {
|
||||
handleError(response, "/stats/summary", errors.Wrapf(err, "parse form failed"))
|
||||
handleError(response, "/stats/summary", fmt.Errorf("parse form failed: %w", err))
|
||||
return
|
||||
}
|
||||
if onlyCluAndMemoryParam, found := request.Request.Form["only_cpu_and_memory"]; found &&
|
||||
|
Loading…
Reference in New Issue
Block a user