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
3b0b74f5
Unverified
Commit
3b0b74f5
authored
Jan 14, 2019
by
Kubernetes Prow Robot
Committed by
GitHub
Jan 14, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #72764 from andrewsykim/cloud-node-lifecycle-controller-rbac
Use node-controller cluster role for node-lifecycle and cloud-node-lifecycle controller
parents
d2bd29fc
426714c2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
3 deletions
+7
-3
controllermanager.go
cmd/cloud-controller-manager/app/controllermanager.go
+4
-2
core.go
cmd/kube-controller-manager/app/core.go
+3
-1
No files found.
cmd/cloud-controller-manager/app/controllermanager.go
View file @
3b0b74f5
...
@@ -225,7 +225,8 @@ func startControllers(c *cloudcontrollerconfig.CompletedConfig, stop <-chan stru
...
@@ -225,7 +225,8 @@ func startControllers(c *cloudcontrollerconfig.CompletedConfig, stop <-chan stru
// Start the CloudNodeController
// Start the CloudNodeController
nodeController
:=
cloudcontrollers
.
NewCloudNodeController
(
nodeController
:=
cloudcontrollers
.
NewCloudNodeController
(
c
.
SharedInformers
.
Core
()
.
V1
()
.
Nodes
(),
c
.
SharedInformers
.
Core
()
.
V1
()
.
Nodes
(),
client
(
"cloud-node-controller"
),
cloud
,
// cloud node controller uses existing cluster role from node-controller
client
(
"node-controller"
),
cloud
,
c
.
ComponentConfig
.
NodeStatusUpdateFrequency
.
Duration
)
c
.
ComponentConfig
.
NodeStatusUpdateFrequency
.
Duration
)
go
nodeController
.
Run
(
stop
)
go
nodeController
.
Run
(
stop
)
...
@@ -233,7 +234,8 @@ func startControllers(c *cloudcontrollerconfig.CompletedConfig, stop <-chan stru
...
@@ -233,7 +234,8 @@ func startControllers(c *cloudcontrollerconfig.CompletedConfig, stop <-chan stru
cloudNodeLifecycleController
,
err
:=
cloudcontrollers
.
NewCloudNodeLifecycleController
(
cloudNodeLifecycleController
,
err
:=
cloudcontrollers
.
NewCloudNodeLifecycleController
(
c
.
SharedInformers
.
Core
()
.
V1
()
.
Nodes
(),
c
.
SharedInformers
.
Core
()
.
V1
()
.
Nodes
(),
client
(
"cloud-node-lifecycle-controller"
),
cloud
,
// cloud node lifecycle controller uses existing cluster role from node-controller
client
(
"node-controller"
),
cloud
,
c
.
ComponentConfig
.
KubeCloudShared
.
NodeMonitorPeriod
.
Duration
,
c
.
ComponentConfig
.
KubeCloudShared
.
NodeMonitorPeriod
.
Duration
,
)
)
if
err
!=
nil
{
if
err
!=
nil
{
...
...
cmd/kube-controller-manager/app/core.go
View file @
3b0b74f5
...
@@ -126,6 +126,7 @@ func startNodeLifecycleController(ctx ControllerContext) (http.Handler, bool, er
...
@@ -126,6 +126,7 @@ func startNodeLifecycleController(ctx ControllerContext) (http.Handler, bool, er
ctx
.
InformerFactory
.
Core
()
.
V1
()
.
Pods
(),
ctx
.
InformerFactory
.
Core
()
.
V1
()
.
Pods
(),
ctx
.
InformerFactory
.
Core
()
.
V1
()
.
Nodes
(),
ctx
.
InformerFactory
.
Core
()
.
V1
()
.
Nodes
(),
ctx
.
InformerFactory
.
Apps
()
.
V1
()
.
DaemonSets
(),
ctx
.
InformerFactory
.
Apps
()
.
V1
()
.
DaemonSets
(),
// node lifecycle controller uses existing cluster role from node-controller
ctx
.
ClientBuilder
.
ClientOrDie
(
"node-controller"
),
ctx
.
ClientBuilder
.
ClientOrDie
(
"node-controller"
),
ctx
.
ComponentConfig
.
KubeCloudShared
.
NodeMonitorPeriod
.
Duration
,
ctx
.
ComponentConfig
.
KubeCloudShared
.
NodeMonitorPeriod
.
Duration
,
ctx
.
ComponentConfig
.
NodeLifecycleController
.
NodeStartupGracePeriod
.
Duration
,
ctx
.
ComponentConfig
.
NodeLifecycleController
.
NodeStartupGracePeriod
.
Duration
,
...
@@ -149,7 +150,8 @@ func startNodeLifecycleController(ctx ControllerContext) (http.Handler, bool, er
...
@@ -149,7 +150,8 @@ func startNodeLifecycleController(ctx ControllerContext) (http.Handler, bool, er
func
startCloudNodeLifecycleController
(
ctx
ControllerContext
)
(
http
.
Handler
,
bool
,
error
)
{
func
startCloudNodeLifecycleController
(
ctx
ControllerContext
)
(
http
.
Handler
,
bool
,
error
)
{
cloudNodeLifecycleController
,
err
:=
cloudcontroller
.
NewCloudNodeLifecycleController
(
cloudNodeLifecycleController
,
err
:=
cloudcontroller
.
NewCloudNodeLifecycleController
(
ctx
.
InformerFactory
.
Core
()
.
V1
()
.
Nodes
(),
ctx
.
InformerFactory
.
Core
()
.
V1
()
.
Nodes
(),
ctx
.
ClientBuilder
.
ClientOrDie
(
"cloud-node-lifecycle-controller"
),
// cloud node lifecycle controller uses existing cluster role from node-controller
ctx
.
ClientBuilder
.
ClientOrDie
(
"node-controller"
),
ctx
.
Cloud
,
ctx
.
Cloud
,
ctx
.
ComponentConfig
.
KubeCloudShared
.
NodeMonitorPeriod
.
Duration
,
ctx
.
ComponentConfig
.
KubeCloudShared
.
NodeMonitorPeriod
.
Duration
,
)
)
...
...
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