mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-03 02:07:38 +00:00
remove a flag check that was introduced in #112542; address several comments
Signed-off-by: Paco Xu <paco.xu@daocloud.io>
This commit is contained in:
@@ -189,13 +189,6 @@ func ValidateKubeletFlags(f *KubeletFlags) error {
|
||||
return fmt.Errorf("unsupported CRI runtime: %q, only %q is currently supported", f.ContainerRuntime, kubetypes.RemoteContainerRuntime)
|
||||
}
|
||||
|
||||
// Note: maybe we can test it for being a valid socket address as an additional improvement.
|
||||
// The only problem with it will be that some setups may not specify 'unix://' prefix.
|
||||
// So just check empty for back compat.
|
||||
if f.RemoteRuntimeEndpoint == "" {
|
||||
return fmt.Errorf("the container runtime endpoint address was not specified or empty, use --container-runtime-endpoint to set")
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
@@ -183,8 +183,7 @@ func TestValidateKubeletFlags(t *testing.T) {
|
||||
ContainerRuntimeOptions: config.ContainerRuntimeOptions{
|
||||
ContainerRuntime: kubetypes.RemoteContainerRuntime,
|
||||
},
|
||||
RemoteRuntimeEndpoint: "unix:///run/containerd/containerd.sock",
|
||||
NodeLabels: tt.labels,
|
||||
NodeLabels: tt.labels,
|
||||
})
|
||||
|
||||
if tt.error && err == nil {
|
||||
|
Reference in New Issue
Block a user