mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 17:30:00 +00:00
Merge pull request #103111 from muma378/master
uses native errors instead of github.com/pkg/errors
This commit is contained in:
commit
36a4904af2
@ -22,7 +22,6 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/davecgh/go-spew/spew"
|
"github.com/davecgh/go-spew/spew"
|
||||||
"github.com/pkg/errors"
|
|
||||||
|
|
||||||
apps "k8s.io/api/apps/v1"
|
apps "k8s.io/api/apps/v1"
|
||||||
"k8s.io/api/core/v1"
|
"k8s.io/api/core/v1"
|
||||||
@ -201,7 +200,7 @@ func WaitForDeploymentRevisionAndImage(c clientset.Interface, ns, deploymentName
|
|||||||
}
|
}
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if deployment == nil {
|
if deployment == nil {
|
||||||
return errors.Wrapf(err, "error creating new replica set for deployment %q ", deploymentName)
|
return fmt.Errorf("error creating new replica set for deployment %q: %w", deploymentName, err)
|
||||||
}
|
}
|
||||||
deploymentImage := ""
|
deploymentImage := ""
|
||||||
if len(deployment.Spec.Template.Spec.Containers) > 0 {
|
if len(deployment.Spec.Template.Spec.Containers) > 0 {
|
||||||
|
@ -23,12 +23,11 @@ import (
|
|||||||
"crypto/x509"
|
"crypto/x509"
|
||||||
"crypto/x509/pkix"
|
"crypto/x509/pkix"
|
||||||
"encoding/pem"
|
"encoding/pem"
|
||||||
|
"fmt"
|
||||||
"math"
|
"math"
|
||||||
"math/big"
|
"math/big"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/pkg/errors"
|
|
||||||
|
|
||||||
certutil "k8s.io/client-go/util/cert"
|
certutil "k8s.io/client-go/util/cert"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -59,10 +58,10 @@ func NewSignedCert(cfg *certutil.Config, key crypto.Signer, caCert *x509.Certifi
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
if len(cfg.CommonName) == 0 {
|
if len(cfg.CommonName) == 0 {
|
||||||
return nil, errors.New("must specify a CommonName")
|
return nil, fmt.Errorf("must specify a CommonName")
|
||||||
}
|
}
|
||||||
if len(cfg.Usages) == 0 {
|
if len(cfg.Usages) == 0 {
|
||||||
return nil, errors.New("must specify at least one ExtKeyUsage")
|
return nil, fmt.Errorf("must specify at least one ExtKeyUsage")
|
||||||
}
|
}
|
||||||
|
|
||||||
certTmpl := x509.Certificate{
|
certTmpl := x509.Certificate{
|
||||||
|
Loading…
Reference in New Issue
Block a user