Skip to content

Commit 0943b0b

Browse files
authored
Add a flag for configuring a pprof endpoint (#368)
Signed-off-by: Jason Parraga <sovietaced@gmail.com>
1 parent 297e430 commit 0943b0b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

cmd/main.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,10 @@ func main() {
7070
var metricsAddr string
7171
var enableLeaderElection bool
7272
var probeAddr string
73+
var pprofAddr string
7374
flag.StringVar(&metricsAddr, "metrics-bind-address", ":8080", "The address the metric endpoint binds to.")
7475
flag.StringVar(&probeAddr, "health-probe-bind-address", ":8081", "The address the probe endpoint binds to.")
76+
flag.StringVar(&pprofAddr, "pprof-bind-address", "", "The address the pprof endpoint binds to.")
7577
flag.BoolVar(&enableLeaderElection, "leader-elect", false,
7678
"Enable leader election for controller manager. "+
7779
"Enabling this will ensure there is only one active controller manager.")
@@ -93,6 +95,7 @@ func main() {
9395
Scheme: scheme,
9496
Metrics: metricsserver.Options{BindAddress: metricsAddr},
9597
HealthProbeBindAddress: probeAddr,
98+
PprofBindAddress: pprofAddr,
9699
LeaderElection: enableLeaderElection,
97100
LeaderElectionID: "b00891aa.armadaproject.io",
98101
Logger: setupLog,

0 commit comments

Comments
 (0)