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
a827ef07
Commit
a827ef07
authored
Jun 23, 2016
by
Madhusudan.C.S
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Addressed review comments.
parent
6894e740
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
dns.go
pkg/dns/dns.go
+4
-1
No files found.
pkg/dns/dns.go
View file @
a827ef07
...
@@ -649,7 +649,8 @@ func (kd *KubeDNS) getClusterZoneAndRegion() (string, string, error) {
...
@@ -649,7 +649,8 @@ func (kd *KubeDNS) getClusterZoneAndRegion() (string, string, error) {
return
""
,
""
,
fmt
.
Errorf
(
"failed to retrieve the cluster nodes: %v"
,
err
)
return
""
,
""
,
fmt
.
Errorf
(
"failed to retrieve the cluster nodes: %v"
,
err
)
}
}
// Select a node (arbitrarily the first node) that has `LabelZoneFailureDomain` set.
// Select a node (arbitrarily the first node) that has
// `LabelZoneFailureDomain` and `LabelZoneRegion` set.
for
_
,
nodeItem
:=
range
nodeList
.
Items
{
for
_
,
nodeItem
:=
range
nodeList
.
Items
{
_
,
zfound
:=
nodeItem
.
Labels
[
unversioned
.
LabelZoneFailureDomain
]
_
,
zfound
:=
nodeItem
.
Labels
[
unversioned
.
LabelZoneFailureDomain
]
_
,
rfound
:=
nodeItem
.
Labels
[
unversioned
.
LabelZoneRegion
]
_
,
rfound
:=
nodeItem
.
Labels
[
unversioned
.
LabelZoneRegion
]
...
@@ -661,6 +662,8 @@ func (kd *KubeDNS) getClusterZoneAndRegion() (string, string, error) {
...
@@ -661,6 +662,8 @@ func (kd *KubeDNS) getClusterZoneAndRegion() (string, string, error) {
if
err
:=
kd
.
nodesStore
.
Add
(
node
);
err
!=
nil
{
if
err
:=
kd
.
nodesStore
.
Add
(
node
);
err
!=
nil
{
return
""
,
""
,
fmt
.
Errorf
(
"couldn't add the retrieved node to the cache: %v"
,
err
)
return
""
,
""
,
fmt
.
Errorf
(
"couldn't add the retrieved node to the cache: %v"
,
err
)
}
}
// Node is found, break out of the loop.
break
}
}
}
}
...
...
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