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
f1adf74b
Unverified
Commit
f1adf74b
authored
Jun 28, 2018
by
Jordan Liggitt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "certs: only append locally discovered addresses when we got none from the cloudprovider"
This reverts commit
7354bbe5
.
parent
a6e35148
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
15 deletions
+7
-15
kubelet.go
pkg/kubelet/kubelet.go
+7
-15
No files found.
pkg/kubelet/kubelet.go
View file @
f1adf74b
...
...
@@ -750,28 +750,20 @@ func NewMainKubelet(kubeCfg *kubeletconfiginternal.KubeletConfiguration,
klet
.
statusManager
=
status
.
NewManager
(
klet
.
kubeClient
,
klet
.
podManager
,
klet
)
if
kubeCfg
.
ServerTLSBootstrap
&&
kubeDeps
.
TLSOptions
!=
nil
&&
utilfeature
.
DefaultFeatureGate
.
Enabled
(
features
.
RotateKubeletServerCertificate
)
{
var
(
ips
[]
net
.
IP
names
[]
string
)
// If the address was explicitly configured, use that. Otherwise, try to
// discover addresses from the cloudprovider. Otherwise, make a best guess.
if
cfgAddress
:=
net
.
ParseIP
(
kubeCfg
.
Address
);
cfgAddress
!=
nil
&&
!
cfgAddress
.
IsUnspecified
()
{
ips
=
[]
net
.
IP
{
cfgAddress
}
names
=
[]
string
{
klet
.
GetHostname
(),
hostnameOverride
}
}
else
if
len
(
cloudIPs
)
!=
0
||
len
(
cloudNames
)
!=
0
{
ips
=
cloudIPs
names
=
cloudNames
}
else
{
var
ips
[]
net
.
IP
cfgAddress
:=
net
.
ParseIP
(
kubeCfg
.
Address
)
if
cfgAddress
==
nil
||
cfgAddress
.
IsUnspecified
()
{
localIPs
,
err
:=
allGlobalUnicastIPs
()
if
err
!=
nil
{
return
nil
,
err
}
ips
=
localIPs
names
=
[]
string
{
klet
.
GetHostname
(),
hostnameOverride
}
}
else
{
ips
=
[]
net
.
IP
{
cfgAddress
}
}
ips
=
append
(
ips
,
cloudIPs
...
)
names
:=
append
([]
string
{
klet
.
GetHostname
(),
hostnameOverride
},
cloudNames
...
)
klet
.
serverCertificateManager
,
err
=
kubeletcertificate
.
NewKubeletServerCertificateManager
(
klet
.
kubeClient
,
kubeCfg
,
klet
.
nodeName
,
ips
,
names
,
certDirectory
)
if
err
!=
nil
{
return
nil
,
fmt
.
Errorf
(
"failed to initialize certificate manager: %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