mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 01:06:27 +00:00
Merge pull request #81656 from SataQiu/fix-kubeadm-static-20190820
kubeadm: fix static check failures
This commit is contained in:
commit
39d5fc7501
@ -38,14 +38,12 @@ import (
|
|||||||
// Please note that this structure includes the public kubeadm config API, but only a subset of the options
|
// Please note that this structure includes the public kubeadm config API, but only a subset of the options
|
||||||
// supported by this api will be exposed as a flag.
|
// supported by this api will be exposed as a flag.
|
||||||
type nodeOptions struct {
|
type nodeOptions struct {
|
||||||
kubeConfigPath string
|
kubeConfigPath string
|
||||||
kubeletVersion string
|
kubeletVersion string
|
||||||
advertiseAddress string
|
etcdUpgrade bool
|
||||||
nodeName string
|
renewCerts bool
|
||||||
etcdUpgrade bool
|
dryRun bool
|
||||||
renewCerts bool
|
kustomizeDir string
|
||||||
dryRun bool
|
|
||||||
kustomizeDir string
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// compile-time assert that the local data object satisfies the phases data interface.
|
// compile-time assert that the local data object satisfies the phases data interface.
|
||||||
|
@ -257,6 +257,9 @@ func (rm *Manager) CreateRenewCSR(name, outdir string) error {
|
|||||||
|
|
||||||
// generates the CSR request and save it
|
// generates the CSR request and save it
|
||||||
csr, key, err := pkiutil.NewCSRAndKey(cfg)
|
csr, key, err := pkiutil.NewCSRAndKey(cfg)
|
||||||
|
if err != nil {
|
||||||
|
return errors.Wrapf(err, "failure while generating %s CSR and key", name)
|
||||||
|
}
|
||||||
if err := pkiutil.WriteKey(outdir, name, key); err != nil {
|
if err := pkiutil.WriteKey(outdir, name, key); err != nil {
|
||||||
return errors.Wrapf(err, "failure while saving %s key", name)
|
return errors.Wrapf(err, "failure while saving %s key", name)
|
||||||
}
|
}
|
||||||
|
@ -213,7 +213,7 @@ func (poc PortOpenCheck) Check() (warnings, errorList []error) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil, errorList
|
return warnings, errorList
|
||||||
}
|
}
|
||||||
|
|
||||||
// IsPrivilegedUserCheck verifies user is privileged (linux - root, windows - Administrator)
|
// IsPrivilegedUserCheck verifies user is privileged (linux - root, windows - Administrator)
|
||||||
|
@ -23,9 +23,6 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
// dockerEndpoint is the os specific endpoint for docker communication
|
|
||||||
const dockerEndpoint = "unix:///var/run/docker.sock"
|
|
||||||
|
|
||||||
// DefaultSysSpec is the default SysSpec for Linux
|
// DefaultSysSpec is the default SysSpec for Linux
|
||||||
var DefaultSysSpec = SysSpec{
|
var DefaultSysSpec = SysSpec{
|
||||||
OS: "Linux",
|
OS: "Linux",
|
||||||
|
@ -23,9 +23,6 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
// dockerEndpoint is the os specific endpoint for docker communication
|
|
||||||
const dockerEndpoint = "npipe:////./pipe/docker_engine"
|
|
||||||
|
|
||||||
// DefaultSysSpec is the default SysSpec for Windows
|
// DefaultSysSpec is the default SysSpec for Windows
|
||||||
var DefaultSysSpec = SysSpec{
|
var DefaultSysSpec = SysSpec{
|
||||||
OS: "Microsoft Windows Server 2016",
|
OS: "Microsoft Windows Server 2016",
|
||||||
|
@ -5,10 +5,6 @@ cmd/controller-manager/app
|
|||||||
cmd/kube-controller-manager/app
|
cmd/kube-controller-manager/app
|
||||||
cmd/kube-proxy/app
|
cmd/kube-proxy/app
|
||||||
cmd/kube-scheduler/app
|
cmd/kube-scheduler/app
|
||||||
cmd/kubeadm/app/cmd/upgrade
|
|
||||||
cmd/kubeadm/app/phases/certs/renewal
|
|
||||||
cmd/kubeadm/app/preflight
|
|
||||||
cmd/kubeadm/app/util/system
|
|
||||||
cmd/linkcheck
|
cmd/linkcheck
|
||||||
cmd/preferredimports
|
cmd/preferredimports
|
||||||
hack/make-rules/helpers/go2make/testdata/dir-with-gofiles
|
hack/make-rules/helpers/go2make/testdata/dir-with-gofiles
|
||||||
|
Loading…
Reference in New Issue
Block a user