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
ba6ed642
Commit
ba6ed642
authored
Nov 24, 2017
by
Tomas Nozicka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Wait for controllerrevision informer to sync on statefulset controller startup
parent
6b1b6d50
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
stateful_set.go
pkg/controller/statefulset/stateful_set.go
+5
-1
No files found.
pkg/controller/statefulset/stateful_set.go
View file @
ba6ed642
...
...
@@ -71,6 +71,8 @@ type StatefulSetController struct {
setListerSynced
cache
.
InformerSynced
// pvcListerSynced returns true if the pvc shared informer has synced at least once
pvcListerSynced
cache
.
InformerSynced
// revListerSynced returns true if the rev shared informer has synced at least once
revListerSynced
cache
.
InformerSynced
// StatefulSets that need to be synced.
queue
workqueue
.
RateLimitingInterface
}
...
...
@@ -103,6 +105,8 @@ func NewStatefulSetController(
pvcListerSynced
:
pvcInformer
.
Informer
()
.
HasSynced
,
queue
:
workqueue
.
NewNamedRateLimitingQueue
(
workqueue
.
DefaultControllerRateLimiter
(),
"statefulset"
),
podControl
:
controller
.
RealPodControl
{
KubeClient
:
kubeClient
,
Recorder
:
recorder
},
revListerSynced
:
revInformer
.
Informer
()
.
HasSynced
,
}
podInformer
.
Informer
()
.
AddEventHandler
(
cache
.
ResourceEventHandlerFuncs
{
...
...
@@ -146,7 +150,7 @@ func (ssc *StatefulSetController) Run(workers int, stopCh <-chan struct{}) {
glog
.
Infof
(
"Starting stateful set controller"
)
defer
glog
.
Infof
(
"Shutting down statefulset controller"
)
if
!
controller
.
WaitForCacheSync
(
"stateful set"
,
stopCh
,
ssc
.
podListerSynced
,
ssc
.
setListerSynced
,
ssc
.
pvcListerSynced
)
{
if
!
controller
.
WaitForCacheSync
(
"stateful set"
,
stopCh
,
ssc
.
podListerSynced
,
ssc
.
setListerSynced
,
ssc
.
pvcListerSynced
,
ssc
.
revListerSynced
)
{
return
}
...
...
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