Skip to content

feat(helm): expose exporter.staleness_threshold#77

Merged
softberries merged 1 commit intomainfrom
feat/helm-staleness-threshold
Apr 21, 2026
Merged

feat(helm): expose exporter.staleness_threshold#77
softberries merged 1 commit intomainfrom
feat/helm-staleness-threshold

Conversation

@softberries
Copy link
Copy Markdown
Member

Summary

  • Adds conditional rendering for exporter.staleness_threshold in configmap.yaml.
  • Adds commented example + docstring in values.yaml under config.exporter.

Follow-up to #76 (already merged), which added the staleness_threshold config field to the code but didn't surface it in the helm chart.

Behavior

  • Operators who don't set config.exporter.staleness_threshold get no new rendering — the code's default (poll_interval × 3) kicks in, matching the old hard-coded 90s at the default 30s poll interval.
  • Operators with long poll intervals (e.g. 4m) can either rely on the new default scaling or pin an explicit duration.

Changes

  • helm/klag-exporter/templates/configmap.yaml{{- if .staleness_threshold }} block under [exporter].
  • helm/klag-exporter/values.yaml — commented # staleness_threshold: "3m" with a short rationale.

Test plan

  • helm template against a values file that omits staleness_threshold → line is not rendered in the output ConfigMap.
  • helm template with staleness_threshold: "5m" set → staleness_threshold = "5m" appears under [exporter].
  • Deployed exporter starts up and logs the configured threshold at INFO.

Support the new staleness_threshold config field (merged in #76) from
the helm chart. Rendered conditionally so operators who omit it fall
back to the code's poll_interval*3 default.
Copilot AI review requested due to automatic review settings April 17, 2026 12:28
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Exposes the existing exporter.staleness_threshold application setting through the Helm chart so operators can optionally configure it via values.

Changes:

  • Adds conditional rendering of staleness_threshold under the [exporter] TOML section when the value is set.
  • Documents the setting in values.yaml with rationale and an example.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
helm/klag-exporter/templates/configmap.yaml Conditionally emits staleness_threshold = "…" under [exporter] based on Values.config.exporter.staleness_threshold.
helm/klag-exporter/values.yaml Adds inline documentation and a commented example for config.exporter.staleness_threshold.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

softberries added a commit that referenced this pull request Apr 17, 2026
Add a commented example under the main [exporter] config block, and a
note in the large-cluster scaling section explaining that the default
auto-scales with poll_interval (poll_interval * 3).

Code landed in #76, helm support in #77.
Copy link
Copy Markdown
Contributor

@gkocur gkocur left a comment

Choose a reason for hiding this comment

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

LGTM

@softberries softberries merged commit 8831c04 into main Apr 21, 2026
12 checks passed
@hashedone hashedone mentioned this pull request Apr 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants