Merge pull request #81656 from SataQiu/fix-kubeadm-static-20190820

kubeadm: fix static check failures
This commit is contained in:
Kubernetes Prow Robot 2019-08-22 23:27:28 -07:00 committed by GitHub
commit 39d5fc7501
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 10 additions and 19 deletions

View File

@ -38,14 +38,12 @@ import (
// 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.
type nodeOptions struct {
kubeConfigPath string
kubeletVersion string
advertiseAddress string
nodeName string
etcdUpgrade bool
renewCerts bool
dryRun bool
kustomizeDir string
kubeConfigPath string
kubeletVersion string
etcdUpgrade bool
renewCerts bool
dryRun bool
kustomizeDir string
}
// compile-time assert that the local data object satisfies the phases data interface.

View File

@ -257,6 +257,9 @@ func (rm *Manager) CreateRenewCSR(name, outdir string) error {
// generates the CSR request and save it
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 {
return errors.Wrapf(err, "failure while saving %s key", name)
}

View File

@ -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)

View File

@ -23,9 +23,6 @@ import (
"strings"
)
// dockerEndpoint is the os specific endpoint for docker communication
const dockerEndpoint = "unix:///var/run/docker.sock"
// DefaultSysSpec is the default SysSpec for Linux
var DefaultSysSpec = SysSpec{
OS: "Linux",

View File

@ -23,9 +23,6 @@ import (
"strings"
)
// dockerEndpoint is the os specific endpoint for docker communication
const dockerEndpoint = "npipe:////./pipe/docker_engine"
// DefaultSysSpec is the default SysSpec for Windows
var DefaultSysSpec = SysSpec{
OS: "Microsoft Windows Server 2016",

View File

@ -5,10 +5,6 @@ cmd/controller-manager/app
cmd/kube-controller-manager/app
cmd/kube-proxy/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/preferredimports
hack/make-rules/helpers/go2make/testdata/dir-with-gofiles