mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-15 06:01:50 +00:00
kubeadm: remove some unused function
Signed-off-by: xin.li <xin.li@daocloud.io>
This commit is contained in:
@@ -577,16 +577,6 @@ func GetAdminKubeConfigPath() string {
|
|||||||
return filepath.Join(KubernetesDir, AdminKubeConfigFileName)
|
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
|
// GetKubeletKubeConfigPath returns the location on the disk where kubelet kubeconfig is located by default
|
||||||
func GetKubeletKubeConfigPath() string {
|
func GetKubeletKubeConfigPath() string {
|
||||||
return filepath.Join(KubernetesDir, KubeletKubeConfigFileName)
|
return filepath.Join(KubernetesDir, KubeletKubeConfigFileName)
|
||||||
|
@@ -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) {
|
func TestGetKubeletKubeConfigPath(t *testing.T) {
|
||||||
expected := filepath.FromSlash("/etc/kubernetes/kubelet.conf")
|
expected := filepath.FromSlash("/etc/kubernetes/kubelet.conf")
|
||||||
actual := GetKubeletKubeConfigPath()
|
actual := GetKubeletKubeConfigPath()
|
||||||
|
Reference in New Issue
Block a user