disable metrics
This commit is contained in:
parent
8ad7ee2d50
commit
fb816896d7
4
main.go
4
main.go
|
@ -45,9 +45,7 @@ func init() {
|
||||||
}
|
}
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
var metricsAddr string
|
|
||||||
var enableLeaderElection bool
|
var enableLeaderElection bool
|
||||||
flag.StringVar(&metricsAddr, "metrics-addr", ":0", "The address the metric endpoint binds to.")
|
|
||||||
flag.BoolVar(&enableLeaderElection, "enable-leader-election", false,
|
flag.BoolVar(&enableLeaderElection, "enable-leader-election", false,
|
||||||
"Enable leader election for controller manager. "+
|
"Enable leader election for controller manager. "+
|
||||||
"Enabling this will ensure there is only one active controller manager.")
|
"Enabling this will ensure there is only one active controller manager.")
|
||||||
|
@ -57,7 +55,7 @@ func main() {
|
||||||
|
|
||||||
mgr, err := ctrl.NewManager(ctrl.GetConfigOrDie(), ctrl.Options{
|
mgr, err := ctrl.NewManager(ctrl.GetConfigOrDie(), ctrl.Options{
|
||||||
Scheme: scheme,
|
Scheme: scheme,
|
||||||
MetricsBindAddress: metricsAddr,
|
MetricsBindAddress: "0",
|
||||||
Port: 9443,
|
Port: 9443,
|
||||||
LeaderElection: enableLeaderElection,
|
LeaderElection: enableLeaderElection,
|
||||||
LeaderElectionID: "674006ec.seaweedfs.com",
|
LeaderElectionID: "674006ec.seaweedfs.com",
|
||||||
|
|
Loading…
Reference in New Issue