-
Notifications
You must be signed in to change notification settings - Fork 893
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce feature gates for the scheduler component
Signed-off-by: iawia002 <[email protected]> Signed-off-by: Xinzhao Xu <[email protected]>
- Loading branch information
Showing
6 changed files
with
32 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package features | ||
|
||
import ( | ||
"k8s.io/apimachinery/pkg/util/runtime" | ||
"k8s.io/component-base/featuregate" | ||
) | ||
|
||
const ( | ||
// Failover indicates if scheduler should reschedule on cluster failure. | ||
Failover featuregate.Feature = "Failover" | ||
) | ||
|
||
var ( | ||
// FeatureGate is a shared global scheduler FeatureGate. | ||
FeatureGate featuregate.MutableFeatureGate = featuregate.NewFeatureGate() | ||
|
||
defaultFeatureGates = map[featuregate.Feature]featuregate.FeatureSpec{ | ||
Failover: {Default: false, PreRelease: featuregate.Alpha}, | ||
} | ||
) | ||
|
||
func init() { | ||
runtime.Must(FeatureGate.Add(defaultFeatureGates)) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters