mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-28 13:45:50 +00:00
Make name validators return string slices
This commit is contained in:
@@ -21,6 +21,7 @@ import (
|
||||
"fmt"
|
||||
"net"
|
||||
"net/http"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"k8s.io/kubernetes/pkg/api"
|
||||
@@ -98,8 +99,8 @@ func NewStaticKubeletClient(config *KubeletClientConfig) (KubeletClient, error)
|
||||
|
||||
// In default HTTPKubeletClient ctx is unused.
|
||||
func (c *HTTPKubeletClient) GetConnectionInfo(ctx api.Context, nodeName string) (string, uint, http.RoundTripper, error) {
|
||||
if ok, msg := validation.ValidateNodeName(nodeName, false); !ok {
|
||||
return "", 0, nil, fmt.Errorf("invalid node name: %s", msg)
|
||||
if errs := validation.ValidateNodeName(nodeName, false); len(errs) != 0 {
|
||||
return "", 0, nil, fmt.Errorf("invalid node name: %s", strings.Join(errs, ";"))
|
||||
}
|
||||
scheme := "http"
|
||||
if c.Config.EnableHttps {
|
||||
|
Reference in New Issue
Block a user