Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple Logging Format #11

Open
mtataol opened this issue Oct 27, 2022 · 0 comments
Open

Multiple Logging Format #11

mtataol opened this issue Oct 27, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@mtataol
Copy link

mtataol commented Oct 27, 2022

What happened?

Kubebuilder uses github.com/go-logr/logr in controller logs but github.com/mittwald/go-helm-client uses it's own logger. Controller dumps logs in two different format, it should be all migrated to Kubebuilder's.
Example:

1.6668678216296868e+09	INFO	submarineroperator-resource	default	{"name": "submariner-sample-operator"}
1.6668678216301413e+09	DEBUG	controller-runtime.webhook.webhooks	wrote response	{"webhook": "/mutate-connection-hub-roboscale-io-v1alpha1-submarineroperator", "code": 200, "reason": "", "UID": "9fd38543-19e1-4876-bd7c-9df6fbefc076", "allowed": true}
1.6668678216391764e+09	DEBUG	controller-runtime.webhook.webhooks	received request	{"webhook": "/validate-connection-hub-roboscale-io-v1alpha1-submarineroperator", "UID": "4be0d3d3-5768-44bc-ade5-33182108e4e9", "kind": "connection-hub.roboscale.io/v1alpha1, Kind=SubmarinerOperator", "resource": {"group":"connection-hub.roboscale.io","version":"v1alpha1","resource":"submarineroperators"}}
1.6668678216395795e+09	INFO	submarineroperator-resource	validate update{"name": "submariner-sample-operator"}
1.6668678216396165e+09	DEBUG	controller-runtime.webhook.webhooks	wrote response	{"webhook": "/validate-connection-hub-roboscale-io-v1alpha1-submarineroperator", "code": 200, "reason": "", "UID": "4be0d3d3-5768-44bc-ade5-33182108e4e9", "allowed": true}
1.666867821651269e+09	INFO	FINALIZER: Submariner Operator is deleted gracefully.	{"controller": "submarinerbroker", "controllerGroup": "connection-hub.roboscale.io", "controllerKind": "SubmarinerBroker", "SubmarinerBroker": {"name":"submariner-sample-broker"}, "namespace": "", "name": "submariner-sample-broker", "reconcileID": "4132fd66-9aed-459c-973e-3bfa8c57d220"}
1.666867821651563e+09	INFO	FINALIZER: Submariner Broker is being deleted.	{"controller": "submarinerbroker", "controllerGroup": "connection-hub.roboscale.io", "controllerKind": "SubmarinerBroker", "SubmarinerBroker": {"name":"submariner-sample-broker"}, "namespace": "", "name": "submariner-sample-broker", "reconcileID": "4132fd66-9aed-459c-973e-3bfa8c57d220"}
2022/10/27 10:50:21 WARNING: repository name "robolaunch" already exists
2022/10/27 10:50:21 uninstall: Deleting submariner-k8s-broker
2022/10/27 10:50:21 Starting delete for "submariner-k8s-broker-cluster" RoleBinding
2022/10/27 10:50:21 Starting delete for "submariner-k8s-broker-cluster" Role
2022/10/27 10:50:22 Starting delete for "submariner-k8s-broker-client" ServiceAccount
2022/10/27 10:50:22 purge requested for submariner-k8s-broker
2022/10/27 10:50:22 release uninstalled, response: &{0xc0003a0700 }

What did you expect to happen?

Controller logs should be in one format for debugging and tracing.

How can we reproduce it (as minimally and precisely as possible)?

After deploying the controller manager, run this to see controller logs:

kubectl logs --follow pod/$(kubectl get pods -n connection-hub-system | tail -n1 | awk '{print $1}') -n connection-hub-system -c manager

Then create a submariners.connection-hub.roboscale.io/v1alpha1 instance in another terminal.

Kubernetes version

➜  ~ kubectl version
Client Version: version.Info{Major:"1", Minor:"19", GitVersion:"v1.19.3", GitCommit:"1e11e4a2108024935ecfcb2912226cedeafd99df", GitTreeState:"clean", BuildDate:"2020-10-14T12:50:19Z", GoVersion:"go1.15.2", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"19", GitVersion:"v1.19.14", GitCommit:"0fd2b5afdfe3134d6e1531365fdb37dd11f54d1c", GitTreeState:"clean", BuildDate:"2021-08-11T18:02:17Z", GoVersion:"go1.15.15", Compiler:"gc", Platform:"linux/amd64"}

Container network interface (CNI) and version

kube-ovn

@mtataol mtataol added the bug Something isn't working label Oct 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant