mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-31 15:25:57 +00:00
Merge pull request #49019 from luxas/kubeadm_remove_old_comments
Automatic merge from submit-queue kubeadm: Remove some old comments **What this PR does / why we need it**: Removes old and outdated comments. **Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes # **Special notes for your reviewer**: **Release note**: ```release-note NONE ``` @dmmcquay
This commit is contained in:
commit
023fed7176
@ -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.ResetFlags()
|
||||||
cmds.SetGlobalNormalizationFunc(flag.WarnWordSepNormalizeFunc)
|
cmds.SetGlobalNormalizationFunc(flag.WarnWordSepNormalizeFunc)
|
||||||
|
@ -46,8 +46,6 @@ const (
|
|||||||
nodeAutoApproveBootstrap = "kubeadm:node-autoapprove-bootstrap"
|
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.
|
// CreateServiceAccounts creates the necessary serviceaccounts that kubeadm uses/might use, if they don't already exist.
|
||||||
func CreateServiceAccounts(clientset clientset.Interface) error {
|
func CreateServiceAccounts(clientset clientset.Interface) error {
|
||||||
serviceAccounts := []v1.ServiceAccount{
|
serviceAccounts := []v1.ServiceAccount{
|
||||||
|
@ -27,9 +27,6 @@ import (
|
|||||||
certutil "k8s.io/client-go/util/cert"
|
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) {
|
func NewCertificateAuthority() (*x509.Certificate, *rsa.PrivateKey, error) {
|
||||||
key, err := certutil.NewPrivateKey()
|
key, err := certutil.NewPrivateKey()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -144,7 +144,6 @@ type PortOpenCheck struct {
|
|||||||
|
|
||||||
func (poc PortOpenCheck) Check() (warnings, errors []error) {
|
func (poc PortOpenCheck) Check() (warnings, errors []error) {
|
||||||
errors = []error{}
|
errors = []error{}
|
||||||
// TODO: Get IP from KubeadmConfig
|
|
||||||
ln, err := net.Listen("tcp", fmt.Sprintf(":%d", poc.port))
|
ln, err := net.Listen("tcp", fmt.Sprintf(":%d", poc.port))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
errors = append(errors, fmt.Errorf("Port %d is in use", poc.port))
|
errors = append(errors, fmt.Errorf("Port %d is in use", poc.port))
|
||||||
|
Loading…
Reference in New Issue
Block a user