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

default log level should be shown in usage information #2407

Open
tcurdt opened this issue May 30, 2024 · 2 comments
Open

default log level should be shown in usage information #2407

tcurdt opened this issue May 30, 2024 · 2 comments
Assignees
Labels
kind/feature Categorizes issue or PR as related to a new feature. triage/accepted Indicates an issue or PR is ready to be actively worked on.

Comments

@tcurdt
Copy link

tcurdt commented May 30, 2024

What would you like to be added:

Currently:

 -v, --v Level                               number for the log level verbosity

Better:

 -v, --v Level                               number for the log level verbosity (default: 0)

Ideally also explain what each level means.

 -v, --v Level                               number for the log level verbosity (default: 0), increase for more verbose

Why is this needed:

Because it's hard to map the number to a value.

Describe the solution you'd like

See above.

Additional context

Based on docker run --rm -it k8s.gcr.io/kube-state-metrics/kube-state-metrics:v2.3.0 -

@tcurdt tcurdt added the kind/feature Categorizes issue or PR as related to a new feature. label May 30, 2024
@k8s-ci-robot k8s-ci-robot added the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label May 30, 2024
@tcurdt
Copy link
Author

tcurdt commented May 30, 2024

Speaking of which. I don't understand how to reduce the logging

I0530 20:40:31.458795       1 main.go:111] Using resources cronjobs,daemonsets,deployments,pods,statefulsets
I0530 20:40:31.458856       1 types.go:136] Using all namespace
I0530 20:40:31.458862       1 main.go:133] metric allow-denylisting: Excluding the following lists that were on denylist: 
W0530 20:40:31.458877       1 client_config.go:617] Neither --kubeconfig nor --master was specified.  Using the inClusterConfig.  This might not work.
I0530 20:40:31.459138       1 main.go:247] Testing communication with server
I0530 20:40:31.461477       1 main.go:252] Running with Kubernetes cluster version: v1.30. git version: v1.30.1+k3s1. git tree state: clean. commit: 80978b5b9a97908c5520c5ee51984e544e168859. platform: linux/arm64
I0530 20:40:31.461503       1 main.go:254] Communication with server successful
I0530 20:40:31.461601       1 main.go:210] Starting metrics server: [::]:8080
I0530 20:40:31.461710       1 metrics_handler.go:96] Autosharding disabled
I0530 20:40:31.461738       1 main.go:199] Starting kube-state-metrics self metrics server: [::]:8081
I0530 20:40:31.461747       1 main.go:66] levelinfomsgTLS is disabled.http2false
I0530 20:40:31.461759       1 main.go:66] levelinfomsgTLS is disabled.http2false
I0530 20:40:31.461851       1 builder.go:192] Active resources: cronjobs,daemonsets,deployments,pods,statefulsets
W0530 20:40:31.463933       1 reflector.go:324] pkg/mod/k8s.io/client-go@v0.23.0/tools/cache/reflector.go:167: failed to list *v1beta1.CronJob: the server could not find the requested resource
E0530 20:40:31.463957       1 reflector.go:138] pkg/mod/k8s.io/client-go@v0.23.0/tools/cache/reflector.go:167: Failed to watch *v1beta1.CronJob: failed to list *v1beta1.CronJob: the server could not find the requested resource

which here is with --v=0.

@dgrisonnet
Copy link
Member

/assign @richabanker
/triage accepted

@k8s-ci-robot k8s-ci-robot added triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Jun 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

No branches or pull requests

4 participants