From 0cbabdd9f7e8553e4d5f88a56512536c9b53e5a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucas=20K=C3=A4ldstr=C3=B6m?= Date: Fri, 30 Jun 2017 17:22:08 +0300 Subject: [PATCH] kubeadm: Remove some old comments --- cmd/kubeadm/app/cmd/cmd.go | 11 ----------- cmd/kubeadm/app/phases/apiconfig/clusterroles.go | 2 -- cmd/kubeadm/app/phases/certs/pkiutil/pki_helpers.go | 3 --- cmd/kubeadm/app/preflight/checks.go | 1 - 4 files changed, 17 deletions(-) diff --git a/cmd/kubeadm/app/cmd/cmd.go b/cmd/kubeadm/app/cmd/cmd.go index 1c33ce30508..8b4a247a9c8 100644 --- a/cmd/kubeadm/app/cmd/cmd.go +++ b/cmd/kubeadm/app/cmd/cmd.go @@ -63,17 +63,6 @@ func NewKubeadmCommand(f cmdutil.Factory, in io.Reader, out, err io.Writer) *cob `), } - // TODO(phase2+) figure out how to avoid running as root - // - // TODO(phase2) detect interactive vs non-interactive use and adjust output accordingly - // i.e. make it automation friendly - // - // TODO(phase2) create an abstraction that defines files and the content that needs to - // be written to disc and write it all in one go at the end as we have a lot of - // crappy little files written from different parts of this code; this could also - // be useful for testing by having this model we can allow users to create some files before - // `kubeadm init` runs, e.g. PKI assets, we would then be able to look at files users has - // given an diff or validate if those are sane, we could also warn if any of the files had been deprecated cmds.ResetFlags() cmds.SetGlobalNormalizationFunc(flag.WarnWordSepNormalizeFunc) diff --git a/cmd/kubeadm/app/phases/apiconfig/clusterroles.go b/cmd/kubeadm/app/phases/apiconfig/clusterroles.go index 91a7b28b392..44a711d23b4 100644 --- a/cmd/kubeadm/app/phases/apiconfig/clusterroles.go +++ b/cmd/kubeadm/app/phases/apiconfig/clusterroles.go @@ -46,8 +46,6 @@ const ( nodeAutoApproveBootstrap = "kubeadm:node-autoapprove-bootstrap" ) -// TODO: Are there any unit tests that could be made for this file other than duplicating all values and logic in a separate file? - // CreateServiceAccounts creates the necessary serviceaccounts that kubeadm uses/might use, if they don't already exist. func CreateServiceAccounts(clientset clientset.Interface) error { serviceAccounts := []v1.ServiceAccount{ diff --git a/cmd/kubeadm/app/phases/certs/pkiutil/pki_helpers.go b/cmd/kubeadm/app/phases/certs/pkiutil/pki_helpers.go index d9587bf6924..4c4b0faa686 100644 --- a/cmd/kubeadm/app/phases/certs/pkiutil/pki_helpers.go +++ b/cmd/kubeadm/app/phases/certs/pkiutil/pki_helpers.go @@ -27,9 +27,6 @@ import ( certutil "k8s.io/client-go/util/cert" ) -// TODO: It should be able to generate different types of private keys, at least: RSA and ECDSA (and in the future maybe Ed25519 as well) -// TODO: See if it makes sense to move this package directly to pkg/util/cert - func NewCertificateAuthority() (*x509.Certificate, *rsa.PrivateKey, error) { key, err := certutil.NewPrivateKey() if err != nil { diff --git a/cmd/kubeadm/app/preflight/checks.go b/cmd/kubeadm/app/preflight/checks.go index d55050ffd14..d378685e2fb 100644 --- a/cmd/kubeadm/app/preflight/checks.go +++ b/cmd/kubeadm/app/preflight/checks.go @@ -141,7 +141,6 @@ type PortOpenCheck struct { func (poc PortOpenCheck) Check() (warnings, errors []error) { errors = []error{} - // TODO: Get IP from KubeadmConfig ln, err := net.Listen("tcp", fmt.Sprintf(":%d", poc.port)) if err != nil { errors = append(errors, fmt.Errorf("Port %d is in use", poc.port))