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
abda5307
Commit
abda5307
authored
Mar 09, 2023
by
Daishan Peng
Committed by
Brad Davidson
Mar 13, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Wait for kubelet port to be ready before setting
Signed-off-by:
Daishan Peng
<
daishan@acorn.io
>
parent
0cf6b03d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
tunnel.go
pkg/agent/tunnel/tunnel.go
+6
-1
No files found.
pkg/agent/tunnel/tunnel.go
View file @
abda5307
...
@@ -160,7 +160,12 @@ func (a *agentTunnel) setKubeletPort(ctx context.Context, apiServerReady <-chan
...
@@ -160,7 +160,12 @@ func (a *agentTunnel) setKubeletPort(ctx context.Context, apiServerReady <-chan
logrus
.
Debugf
(
"Tunnel authorizer failed to get Kubelet Port: %v"
,
err
)
logrus
.
Debugf
(
"Tunnel authorizer failed to get Kubelet Port: %v"
,
err
)
return
false
,
nil
return
false
,
nil
}
}
a
.
kubeletPort
=
strconv
.
FormatInt
(
int64
(
node
.
Status
.
DaemonEndpoints
.
KubeletEndpoint
.
Port
),
10
)
kubeletPort
:=
strconv
.
FormatInt
(
int64
(
node
.
Status
.
DaemonEndpoints
.
KubeletEndpoint
.
Port
),
10
)
if
kubeletPort
==
"0"
{
logrus
.
Debugf
(
"Waiting for the kubelet port to be populated"
)
return
false
,
nil
}
a
.
kubeletPort
=
kubeletPort
logrus
.
Infof
(
"Tunnel authorizer set Kubelet Port %s"
,
a
.
kubeletPort
)
logrus
.
Infof
(
"Tunnel authorizer set Kubelet Port %s"
,
a
.
kubeletPort
)
return
true
,
nil
return
true
,
nil
})
})
...
...
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