mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-11 21:12:07 +00:00
Merge pull request #125178 from my-git9/unusedfunction
kubeadm: remove some unused function
This commit is contained in:
commit
2acdbae664
@ -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()
|
||||||
|
Loading…
Reference in New Issue
Block a user