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
422f5e37
Commit
422f5e37
authored
Sep 27, 2017
by
Brendan Burns
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a label which prevents a node from being added to a cloud load balancer.
parent
751bcc47
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
0 deletions
+8
-0
constants.go
cmd/kubeadm/app/constants/constants.go
+4
-0
service_controller.go
pkg/controller/service/service_controller.go
+4
-0
No files found.
cmd/kubeadm/app/constants/constants.go
View file @
422f5e37
...
@@ -134,6 +134,10 @@ const (
...
@@ -134,6 +134,10 @@ const (
// It's copied over to kubeadm until it's merged in core: https://github.com/kubernetes/kubernetes/pull/39112
// It's copied over to kubeadm until it's merged in core: https://github.com/kubernetes/kubernetes/pull/39112
LabelNodeRoleMaster
=
"node-role.kubernetes.io/master"
LabelNodeRoleMaster
=
"node-role.kubernetes.io/master"
// LabelNodeRoleExcludeBalancer specifies that the node should be
// exclude from load balancers created by a cloud provider.
LabelNodeRoleExcludeBalancer
=
"node.role.kubernetes.io/exclude-balancer"
// MasterConfigurationConfigMap specifies in what ConfigMap in the kube-system namespace the `kubeadm init` configuration should be stored
// MasterConfigurationConfigMap specifies in what ConfigMap in the kube-system namespace the `kubeadm init` configuration should be stored
MasterConfigurationConfigMap
=
"kubeadm-config"
MasterConfigurationConfigMap
=
"kubeadm-config"
...
...
pkg/controller/service/service_controller.go
View file @
422f5e37
...
@@ -598,6 +598,10 @@ func getNodeConditionPredicate() corelisters.NodeConditionPredicate {
...
@@ -598,6 +598,10 @@ func getNodeConditionPredicate() corelisters.NodeConditionPredicate {
return
false
return
false
}
}
if
_
,
hasExcludeBalancerLabel
:=
node
.
Labels
[
constants
.
LabelNodeRoleExcludeBalancer
];
hasExcludeBalancerLabel
{
return
false
}
// If we have no info, don't accept
// If we have no info, don't accept
if
len
(
node
.
Status
.
Conditions
)
==
0
{
if
len
(
node
.
Status
.
Conditions
)
==
0
{
return
false
return
false
...
...
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