Skip to content

Commit f837846

Browse files
authored
Merge pull request kubernetes#76847 from fabriziopandini/kubeadm-cleanup-unused-func
kubeadm: cleanup unused func
2 parents 9d61777 + d94c5ba commit f837846

File tree

2 files changed

+0
-25
lines changed

2 files changed

+0
-25
lines changed

cmd/kubeadm/app/phases/kubeconfig/kubeconfig.go

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -59,21 +59,6 @@ type kubeConfigSpec struct {
5959
ClientCertAuth *clientCertAuth
6060
}
6161

62-
// CreateInitKubeConfigFiles will create and write to disk all kubeconfig files necessary in the kubeadm init phase
63-
// to establish the control plane, including also the admin kubeconfig file.
64-
// If kubeconfig files already exists, they are used only if evaluated equal; otherwise an error is returned.
65-
func CreateInitKubeConfigFiles(outDir string, cfg *kubeadmapi.InitConfiguration) error {
66-
klog.V(1).Infoln("creating all kubeconfig files")
67-
return createKubeConfigFiles(
68-
outDir,
69-
cfg,
70-
kubeadmconstants.AdminKubeConfigFileName,
71-
kubeadmconstants.KubeletKubeConfigFileName,
72-
kubeadmconstants.ControllerManagerKubeConfigFileName,
73-
kubeadmconstants.SchedulerKubeConfigFileName,
74-
)
75-
}
76-
7762
// CreateJoinControlPlaneKubeConfigFiles will create and write to disk the kubeconfig files required by kubeadm
7863
// join --control-plane workflow, plus the admin kubeconfig file used by the administrator and kubeadm itself; the
7964
// kubelet.conf file must not be created because it will be created and signed by the kubelet TLS bootstrap process.

cmd/kubeadm/app/phases/kubeconfig/kubeconfig_test.go

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -289,16 +289,6 @@ func TestCreateKubeconfigFilesAndWrappers(t *testing.T) {
289289
},
290290
expectedError: true,
291291
},
292-
{ // Test CreateInitKubeConfigFiles (wrapper to createKubeConfigFile)
293-
name: "CreateInitKubeConfigFiles",
294-
createKubeConfigFunction: CreateInitKubeConfigFiles,
295-
expectedFiles: []string{
296-
kubeadmconstants.AdminKubeConfigFileName,
297-
kubeadmconstants.KubeletKubeConfigFileName,
298-
kubeadmconstants.ControllerManagerKubeConfigFileName,
299-
kubeadmconstants.SchedulerKubeConfigFileName,
300-
},
301-
},
302292
{ // Test CreateJoinControlPlaneKubeConfigFiles (wrapper to createKubeConfigFile)
303293
name: "CreateJoinControlPlaneKubeConfigFiles",
304294
createKubeConfigFunction: CreateJoinControlPlaneKubeConfigFiles,

0 commit comments

Comments
 (0)