From 7771a58b464589f4a35de8c8563470c54549c36e Mon Sep 17 00:00:00 2001 From: "xin.li" Date: Wed, 29 May 2024 11:26:36 +0800 Subject: [PATCH] kubeadm: remove some unused function Signed-off-by: xin.li --- cmd/kubeadm/app/constants/constants.go | 10 -------- cmd/kubeadm/app/constants/constants_test.go | 26 --------------------- 2 files changed, 36 deletions(-) diff --git a/cmd/kubeadm/app/constants/constants.go b/cmd/kubeadm/app/constants/constants.go index cdce7987d2a..4b0905ff389 100644 --- a/cmd/kubeadm/app/constants/constants.go +++ b/cmd/kubeadm/app/constants/constants.go @@ -577,16 +577,6 @@ func GetAdminKubeConfigPath() string { return filepath.Join(KubernetesDir, AdminKubeConfigFileName) } -// GetSuperAdminKubeConfigPath returns the location on the disk where admin kubeconfig is located by default -func GetSuperAdminKubeConfigPath() string { - return filepath.Join(KubernetesDir, SuperAdminKubeConfigFileName) -} - -// GetBootstrapKubeletKubeConfigPath returns the location on the disk where bootstrap kubelet kubeconfig is located by default -func GetBootstrapKubeletKubeConfigPath() string { - return filepath.Join(KubernetesDir, KubeletBootstrapKubeConfigFileName) -} - // GetKubeletKubeConfigPath returns the location on the disk where kubelet kubeconfig is located by default func GetKubeletKubeConfigPath() string { return filepath.Join(KubernetesDir, KubeletKubeConfigFileName) diff --git a/cmd/kubeadm/app/constants/constants_test.go b/cmd/kubeadm/app/constants/constants_test.go index 819fd3f804d..37561ccde51 100644 --- a/cmd/kubeadm/app/constants/constants_test.go +++ b/cmd/kubeadm/app/constants/constants_test.go @@ -50,32 +50,6 @@ func TestGetAdminKubeConfigPath(t *testing.T) { } } -func TestGetSuperAdminKubeConfigPath(t *testing.T) { - expected := filepath.Join(KubernetesDir, SuperAdminKubeConfigFileName) - actual := GetSuperAdminKubeConfigPath() - - if actual != expected { - t.Errorf( - "failed GetSuperAdminKubeConfigPath:\n\texpected: %s\n\t actual: %s", - expected, - actual, - ) - } -} - -func TestGetBootstrapKubeletKubeConfigPath(t *testing.T) { - expected := filepath.FromSlash("/etc/kubernetes/bootstrap-kubelet.conf") - actual := GetBootstrapKubeletKubeConfigPath() - - if actual != expected { - t.Errorf( - "failed GetBootstrapKubeletKubeConfigPath:\n\texpected: %s\n\t actual: %s", - expected, - actual, - ) - } -} - func TestGetKubeletKubeConfigPath(t *testing.T) { expected := filepath.FromSlash("/etc/kubernetes/kubelet.conf") actual := GetKubeletKubeConfigPath()