Merge pull request #108218 from cyclinder/remove_featuregate
remove featuregate in 1.25
This commit is contained in:
@@ -76,7 +76,7 @@ func New(dpArgs runtime.Object, fh framework.Handle, fts feature.Features) (fram
|
||||
fh: fh,
|
||||
args: *args,
|
||||
podLister: fh.SharedInformerFactory().Core().V1().Pods().Lister(),
|
||||
pdbLister: getPDBLister(fh.SharedInformerFactory(), fts.EnablePodDisruptionBudget),
|
||||
pdbLister: getPDBLister(fh.SharedInformerFactory()),
|
||||
}
|
||||
return &pl, nil
|
||||
}
|
||||
@@ -314,9 +314,6 @@ func filterPodsWithPDBViolation(podInfos []*framework.PodInfo, pdbs []*policy.Po
|
||||
return violatingPodInfos, nonViolatingPodInfos
|
||||
}
|
||||
|
||||
func getPDBLister(informerFactory informers.SharedInformerFactory, enablePodDisruptionBudget bool) policylisters.PodDisruptionBudgetLister {
|
||||
if enablePodDisruptionBudget {
|
||||
return informerFactory.Policy().V1().PodDisruptionBudgets().Lister()
|
||||
}
|
||||
return nil
|
||||
func getPDBLister(informerFactory informers.SharedInformerFactory) policylisters.PodDisruptionBudgetLister {
|
||||
return informerFactory.Policy().V1().PodDisruptionBudgets().Lister()
|
||||
}
|
||||
|
@@ -365,7 +365,7 @@ func TestPostFilter(t *testing.T) {
|
||||
p := DefaultPreemption{
|
||||
fh: f,
|
||||
podLister: informerFactory.Core().V1().Pods().Lister(),
|
||||
pdbLister: getPDBLister(informerFactory, true),
|
||||
pdbLister: getPDBLister(informerFactory),
|
||||
args: *getDefaultDefaultPreemptionArgs(),
|
||||
}
|
||||
|
||||
@@ -1113,7 +1113,7 @@ func TestDryRunPreemption(t *testing.T) {
|
||||
pl := &DefaultPreemption{
|
||||
fh: fwk,
|
||||
podLister: informerFactory.Core().V1().Pods().Lister(),
|
||||
pdbLister: getPDBLister(informerFactory, true),
|
||||
pdbLister: getPDBLister(informerFactory),
|
||||
args: *tt.args,
|
||||
}
|
||||
|
||||
@@ -1361,7 +1361,7 @@ func TestSelectBestCandidate(t *testing.T) {
|
||||
pl := &DefaultPreemption{
|
||||
fh: fwk,
|
||||
podLister: informerFactory.Core().V1().Pods().Lister(),
|
||||
pdbLister: getPDBLister(informerFactory, true),
|
||||
pdbLister: getPDBLister(informerFactory),
|
||||
args: *getDefaultDefaultPreemptionArgs(),
|
||||
}
|
||||
pe := preemption.Evaluator{
|
||||
@@ -1698,7 +1698,7 @@ func TestPreempt(t *testing.T) {
|
||||
pl := DefaultPreemption{
|
||||
fh: fwk,
|
||||
podLister: informerFactory.Core().V1().Pods().Lister(),
|
||||
pdbLister: getPDBLister(informerFactory, true),
|
||||
pdbLister: getPDBLister(informerFactory),
|
||||
args: *getDefaultDefaultPreemptionArgs(),
|
||||
}
|
||||
|
||||
|
@@ -20,8 +20,6 @@ package feature
|
||||
// This struct allows us to break the dependency of the plugins on
|
||||
// the internal k8s features pkg.
|
||||
type Features struct {
|
||||
EnablePodAffinityNamespaceSelector bool
|
||||
EnablePodDisruptionBudget bool
|
||||
EnableReadWriteOncePod bool
|
||||
EnableVolumeCapacityPriority bool
|
||||
EnableMinDomainsInPodTopologySpread bool
|
||||
|
@@ -45,7 +45,6 @@ import (
|
||||
// through the WithFrameworkOutOfTreeRegistry option.
|
||||
func NewInTreeRegistry() runtime.Registry {
|
||||
fts := plfeature.Features{
|
||||
EnablePodDisruptionBudget: feature.DefaultFeatureGate.Enabled(features.PodDisruptionBudget),
|
||||
EnableReadWriteOncePod: feature.DefaultFeatureGate.Enabled(features.ReadWriteOncePod),
|
||||
EnableVolumeCapacityPriority: feature.DefaultFeatureGate.Enabled(features.VolumeCapacityPriority),
|
||||
EnableMinDomainsInPodTopologySpread: feature.DefaultFeatureGate.Enabled(features.MinDomainsInPodTopologySpread),
|
||||
|
Reference in New Issue
Block a user