diff --git a/cmd/kubeadm/app/cmd/upgrade/node.go b/cmd/kubeadm/app/cmd/upgrade/node.go index ad7e8a83bfe..81e355f8276 100644 --- a/cmd/kubeadm/app/cmd/upgrade/node.go +++ b/cmd/kubeadm/app/cmd/upgrade/node.go @@ -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. diff --git a/cmd/kubeadm/app/phases/certs/renewal/manager.go b/cmd/kubeadm/app/phases/certs/renewal/manager.go index aace4933e0e..dabd3616036 100644 --- a/cmd/kubeadm/app/phases/certs/renewal/manager.go +++ b/cmd/kubeadm/app/phases/certs/renewal/manager.go @@ -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) } diff --git a/cmd/kubeadm/app/preflight/checks.go b/cmd/kubeadm/app/preflight/checks.go index 3fe62d2b208..1f6c2a605c8 100644 --- a/cmd/kubeadm/app/preflight/checks.go +++ b/cmd/kubeadm/app/preflight/checks.go @@ -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) diff --git a/cmd/kubeadm/app/util/system/types_unix.go b/cmd/kubeadm/app/util/system/types_unix.go index 6c255b2235b..b4902d37601 100644 --- a/cmd/kubeadm/app/util/system/types_unix.go +++ b/cmd/kubeadm/app/util/system/types_unix.go @@ -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", diff --git a/cmd/kubeadm/app/util/system/types_windows.go b/cmd/kubeadm/app/util/system/types_windows.go index 0d045699cf9..cd79cd192d9 100644 --- a/cmd/kubeadm/app/util/system/types_windows.go +++ b/cmd/kubeadm/app/util/system/types_windows.go @@ -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", diff --git a/hack/.staticcheck_failures b/hack/.staticcheck_failures index 47f910f45b3..2cdadbab3c8 100644 --- a/hack/.staticcheck_failures +++ b/hack/.staticcheck_failures @@ -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