Skip to content
Open
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 cns/service/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ import (
"sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/controller-runtime/pkg/controller/controllerutil"
"sigs.k8s.io/controller-runtime/pkg/healthz"
ctrllog "sigs.k8s.io/controller-runtime/pkg/log"
ctrlmgr "sigs.k8s.io/controller-runtime/pkg/manager"
ctrlmetrics "sigs.k8s.io/controller-runtime/pkg/metrics/server"
)
Expand Down Expand Up @@ -851,6 +852,9 @@ func main() {
// Add APIServer FQDN to Log metadata
logger.Log.SetAPIServer(os.Getenv("KUBERNETES_SERVICE_HOST"))

// set logger in ctrlruntime
ctrllog.SetLogger(zapr.NewLogger(z))

// Check the CNI statefile mount, and if the file is empty
// stub an empty JSON object
if err := cnipodprovider.WriteObjectToCNIStatefile(); err != nil { //nolint:govet //shadow okay
Expand Down
Loading