kubebuilder icon indicating copy to clipboard operation
kubebuilder copied to clipboard

Controller-pod log time format is not human readable

Open astraw99 opened this issue 3 years ago • 0 comments
trafficstars

What broke? What's expected?

Using the latest kubebuilder cli, quick start a new project based on the official document. After make deploy IMG=xxx/xxx:tag, the controller-pod log time is just long numbers (1.6656692709539523e+09):

1.6656692709539523e+09  INFO    controller-runtime.metrics      Metrics server is starting to listen    {"addr": "127.0.0.1:8080"}
1.665669270954326e+09   INFO    setup   starting manager
1.6656692709546785e+09  INFO    Starting server {"path": "/metrics", "kind": "metrics", "addr": "127.0.0.1:8080"}
1.6656692709546802e+09  INFO    Starting server {"kind": "health probe", "addr": "[::]:8081"}
I1013 13:54:30.954681       1 leaderelection.go:248] attempting to acquire leader lease demo/demo-controller-manager...
I1013 13:54:30.961182       1 leaderelection.go:258] successfully acquired lease demo/demo-controller-manager
1.6656692709613848e+09  INFO    Starting EventSource    {"controller": "demo", "controllerGroup": "demo.domain.com", "controllerKind": "Demo", "source": "kind source: *v1beta1.Demo"}
1.66566927096143e+09    INFO    Starting Controller     {"controller": "demo", "controllerGroup": "demo.domain.com", "controllerKind": "Demo"}
1.6656692709612472e+09  DEBUG   events  demo-controller-manager-5fdd9c945d-6dgmr_0bba29ee-109a-4ced-add9-d773c4ff839f became leader     {"type": "Normal", "object": {"kind":"Lease","namespace":"demo","name":"demo-controller-manager","uid":"dc9449e9-d589-4c2e-a0ab-5835f4ab96a4","apiVersion":"coordination.k8s.io/v1","resourceVersion":"130007662"}, "reason": "LeaderElection"}
1.665669271061787e+09   INFO    Starting workers        {"controller": "demo", "controllerGroup": "demo.domain.com", "controllerKind": "Demo", "worker count": 1}

Should make it human readable like:

I1013 13:54:30.954681       1 leaderelection.go:248] attempting to acquire leader lease demo/demo-controller-manager...
I1013 13:54:30.961182       1 leaderelection.go:258] successfully acquired lease demo/demo-controller-manager

Reproducing this issue

Just quick start a new project based on the official document, then will reproduce this issue.

KubeBuilder (CLI) Version

Version: main.version{KubeBuilderVersion:"3.7.0", KubernetesVendor:"1.24.1", GitCommit:"3bfc84ec8767fa760d1771ce7a0cb05a9a8f6286", BuildDate:"2022-09-20T17:21:57Z", GoOs:"darwin", GoArch:"amd64"}

PROJECT version

No response

Plugin versions

No response

Other versions

No response

Extra Labels

No response

astraw99 avatar Oct 13 '22 15:10 astraw99