Merge pull request #125178 from my-git9/unusedfunction

kubeadm: remove some unused function
This commit is contained in:
Kubernetes Prow Robot 2024-05-30 06:47:02 -07:00 committed by GitHub
commit 2acdbae664
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 0 additions and 36 deletions

View File

@ -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)

View File

@ -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()