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
e70434a1
Commit
e70434a1
authored
Jun 23, 2016
by
k8s-merge-robot
Committed by
GitHub
Jun 23, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #27896 from mml/fed-labels-not-annotations
Automatic merge from submit-queue Look for the failure zone label in labels.
parents
af680d6a
c87b6134
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
dns.go
pkg/dns/dns.go
+2
-2
dns_test.go
pkg/dns/dns_test.go
+1
-1
No files found.
pkg/dns/dns.go
View file @
e70434a1
...
...
@@ -648,7 +648,7 @@ func (kd *KubeDNS) getClusterZone() (string, error) {
// Select a node (arbitrarily the first node) that has `LabelZoneFailureDomain` set.
for
_
,
nodeItem
:=
range
nodeList
.
Items
{
if
_
,
ok
:=
nodeItem
.
Annotation
s
[
unversioned
.
LabelZoneFailureDomain
];
!
ok
{
if
_
,
ok
:=
nodeItem
.
Label
s
[
unversioned
.
LabelZoneFailureDomain
];
!
ok
{
continue
}
// Make a copy of the node, don't rely on the loop variable.
...
...
@@ -663,7 +663,7 @@ func (kd *KubeDNS) getClusterZone() (string, error) {
return
""
,
fmt
.
Errorf
(
"Could not find any nodes"
)
}
zone
,
ok
:=
node
.
Annotation
s
[
unversioned
.
LabelZoneFailureDomain
]
zone
,
ok
:=
node
.
Label
s
[
unversioned
.
LabelZoneFailureDomain
]
if
!
ok
||
zone
==
""
{
return
""
,
fmt
.
Errorf
(
"unknown cluster zone"
)
}
...
...
pkg/dns/dns_test.go
View file @
e70434a1
...
...
@@ -433,7 +433,7 @@ func newNodes() *kapi.NodeList {
{
ObjectMeta
:
kapi
.
ObjectMeta
{
Name
:
"testnode-1"
,
Annotation
s
:
map
[
string
]
string
{
Label
s
:
map
[
string
]
string
{
// Note: The zone name here is an arbitrary string and doesn't exactly follow the
// format used by the cloud providers to name their zones. But that shouldn't matter
// for these tests here.
...
...
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