Skip to content

Commit e35ce33

Browse files
committed
fixup: rename preFilterState to permitState
1 parent d16270f commit e35ce33

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

pkg/coscheduling/core/core.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,15 @@ const (
4949
Success Status = "Success"
5050
Wait Status = "Wait"
5151

52-
preFilterStateKey = "PreFilterCoscheduling"
52+
permitStateKey = "PermitCoscheduling"
5353
)
5454

55-
type PreFilterState struct {
55+
type PermitState struct {
5656
Activate bool
5757
}
5858

59-
func (s *PreFilterState) Clone() framework.StateData {
60-
return &PreFilterState{Activate: s.Activate}
59+
func (s *PermitState) Clone() framework.StateData {
60+
return &PermitState{Activate: s.Activate}
6161
}
6262

6363
// Manager defines the interfaces for PodGroup management.
@@ -119,9 +119,9 @@ func (pgMgr *PodGroupManager) ActivateSiblings(pod *corev1.Pod, state *framework
119119
}
120120

121121
// Only proceed if it's explicitly requested to activate sibling pods.
122-
if c, err := state.Read(preFilterStateKey); err != nil {
122+
if c, err := state.Read(permitStateKey); err != nil {
123123
return
124-
} else if s, ok := c.(*PreFilterState); !ok || !s.Activate {
124+
} else if s, ok := c.(*PermitState); !ok || !s.Activate {
125125
return
126126
}
127127

@@ -236,7 +236,7 @@ func (pgMgr *PodGroupManager) Permit(ctx context.Context, state *framework.Cycle
236236
// its siblings.
237237
// It'd be in-efficient if we trigger activating siblings unconditionally.
238238
// See https://github.com/kubernetes-sigs/scheduler-plugins/issues/682
239-
state.Write(preFilterStateKey, &PreFilterState{Activate: true})
239+
state.Write(permitStateKey, &PermitState{Activate: true})
240240
}
241241

242242
return Wait

0 commit comments

Comments
 (0)