mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 11:21:47 +00:00
Merge pull request #103801 from gkarthiks/master
Remove purell package usage from kubeadm
This commit is contained in:
commit
8df554bafd
@ -51,7 +51,6 @@ import (
|
|||||||
utilsexec "k8s.io/utils/exec"
|
utilsexec "k8s.io/utils/exec"
|
||||||
utilsnet "k8s.io/utils/net"
|
utilsnet "k8s.io/utils/net"
|
||||||
|
|
||||||
"github.com/PuerkitoBio/purell"
|
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -714,7 +713,7 @@ func (evc ExternalEtcdVersionCheck) Check() (warnings, errorList []error) {
|
|||||||
resp := etcdVersionResponse{}
|
resp := etcdVersionResponse{}
|
||||||
var err error
|
var err error
|
||||||
versionURL := fmt.Sprintf("%s/%s", endpoint, "version")
|
versionURL := fmt.Sprintf("%s/%s", endpoint, "version")
|
||||||
if tmpVersionURL, err := purell.NormalizeURLString(versionURL, purell.FlagRemoveDuplicateSlashes); err != nil {
|
if tmpVersionURL, err := normalizeURLString(versionURL); err != nil {
|
||||||
errorList = append(errorList, errors.Wrapf(err, "failed to normalize external etcd version url %s", versionURL))
|
errorList = append(errorList, errors.Wrapf(err, "failed to normalize external etcd version url %s", versionURL))
|
||||||
continue
|
continue
|
||||||
} else {
|
} else {
|
||||||
@ -1119,3 +1118,16 @@ func setHasItemOrAll(s sets.String, item string) bool {
|
|||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// normalizeURLString returns the normalized string, or an error if it can't be parsed into an URL object.
|
||||||
|
// It takes an URL string as input.
|
||||||
|
func normalizeURLString(s string) (string, error) {
|
||||||
|
u, err := url.Parse(s)
|
||||||
|
if err != nil {
|
||||||
|
return "", err
|
||||||
|
}
|
||||||
|
if len(u.Path) > 0 {
|
||||||
|
u.Path = strings.ReplaceAll(u.Path, "//", "/")
|
||||||
|
}
|
||||||
|
return u.String(), nil
|
||||||
|
}
|
||||||
|
1
go.mod
1
go.mod
@ -18,7 +18,6 @@ require (
|
|||||||
github.com/JeffAshton/win_pdh v0.0.0-20161109143554-76bb4ee9f0ab
|
github.com/JeffAshton/win_pdh v0.0.0-20161109143554-76bb4ee9f0ab
|
||||||
github.com/Microsoft/go-winio v0.4.15
|
github.com/Microsoft/go-winio v0.4.15
|
||||||
github.com/Microsoft/hcsshim v0.8.10-0.20200715222032-5eafd1556990
|
github.com/Microsoft/hcsshim v0.8.10-0.20200715222032-5eafd1556990
|
||||||
github.com/PuerkitoBio/purell v1.1.1
|
|
||||||
github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e
|
github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e
|
||||||
github.com/auth0/go-jwt-middleware v1.0.1 // indirect
|
github.com/auth0/go-jwt-middleware v1.0.1 // indirect
|
||||||
github.com/aws/aws-sdk-go v1.38.49
|
github.com/aws/aws-sdk-go v1.38.49
|
||||||
|
1
vendor/modules.txt
vendored
1
vendor/modules.txt
vendored
@ -81,7 +81,6 @@ github.com/Microsoft/hcsshim/osversion
|
|||||||
# github.com/NYTimes/gziphandler v1.1.1 => github.com/NYTimes/gziphandler v1.1.1
|
# github.com/NYTimes/gziphandler v1.1.1 => github.com/NYTimes/gziphandler v1.1.1
|
||||||
github.com/NYTimes/gziphandler
|
github.com/NYTimes/gziphandler
|
||||||
# github.com/PuerkitoBio/purell v1.1.1 => github.com/PuerkitoBio/purell v1.1.1
|
# github.com/PuerkitoBio/purell v1.1.1 => github.com/PuerkitoBio/purell v1.1.1
|
||||||
## explicit
|
|
||||||
github.com/PuerkitoBio/purell
|
github.com/PuerkitoBio/purell
|
||||||
# github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 => github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578
|
# github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 => github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578
|
||||||
github.com/PuerkitoBio/urlesc
|
github.com/PuerkitoBio/urlesc
|
||||||
|
Loading…
Reference in New Issue
Block a user