Sitelet https://github.com/NVIDIA/dcgm-exporter/pull/739
Skip to content

feat(chart): expose ServiceMonitor attachMetadata - #739

Open
git-jxj wants to merge 1 commit into
NVIDIA:mainfrom
git-jxj:git-jxj/add-servicemonitor-attach-metadata
Open

git-jxj wants to merge 1 commit into
NVIDIA:mainfrom
git-jxj:git-jxj/add-servicemonitor-attach-metadata

Conversation

@git-jxj

@git-jxj git-jxj commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

Summary

  • pass serviceMonitor.attachMetadata through to the rendered ServiceMonitor
  • keep the field omitted by default so existing chart output is unchanged
  • document node-metadata relabeling and the Prometheus version/RBAC prerequisites
  • cover enabled, default-empty, and disabled rendering behavior

This allows the values already shown in #529 to expose Kubernetes node discovery metadata such as __meta_kubernetes_node_label_* to relabeling rules.

Fixes #529

Validation

  • go test ./tests/static -count=1
  • helm lint deployment --set serviceMonitor.attachMetadata.node=true
  • make check-fmt
  • make lint LINT_BASE_REV=origin/main (0 issues)
  • baseline reproduction: helm template ... --set serviceMonitor.attachMetadata.node=true omitted the field before this change; the updated chart renders spec.attachMetadata.node: true

@git-jxj

git-jxj commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor Author

Rebased onto current main and resolved the chart README conflict in cefad3d41627, retaining the upstream Concurrent Scrape and Detached GPU documentation together with this PR ServiceMonitor node-metadata section. Local validation passes: helm lint deployment --set serviceMonitor.attachMetadata.node=true and go test ./tests/static -count=1. Could a maintainer approve the workflow run for this new head so hosted CI can validate it?

Pass attachMetadata through to the rendered ServiceMonitor so Prometheus can expose node discovery metadata for relabeling. Document the Prometheus and RBAC prerequisites and cover the rendered chart contract.

Signed-off-by: git-jxj <65210887+git-jxj@users.noreply.github.com>
@git-jxj
git-jxj force-pushed the git-jxj/add-servicemonitor-attach-metadata branch from b5bf796 to cefad3d Compare September 21, 2026 06:06

This branch has not been deployed

No deployments
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.

Not seeing pod labels after setting enablePodLabels: true

1 participant