Skip to content

Conversation

@Adirael
Copy link
Contributor

@Adirael Adirael commented Dec 10, 2025

One-line summary

Add a --log-level flag (default level info) to allow making log output less verbose.

Description

The default log level setting is very noisy when kube-metrics-adapter is deployed on large clusters. This may lead to performance and monitoring issues where important logs are lost due to volume.

Types of Changes

  • New feature (non-breaking change which adds functionality)
  • Configuration change

Review

List of tasks the reviewer must do to review the PR

  • Tests
  • Documentation
  • CHANGELOG

@zalando-robot
Copy link

Cannot start a pipeline due to:

No accountable user for this pipeline: no Zalando employee associated to this GitHub username

Click on pipeline status check Details link below for more information.

@Adirael Adirael force-pushed the feature/support-adjustable-log-level branch from 7797929 to c5ba301 Compare December 10, 2025 13:36
@zalando-robot
Copy link

Cannot start a pipeline due to:

No accountable user for this pipeline: no Zalando employee associated to this GitHub username

Click on pipeline status check Details link below for more information.

@Adirael Adirael changed the title Implement a --log-level flag that defaults to info Implement a --log-level flag Dec 10, 2025
func (o AdapterServerOptions) RunCustomMetricsAdapterServer(stopCh <-chan struct{}) error {
level, logErr := log.ParseLevel(o.LogLevel)
if logErr != nil {
log.Warnf("Invalid log level '%s', defaulting to info", o.LogLevel)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should rather fail fast, so use: Fatalf or people will configure it to save money/Storage/.. and then do not check if it is running correctly.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, let's just fail fast if this is set to a wrong value

@szuecs szuecs added the minor Minor changes, e.g. low risk config updates, changes that do not introduce a new API call. label Dec 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

minor Minor changes, e.g. low risk config updates, changes that do not introduce a new API call.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants