Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
80ed28b1
Commit
80ed28b1
authored
Jun 04, 2019
by
David Ashpole
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
disable kubelet local endpoints on windows
parent
8657b24d
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
17 additions
and
13 deletions
+17
-13
kubelet.go
pkg/kubelet/kubelet.go
+6
-1
util_unix.go
pkg/kubelet/util/util_unix.go
+2
-2
util_unsupported.go
pkg/kubelet/util/util_unsupported.go
+2
-2
util_windows.go
pkg/kubelet/util/util_windows.go
+3
-7
util.go
test/e2e_node/util.go
+4
-1
No files found.
pkg/kubelet/kubelet.go
View file @
80ed28b1
...
@@ -2213,7 +2213,12 @@ func (kl *Kubelet) ListenAndServeReadOnly(address net.IP, port uint, enableCAdvi
...
@@ -2213,7 +2213,12 @@ func (kl *Kubelet) ListenAndServeReadOnly(address net.IP, port uint, enableCAdvi
// ListenAndServePodResources runs the kubelet podresources grpc service
// ListenAndServePodResources runs the kubelet podresources grpc service
func
(
kl
*
Kubelet
)
ListenAndServePodResources
()
{
func
(
kl
*
Kubelet
)
ListenAndServePodResources
()
{
server
.
ListenAndServePodResources
(
util
.
LocalEndpoint
(
kl
.
getPodResourcesDir
(),
podresources
.
Socket
),
kl
.
podManager
,
kl
.
containerManager
)
socket
,
err
:=
util
.
LocalEndpoint
(
kl
.
getPodResourcesDir
(),
podresources
.
Socket
)
if
err
!=
nil
{
klog
.
V
(
2
)
.
Infof
(
"Failed to get local endpoint for PodResources endpoint: %v"
,
err
)
return
}
server
.
ListenAndServePodResources
(
socket
,
kl
.
podManager
,
kl
.
containerManager
)
}
}
// Delete the eligible dead container instances in a pod. Depending on the configuration, the latest dead containers may be kept around.
// Delete the eligible dead container instances in a pod. Depending on the configuration, the latest dead containers may be kept around.
...
...
pkg/kubelet/util/util_unix.go
View file @
80ed28b1
...
@@ -128,10 +128,10 @@ func parseEndpoint(endpoint string) (string, string, error) {
...
@@ -128,10 +128,10 @@ func parseEndpoint(endpoint string) (string, string, error) {
}
}
// LocalEndpoint returns the full path to a unix socket at the given endpoint
// LocalEndpoint returns the full path to a unix socket at the given endpoint
func
LocalEndpoint
(
path
,
file
string
)
string
{
func
LocalEndpoint
(
path
,
file
string
)
(
string
,
error
)
{
u
:=
url
.
URL
{
u
:=
url
.
URL
{
Scheme
:
unixProtocol
,
Scheme
:
unixProtocol
,
Path
:
path
,
Path
:
path
,
}
}
return
filepath
.
Join
(
u
.
String
(),
file
+
".sock"
)
return
filepath
.
Join
(
u
.
String
(),
file
+
".sock"
)
,
nil
}
}
pkg/kubelet/util/util_unsupported.go
View file @
80ed28b1
...
@@ -44,8 +44,8 @@ func UnlockPath(fileHandles []uintptr) {
...
@@ -44,8 +44,8 @@ func UnlockPath(fileHandles []uintptr) {
}
}
// LocalEndpoint empty implementation
// LocalEndpoint empty implementation
func
LocalEndpoint
(
path
,
file
string
)
string
{
func
LocalEndpoint
(
path
,
file
string
)
(
string
,
error
)
{
return
""
return
""
,
fmt
.
Errorf
(
"LocalEndpoints are unsupported in this build"
)
}
}
// GetBootTime empty implementation
// GetBootTime empty implementation
...
...
pkg/kubelet/util/util_windows.go
View file @
80ed28b1
...
@@ -107,13 +107,9 @@ func parseEndpoint(endpoint string) (string, string, error) {
...
@@ -107,13 +107,9 @@ func parseEndpoint(endpoint string) (string, string, error) {
}
}
}
}
// LocalEndpoint returns the full path to a windows named pipe
// LocalEndpoint empty implementation
func
LocalEndpoint
(
path
,
file
string
)
string
{
func
LocalEndpoint
(
path
,
file
string
)
(
string
,
error
)
{
u
:=
url
.
URL
{
return
""
,
fmt
.
Errorf
(
"LocalEndpoints are unsupported in this build"
)
Scheme
:
npipeProtocol
,
Path
:
path
,
}
return
u
.
String
()
+
"//./pipe/"
+
file
}
}
var
tickCount
=
syscall
.
NewLazyDLL
(
"kernel32.dll"
)
.
NewProc
(
"GetTickCount64"
)
var
tickCount
=
syscall
.
NewLazyDLL
(
"kernel32.dll"
)
.
NewProc
(
"GetTickCount64"
)
...
...
test/e2e_node/util.go
View file @
80ed28b1
...
@@ -104,7 +104,10 @@ func getNodeSummary() (*stats.Summary, error) {
...
@@ -104,7 +104,10 @@ func getNodeSummary() (*stats.Summary, error) {
}
}
func
getNodeDevices
()
(
*
podresourcesapi
.
ListPodResourcesResponse
,
error
)
{
func
getNodeDevices
()
(
*
podresourcesapi
.
ListPodResourcesResponse
,
error
)
{
endpoint
:=
util
.
LocalEndpoint
(
defaultPodResourcesPath
,
podresources
.
Socket
)
endpoint
,
err
:=
util
.
LocalEndpoint
(
defaultPodResourcesPath
,
podresources
.
Socket
)
if
err
!=
nil
{
return
nil
,
fmt
.
Errorf
(
"Error getting local endpoint: %v"
,
err
)
}
client
,
conn
,
err
:=
podresources
.
GetClient
(
endpoint
,
defaultPodResourcesTimeout
,
defaultPodResourcesMaxSize
)
client
,
conn
,
err
:=
podresources
.
GetClient
(
endpoint
,
defaultPodResourcesTimeout
,
defaultPodResourcesMaxSize
)
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
,
fmt
.
Errorf
(
"Error getting grpc client: %v"
,
err
)
return
nil
,
fmt
.
Errorf
(
"Error getting grpc client: %v"
,
err
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment