You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: cmd/scheduler/app/options/options.go
+20-1
Original file line number
Diff line number
Diff line change
@@ -33,6 +33,11 @@ const (
33
33
34
34
defaultQPS=50.0
35
35
defaultBurst=100
36
+
37
+
// Default parameters to control the number of feasible nodes to find and score
38
+
defaultMinPercentageOfNodesToFind=5
39
+
defaultMinNodesToFind=100
40
+
defaultPercentageOfNodesToFind=100
36
41
)
37
42
38
43
// ServerOption is the main context object for the controller manager.
@@ -50,9 +55,14 @@ type ServerOption struct {
50
55
EnablePriorityClassbool
51
56
KubeAPIBurstint
52
57
KubeAPIQPSfloat32
53
-
// HealthzBindAddress is the IP address and port for the health check server to serve on,
58
+
// HealthzBindAddress is the IP address and port for the health check server to serve on
54
59
// defaulting to 127.0.0.1:11251
55
60
HealthzBindAddressstring
61
+
62
+
// Parameters for scheduling tuning: the number of feasible nodes to find and score
63
+
MinNodesToFindint32
64
+
MinPercentageOfNodesToFindint32
65
+
PercentageOfNodesToFindint32
56
66
}
57
67
58
68
// ServerOpts server options
@@ -84,6 +94,15 @@ func (s *ServerOption) AddFlags(fs *pflag.FlagSet) {
84
94
fs.Float32Var(&s.KubeAPIQPS, "kube-api-qps", defaultQPS, "QPS to use while talking with kubernetes apiserver")
85
95
fs.IntVar(&s.KubeAPIBurst, "kube-api-burst", defaultBurst, "Burst to use while talking with kubernetes apiserver")
86
96
fs.StringVar(&s.HealthzBindAddress, "healthz-bind-address", defaultHealthzBindAddress, "The address to listen on for /healthz HTTP requests.")
97
+
98
+
// Minimum number of feasible nodes to find and score
99
+
fs.Int32Var(&s.MinNodesToFind, "minimum-feasible-nodes", defaultMinNodesToFind, "The minimum number of feasible nodes to find and score")
100
+
101
+
// Minimum percentage of nodes to find and score
102
+
fs.Int32Var(&s.MinPercentageOfNodesToFind, "minimum-percentage-nodes-to-find", defaultMinPercentageOfNodesToFind, "The minimum percentage of nodes to find and score")
103
+
104
+
// The percentage of nodes that would be scored in each scheduling cycle; if <= 0, an adpative percentage will be calcuated
105
+
fs.Int32Var(&s.PercentageOfNodesToFind, "percentage-nodes-to-find", defaultPercentageOfNodesToFind, "The percentage of nodes to find and score, if <=0 will be calcuated based on the cluster size")
87
106
}
88
107
89
108
// CheckOptionOrDie check lock-object-namespace when LeaderElection is enabled
0 commit comments