Skip to content

fix/node-exporter: Drop the leftover sourcegraph-resource-requires label from the node-exporter Service - #1040

Merged
marcleblanc2 merged 1 commit into
michael/opt-in-labelsfrom
marc/node-exporter-drop-resource-requires
Dec 1, 2026
Merged

marcleblanc2 merged 1 commit into
michael/opt-in-labelsfrom
marc/node-exporter-drop-resource-requires

Conversation

@marcleblanc2

@marcleblanc2 marcleblanc2 commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

Stacked on #1039, which merges into #1038 (michael/opt-in-labels)

Context

  • The old deprecated Kustomize deployment method (sourcegraph/deploy-sourcegraph) labeled each resource with sourcegraph-resource-requires: cluster-admin | no-cluster-admin

  • This chart started as a copy of those manifests

  • Miscellaneous fixes #7 removed the label from all 69 objects in the Helm chart

  • add node exporter daemonset #194 brought one copy back on the node-exporter Service

  • Nothing in the sourcegraph org selects on it: no selector, script, code, or docs page

Problem

Solution

  • Remove the hard-coded label from the node-exporter Service, the last object in this chart that set it

  • Users who want it set it in sourcegraph.labels, sourcegraph.serviceLabels, or nodeExporter.serviceLabels, and it renders once

  • node-exporter metrics lose the sourcegraph_resource_requires label, which no bundled dashboard or alert queries, so their series are replaced once on upgrade

Testing

Amp threads

Changelog

Removed the deprecated sourcegraph-resource-requires: no-cluster-admin label from the node-exporter Service; set it in sourcegraph.serviceLabels or nodeExporter.serviceLabels if needed to keep it

…r Service

The label is left over from the old kubectl apply install, which split an
install between cluster admins and other users with
kubectl apply -l sourcegraph-resource-requires=..., and nothing selects on it.
The chart removed it from every other object in #7, and node-exporter brought
one copy back in #194.

Hard-coded after the label helper, it rendered the key twice when
sourcegraph.serviceLabels or nodeExporter.serviceLabels also set it, which
Kustomize and kubeconform -strict reject.

Co-authored-by: Amp <amp@ampcode.com>
Amp-Thread-ID: https://ampcode.com/threads/T-01a21663-f060-7148-8fdc-8eed219fa092
@github-actions

github-actions Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

Base automatically changed from marc/otel-collector-configmap-metrics to michael/opt-in-labels November 30, 2026 20:59
@marcleblanc2
marcleblanc2 merged commit 05c534f into michael/opt-in-labels Dec 1, 2026
11 checks passed
@marcleblanc2
marcleblanc2 deleted the marc/node-exporter-drop-resource-requires branch December 1, 2026 08: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.

1 participant