Skip to content

Migrate Kubernetes discovery rules to the Agent job helper - #565

Merged
ilyam8 merged 1 commit into
netdata:masterfrom
ilyam8:update-k8s-discovery-rules
Dec 1, 2026
Merged

ilyam8 merged 1 commit into
netdata:masterfrom
ilyam8:update-k8s-discovery-rules

Conversation

@ilyam8

@ilyam8 ilyam8 commented Dec 1, 2026

Copy link
Copy Markdown
Member

Summary

Migrate the chart’s 26 Kubernetes discovery rules to the job helper 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.yml and the sidecar templates and values guarded by the pre-v2.2 chart version check. The chart already defaults to Agent v2.13.0 and mounts k8s.conf directly. Update the README to show how to override the bundled rules and how pods opt into generic Prometheus scraping.

The rules keep max_time_series for Agent v2.12.3. Agent v2.13.0 continues to use its default Prometheus series limits.

Validation

  • Compared the jobs generated by the old and new rules for 36 pod cases on both Agent v2.12.3 and v2.13.0. All 26 rules were exercised and the jobs matched. Separately verified that a multiline annotation remained a single string.
  • Passed helm lint --strict and checked eight Helm render scenarios, including discovery disabled, a disabled child, an external ConfigMap, custom names and keys, and file and inline overrides.

@ilyam8
ilyam8 requested review from a team as code owners December 1, 2026 06:47
@ilyam8
ilyam8 requested review from mtblz and witalisoft December 1, 2026 06:47

@mtblz mtblz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

@ilyam8
ilyam8 merged commit 9fe1999 into netdata:master Dec 1, 2026
2 checks passed
@ilyam8
ilyam8 deleted the update-k8s-discovery-rules branch December 1, 2026 16:40
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.

2 participants