Skip to content

Commit

Permalink
reverse the logic
Browse files Browse the repository at this point in the history
  • Loading branch information
jq committed Apr 10, 2019
1 parent b2a0192 commit 82e5b09
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/controllers/mpi_job_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ func NewMPIJobController(
var pdbLister policylisters.PodDisruptionBudgetLister
var pdbSynced cache.InformerSynced

if !enableGangScheduling {
if enableGangScheduling {
pdbLister = pdbInformer.Lister()
pdbSynced = pdbInformer.Informer().HasSynced
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/controllers/mpi_job_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ func (f *fixture) newController(processingResourceType string, enableGangSchedul
i := informers.NewSharedInformerFactory(f.client, noResyncPeriodFunc())
k8sI := kubeinformers.NewSharedInformerFactory(f.kubeClient, noResyncPeriodFunc())
var pdbInformer policyinformers.PodDisruptionBudgetInformer
if !enableGangScheduling {
if enableGangScheduling {
pdbInformer = k8sI.Policy().V1beta1().PodDisruptionBudgets()
}
c := NewMPIJobController(
Expand Down

0 comments on commit 82e5b09

Please sign in to comment.