mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-29 21:29:24 +00:00
Fix the rest of the code
This commit is contained in:
@@ -123,7 +123,7 @@ func (r *REST) getKubeletPort(ctx api.Context, nodeName string) (int, error) {
|
||||
if !ok {
|
||||
return 0, fmt.Errorf("Unexpected object type: %#v", node)
|
||||
}
|
||||
return node.Status.DaemonEndpoints.KubeletEndpoint.Port, nil
|
||||
return int(node.Status.DaemonEndpoints.KubeletEndpoint.Port), nil
|
||||
}
|
||||
|
||||
func (c *REST) GetConnectionInfo(ctx api.Context, nodeName string) (string, uint, http.RoundTripper, error) {
|
||||
|
||||
@@ -186,7 +186,7 @@ func ResourceLocation(getter ResourceGetter, connection client.ConnectionInfoGet
|
||||
if kubeletPort == 0 {
|
||||
kubeletPort = ports.KubeletPort
|
||||
}
|
||||
if portReq == "" || strconv.Itoa(kubeletPort) == portReq {
|
||||
if portReq == "" || strconv.Itoa(int(kubeletPort)) == portReq {
|
||||
scheme, port, kubeletTransport, err := connection.GetConnectionInfo(ctx, node.Name)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
|
||||
Reference in New Issue
Block a user