Skip to content

Commit

Permalink
Merge pull request #1 from fengzixu/fix-panic-bug
Browse files Browse the repository at this point in the history
fix: fix the bug that cases panic of controller and agent
  • Loading branch information
NickrenREN authored Jun 28, 2020
2 parents 47ad009 + ef532c1 commit 2961012
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ spec:
args:
- "--v=5"
- "--csi-address=$(ADDRESS)"
- "--leader-election"
env:
- name: MY_NAME
valueFrom:
Expand All @@ -47,4 +46,4 @@ spec:

volumes:
- name: socket-dir
emptyDir:
emptyDir:
2 changes: 1 addition & 1 deletion pkg/agent/pv_monitor_agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ func NewPVMonitorAgent(client kubernetes.Interface, driverName string, conn *grp

// PVC informer
agent.pvcLister = pvcInformer.Lister()
agent.pvListerSynced = pvcInformer.Informer().HasSynced
agent.pvcListerSynced = pvcInformer.Informer().HasSynced

// Pod informer
podInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{
Expand Down
2 changes: 1 addition & 1 deletion pkg/controller/pv_monitor_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ func NewPVMonitorController(client kubernetes.Interface, conn *grpc.ClientConn,

// PVC informer
ctrl.pvcLister = pvcInformer.Lister()
ctrl.pvListerSynced = pvcInformer.Informer().HasSynced
ctrl.pvcListerSynced = pvcInformer.Informer().HasSynced

// Pod informer
podInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{
Expand Down

0 comments on commit 2961012

Please sign in to comment.