Merge pull request #56294 from xiangpengzhao/kubeadm-minor-cleanup

Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Minor cleanup in kubeadm.

```release-note
NONE
```
This commit is contained in:
Kubernetes Submit Queue 2017-12-18 03:10:27 -08:00 committed by GitHub
commit 035ff73f7b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 2 additions and 19 deletions

View File

@ -44,7 +44,6 @@ filegroup(
"//cmd/kubeadm/app/phases/kubelet:all-srcs", "//cmd/kubeadm/app/phases/kubelet:all-srcs",
"//cmd/kubeadm/app/phases/markmaster:all-srcs", "//cmd/kubeadm/app/phases/markmaster:all-srcs",
"//cmd/kubeadm/app/phases/selfhosting:all-srcs", "//cmd/kubeadm/app/phases/selfhosting:all-srcs",
"//cmd/kubeadm/app/phases/token:all-srcs",
"//cmd/kubeadm/app/phases/upgrade:all-srcs", "//cmd/kubeadm/app/phases/upgrade:all-srcs",
"//cmd/kubeadm/app/phases/uploadconfig:all-srcs", "//cmd/kubeadm/app/phases/uploadconfig:all-srcs",
"//cmd/kubeadm/app/preflight:all-srcs", "//cmd/kubeadm/app/preflight:all-srcs",

View File

@ -116,7 +116,6 @@ func Funcs(codecs runtimeserializer.CodecFactory) []interface{} {
func(obj *kubeadm.NodeConfiguration, c fuzz.Continue) { func(obj *kubeadm.NodeConfiguration, c fuzz.Continue) {
c.FuzzNoCustom(obj) c.FuzzNoCustom(obj)
obj.CACertPath = "foo" obj.CACertPath = "foo"
obj.CACertPath = "foo"
obj.DiscoveryFile = "foo" obj.DiscoveryFile = "foo"
obj.DiscoveryToken = "foo" obj.DiscoveryToken = "foo"
obj.DiscoveryTokenAPIServers = []string{"foo"} obj.DiscoveryTokenAPIServers = []string{"foo"}

View File

@ -390,8 +390,7 @@ func getClientset(file string, dryRun bool) (clientset.Interface, error) {
} }
return apiclient.NewDryRunClient(dryRunGetter, os.Stdout), nil return apiclient.NewDryRunClient(dryRunGetter, os.Stdout), nil
} }
client, err := kubeconfigutil.ClientSetFromFile(file) return kubeconfigutil.ClientSetFromFile(file)
return client, err
} }
func getJoinCommand(token string, kubeConfigFile string) (string, error) { func getJoinCommand(token string, kubeConfigFile string) (string, error) {

View File

@ -1,14 +0,0 @@
package(default_visibility = ["//visibility:public"])
filegroup(
name = "package-srcs",
srcs = glob(["**"]),
tags = ["automanaged"],
visibility = ["//visibility:private"],
)
filegroup(
name = "all-srcs",
srcs = [":package-srcs"],
tags = ["automanaged"],
)

View File

@ -62,7 +62,7 @@ func PerformPostUpgradeTasks(client clientset.Interface, cfg *kubeadmapi.MasterC
errs = append(errs, err) errs = append(errs, err)
} }
// Create/update RBAC rules that makes the 1.8.0+ nodes to rotate certificates and get their CSRs approved automatically // Create/update RBAC rules that makes the nodes to rotate certificates and get their CSRs approved automatically
if err := nodebootstraptoken.AutoApproveNodeCertificateRotation(client); err != nil { if err := nodebootstraptoken.AutoApproveNodeCertificateRotation(client); err != nil {
errs = append(errs, err) errs = append(errs, err)
} }