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/kar-controllers/app/options/options.go
+6-4Lines changed: 6 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -21,6 +21,8 @@ import (
21
21
"os"
22
22
"strconv"
23
23
"strings"
24
+
25
+
klog "k8s.io/klog/v2"
24
26
)
25
27
26
28
// ServerOption is the main context object for the controller manager.
@@ -38,9 +40,9 @@ type ServerOption struct {
38
40
HeadOfLineHoldingTimeint
39
41
QuotaEnabledbool// Controller is to evaluate quota per request
40
42
QuotaRestURLstring
41
-
HealthProbeListenAddrstring
43
+
HealthProbeListenPortint
42
44
DispatchResourceReservationTimeoutint64
43
-
MetricsListenAddrstring
45
+
MetricsListenPortint
44
46
}
45
47
46
48
// NewServerOption creates a new CMServer with a default config.
@@ -65,9 +67,9 @@ func (s *ServerOption) AddFlags(fs *flag.FlagSet) {
65
67
fs.BoolVar(&s.QuotaEnabled, "quotaEnabled", s.QuotaEnabled, "Enable quota policy evaluation. Default is false.")
66
68
fs.StringVar(&s.QuotaRestURL, "quotaURL", s.QuotaRestURL, "URL for ReST quota management. Default is none.")
67
69
fs.IntVar(&s.SecurePort, "secure-port", 6443, "The port on which to serve secured, authenticated access for metrics.")
68
-
fs.StringVar(&s.HealthProbeListenAddr, "healthProbeListenAddr", ":8081", "Listen address for health probes. Defaults to ':8081'")
70
+
fs.IntVar(&s.HealthProbeListenPort, "healthProbeListenPort", 8081, "Listen port for health probes. Defaults to ':8081'")
69
71
// using port 8083 for metrics as 8082 is used by `custom-metrics-apiserver`
70
-
fs.StringVar(&s.MetricsListenAddr, "metricsListenAddr", ":8083", "Listen address for metrics. Defaults to ':8083'")
72
+
fs.IntVar(&s.MetricsListenPort, "metricsListenPort", 8083, "Listen port for metrics. Defaults to ':8083'")
71
73
fs.Int64Var(&s.DispatchResourceReservationTimeout, "dispatchResourceReservationTimeout", s.DispatchResourceReservationTimeout, "Resource reservation timeout for pods to be created once AppWrapper is dispatched, in millisecond. Defaults to '300000', 5 minutes")
0 commit comments