Skip to content

Commit

Permalink
Set logger for controller-runtime
Browse files Browse the repository at this point in the history
Signed-off-by: Ruofeng Lei <[email protected]>
  • Loading branch information
abowloflrf committed Mar 4, 2021
1 parent 1593493 commit e4ce128
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions adapter/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import (
"k8s.io/client-go/kubernetes/scheme"
"k8s.io/klog/v2"
"k8s.io/klog/v2/klogr"
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/controller-runtime/pkg/client/config"

Expand Down Expand Up @@ -132,6 +133,8 @@ func main() {
return
}

ctrl.SetLogger(logger)

globalHTTPTimeoutStr := os.Getenv("KEDA_HTTP_DEFAULT_TIMEOUT")
if globalHTTPTimeoutStr == "" {
// default to 3 seconds if they don't pass the env var
Expand Down

0 comments on commit e4ce128

Please sign in to comment.