Skip to content

Commit

Permalink
fix(operator): do not panic if cannot set GOMAXPROCS
Browse files Browse the repository at this point in the history
Closes apache#4299

(cherry picked from commit apache/camel-k@edd3a2a59)
  • Loading branch information
squakez authored and github-actions[bot] committed May 3, 2023
1 parent 230de54 commit 3eac360
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/cmd/operator/operator.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,9 @@ func Run(healthPort, monitoringPort int32, leaderElection bool, leaderElectionID
klog.SetLogger(log.AsLogger())

_, err := maxprocs.Set(maxprocs.Logger(func(f string, a ...interface{}) { log.Info(fmt.Sprintf(f, a)) }))
exitOnError(err, "failed to set GOMAXPROCS from cgroups")
if err != nil {
log.Error(err, "failed to set GOMAXPROCS from cgroups")
}

printVersion()

Expand Down

0 comments on commit 3eac360

Please sign in to comment.