Repository navigation
Migrate Kubernetes discovery rules to the Agent job helper - #565
Merged
Merged
Conversation
mtblz
approved these changes
Dec 1, 2026
mtblz
left a comment
Contributor
There was a problem hiding this comment.
Tested on k3s (3 nodes): upgrade from 3.7.182 to this branch with Agent v2.13.0 completed cleanly, only the child DaemonSet rolled, and every node discovered the same collector jobs with the same chart counts before and after.
Non-blocking: with image.tag pinned to v2.12.2 the new rules load but discover no jobs, with nothing in the logs. A template fail for tags below v2.12.3 would make that visible to users who upgrade the chart but keep an old pin.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Migrate the chart’s 26 Kubernetes discovery rules to the
jobhelper released in Netdata Agent v2.12.3 and included in v2.13.0. The helper passes pod and annotation values directly to collector jobs, preserving strings that contain YAML punctuation or line breaks. Agent change.Remove
sdconfig/child.ymland the sidecar templates and values guarded by the pre-v2.2 chart version check. The chart already defaults to Agent v2.13.0 and mountsk8s.confdirectly. Update the README to show how to override the bundled rules and how pods opt into generic Prometheus scraping.The rules keep
max_time_seriesfor Agent v2.12.3. Agent v2.13.0 continues to use its default Prometheus series limits.Validation
helm lint --strictand checked eight Helm render scenarios, including discovery disabled, a disabled child, an external ConfigMap, custom names and keys, and file and inline overrides.