File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import (
1111
1212 "github.com/postfinance/kubenurse/internal/kubenurse"
1313 corev1 "k8s.io/api/core/v1"
14+ "k8s.io/klog/v2"
1415 controllerruntime "sigs.k8s.io/controller-runtime"
1516 "sigs.k8s.io/controller-runtime/pkg/cache"
1617 "sigs.k8s.io/controller-runtime/pkg/client"
@@ -20,6 +21,8 @@ func main() {
2021 ctx , cancel := signal .NotifyContext (context .Background (), syscall .SIGINT , syscall .SIGTERM )
2122 defer cancel ()
2223
24+ controllerruntime .SetLogger (klog .Background ())
25+
2326 restConf , err := controllerruntime .GetConfig ()
2427 if err != nil {
2528 slog .Error ("error during controllerruntime.GetConfig()" , "err" , err )
@@ -36,7 +39,6 @@ func main() {
3639 & corev1.Node {}: {},
3740 },
3841 })
39-
4042 if err != nil {
4143 slog .Error ("error during cache creation" , "err" , err )
4244 return
You can’t perform that action at this time.
0 commit comments