Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions cmd/gpu-operator/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,12 @@ func main() {
var enableLeaderElection bool
var leaderElectionNamespace string
var probeAddr string
var pprofAddr string
var renewDeadline time.Duration

flag.StringVar(&metricsAddr, "metrics-bind-address", ":8080", "The address the metric endpoint binds to.")
flag.StringVar(&pprofAddr, "pprof-bind-address", "",
"The address the pprof endpoint binds to (e.g. \":6060\"). Disabled when empty.")
flag.StringVar(&probeAddr, "health-probe-bind-address", ":8081", "The address the probe endpoint binds to.")
flag.BoolVar(&enableLeaderElection, "leader-elect", false,
"Enable leader election for controller manager. "+
Expand Down Expand Up @@ -136,6 +139,7 @@ func main() {
Scheme: scheme,
Metrics: metricsOptions,
HealthProbeBindAddress: probeAddr,
PprofBindAddress: pprofAddr,
LeaderElection: enableLeaderElection,
LeaderElectionNamespace: leaderElectionNamespace,
LeaderElectionID: "53822513.nvidia.com",
Expand Down
3 changes: 3 additions & 0 deletions deployments/gpu-operator/templates/operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ spec:
{{- if .Values.operator.logging.level }}
- --zap-log-level={{- .Values.operator.logging.level }}
{{- end }}
{{- end }}
{{- if .Values.operator.pprof.bindAddress }}
- --pprof-bind-address={{ .Values.operator.pprof.bindAddress }}
{{- end }}
env:
- name: WATCH_NAMESPACE
Expand Down
3 changes: 3 additions & 0 deletions deployments/gpu-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,9 @@ operator:
# Development Mode defaults(encoder=consoleEncoder,logLevel=Debug,stackTraceLevel=Warn)
# Production Mode defaults(encoder=jsonEncoder,logLevel=Info,stackTraceLevel=Error)
develMode: false
pprof:
# Bind address for the pprof profiling endpoint (e.g. ":6060"). Disabled when empty.
bindAddress: ""
resources:
limits:
cpu: 500m
Expand Down
Loading