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
58102b75
Unverified
Commit
58102b75
authored
Sep 27, 2018
by
k8s-ci-robot
Committed by
GitHub
Sep 27, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #69077 from feiskyer/az-ip
Add fallbacks for getting node IP from Azure IMDS
parents
07877159
3bca7a01
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
azure_instances.go
pkg/cloudprovider/providers/azure/azure_instances.go
+9
-0
No files found.
pkg/cloudprovider/providers/azure/azure_instances.go
View file @
58102b75
...
...
@@ -87,6 +87,15 @@ func (az *Cloud) NodeAddresses(ctx context.Context, name types.NodeName) ([]v1.N
if
err
!=
nil
{
return
nil
,
err
}
// Fall back to ARM API if the address is empty string.
// TODO: this is a workaround because IMDS is not stable enough.
// It should be removed after IMDS fixing the issue.
if
strings
.
TrimSpace
(
ipAddress
.
PrivateIP
)
==
""
{
return
addressGetter
(
name
)
}
// Use ip address got from instance metadata.
addresses
:=
[]
v1
.
NodeAddress
{
{
Type
:
v1
.
NodeInternalIP
,
Address
:
ipAddress
.
PrivateIP
},
{
Type
:
v1
.
NodeHostName
,
Address
:
string
(
name
)},
...
...
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