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
d577550d
Commit
d577550d
authored
May 27, 2016
by
Alex Robinson
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #26054 from gmarek/flags
Make service-range flag in controller-manager optional
parents
644258fa
08385b2c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
4 deletions
+13
-4
controllermanager.go
cmd/kube-controller-manager/app/controllermanager.go
+8
-3
nodecontroller.go
pkg/controller/node/nodecontroller.go
+5
-1
No files found.
cmd/kube-controller-manager/app/controllermanager.go
View file @
d577550d
...
@@ -229,9 +229,14 @@ func StartControllers(s *options.CMServer, kubeClient *client.Client, kubeconfig
...
@@ -229,9 +229,14 @@ func StartControllers(s *options.CMServer, kubeClient *client.Client, kubeconfig
glog
.
Fatalf
(
"Cloud provider could not be initialized: %v"
,
err
)
glog
.
Fatalf
(
"Cloud provider could not be initialized: %v"
,
err
)
}
}
// this cidr has been validated already
_
,
clusterCIDR
,
err
:=
net
.
ParseCIDR
(
s
.
ClusterCIDR
)
_
,
clusterCIDR
,
_
:=
net
.
ParseCIDR
(
s
.
ClusterCIDR
)
if
err
!=
nil
{
_
,
serviceCIDR
,
_
:=
net
.
ParseCIDR
(
s
.
ServiceCIDR
)
glog
.
Warningf
(
"Unsuccessful parsing of cluster CIDR %v: %v"
,
s
.
ClusterCIDR
,
err
)
}
_
,
serviceCIDR
,
err
:=
net
.
ParseCIDR
(
s
.
ServiceCIDR
)
if
err
!=
nil
{
glog
.
Warningf
(
"Unsuccessful parsing of service CIDR %v: %v"
,
s
.
ServiceCIDR
,
err
)
}
nodeController
:=
nodecontroller
.
NewNodeController
(
cloud
,
clientset
.
NewForConfigOrDie
(
restclient
.
AddUserAgent
(
kubeconfig
,
"node-controller"
)),
nodeController
:=
nodecontroller
.
NewNodeController
(
cloud
,
clientset
.
NewForConfigOrDie
(
restclient
.
AddUserAgent
(
kubeconfig
,
"node-controller"
)),
s
.
PodEvictionTimeout
.
Duration
,
flowcontrol
.
NewTokenBucketRateLimiter
(
s
.
DeletingPodsQps
,
int
(
s
.
DeletingPodsBurst
)),
s
.
PodEvictionTimeout
.
Duration
,
flowcontrol
.
NewTokenBucketRateLimiter
(
s
.
DeletingPodsQps
,
int
(
s
.
DeletingPodsBurst
)),
flowcontrol
.
NewTokenBucketRateLimiter
(
s
.
DeletingPodsQps
,
int
(
s
.
DeletingPodsBurst
)),
flowcontrol
.
NewTokenBucketRateLimiter
(
s
.
DeletingPodsQps
,
int
(
s
.
DeletingPodsBurst
)),
...
...
pkg/controller/node/nodecontroller.go
View file @
d577550d
...
@@ -265,7 +265,11 @@ func NewNodeController(
...
@@ -265,7 +265,11 @@ func NewNodeController(
// Run starts an asynchronous loop that monitors the status of cluster nodes.
// Run starts an asynchronous loop that monitors the status of cluster nodes.
func
(
nc
*
NodeController
)
Run
(
period
time
.
Duration
)
{
func
(
nc
*
NodeController
)
Run
(
period
time
.
Duration
)
{
if
nc
.
allocateNodeCIDRs
{
if
nc
.
allocateNodeCIDRs
{
nc
.
filterOutServiceRange
()
if
nc
.
serviceCIDR
!=
nil
{
nc
.
filterOutServiceRange
()
}
else
{
glog
.
Info
(
"No Service CIDR provided. Skipping filtering out service addresses."
)
}
}
}
go
nc
.
nodeController
.
Run
(
wait
.
NeverStop
)
go
nc
.
nodeController
.
Run
(
wait
.
NeverStop
)
...
...
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