Skip to content

Commit 81c2ff6

Browse files
committed
refactor: addition of metrics address
1 parent 72fb349 commit 81c2ff6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

cmd/kar-controllers/app/options/options.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ type ServerOption struct {
5656
QuotaRestURL string
5757
HealthProbeListenAddr string
5858
DispatchResourceReservationTimeout int64
59+
MetricsListenAddr string
5960
}
6061

6162
// NewServerOption creates a new CMServer with a default config.
@@ -82,6 +83,8 @@ func (s *ServerOption) AddFlags(fs *flag.FlagSet) {
8283
fs.StringVar(&s.QuotaRestURL, "quotaURL", s.QuotaRestURL, "URL for ReST quota management. Default is none.")
8384
fs.IntVar(&s.SecurePort, "secure-port", 6443, "The port on which to serve secured, authenticated access for metrics.")
8485
fs.StringVar(&s.HealthProbeListenAddr, "healthProbeListenAddr", ":8081", "Listen address for health probes. Defaults to ':8081'")
86+
// using port 8083 for metrics as 8082 is used by `custom-metrics-apiserver`
87+
fs.StringVar(&s.MetricsListenAddr, "metricsListenAddr", ":8083", "Listen address for metrics. Defaults to ':8083'")
8588
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")
8689
flag.Parse()
8790
klog.V(4).Infof("[AddFlags] Controller configuration: %#v", s)

0 commit comments

Comments
 (0)