mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-04 09:49:50 +00:00
Fix panic when defining feature gates only on workload level in scheduler_perf
This commit is contained in:
parent
7c53005b6c
commit
cca6f8c800
@ -1053,6 +1053,9 @@ func setupTestCase(t testing.TB, tc *testCase, featureGates map[featuregate.Feat
|
|||||||
}
|
}
|
||||||
|
|
||||||
func featureGatesMerge(src map[featuregate.Feature]bool, overrides map[featuregate.Feature]bool) map[featuregate.Feature]bool {
|
func featureGatesMerge(src map[featuregate.Feature]bool, overrides map[featuregate.Feature]bool) map[featuregate.Feature]bool {
|
||||||
|
if len(src) == 0 {
|
||||||
|
return maps.Clone(overrides)
|
||||||
|
}
|
||||||
result := maps.Clone(src)
|
result := maps.Clone(src)
|
||||||
for feature, enabled := range overrides {
|
for feature, enabled := range overrides {
|
||||||
result[feature] = enabled
|
result[feature] = enabled
|
||||||
|
Loading…
Reference in New Issue
Block a user