Repository navigation
Fix robot externalLabels and disable cloud scrapes in robotmetrics - #1096
Merged
Merged
Conversation
liyin00
approved these changes
Oct 21, 2026
Why: Edge robot metrics scraped by vmagent lack robot and cluster labels, while the cloud robotmetrics chart creates duplicate kubelet and kube-apiserver scrape resources. **TL;DR:** Default robot and cluster labels in edge `vmagent` from `.Values.robot.name`, disable cloud kubelet and API server scrape resources on the robotmetrics proxy, and add default `vmstorage` resources. <details> <summary><b>📖 Detailed Review Guide</b> (click to expand)</summary> ### Problem - Edge `victoriametrics-robotmetrics-operator.yaml` copies `.Values.vmagent.spec.externalLabels` without merging `.Values.robot.name` from the rollout controller, leaving robot-scraped series without robot or cluster labels. - Cloud `victoriametrics-robotmetrics-cloud.values.yaml` disables node-exporter and kube-state-metrics on the cloud ingestion proxy, but leaves `kubelet` and `kubeApiServer` enabled so cloud vmagent-vmc double-scrapes cloud nodes and the API server. ### Changes - Populate default robot and cluster labels on edge `vmagent`. - Seeds `$externalLabelsMap` from `.Values.robot.name` before merging `.Values.vmagent.spec.externalLabels` so edge metrics match federated labels. - Disable cloud kubelet and API server scrape resource generation on the robotmetrics proxy chart. - Sets `kubelet.enabled: false` and `kubeApiServer.enabled: false` so the cloud robotmetrics chart stops emitting duplicate cluster scrape targets. - Add default `vmstorage` CPU and memory requests and limits in cloud values. - Defines 1000m/4Gi requests and 2000m/12Gi limits under `vmcluster.spec.vmstorage.resources`, matching the chart-level `limits` defaults (`values-cloud.yaml`). ### Review Focus #### Where to Look - Check `$externalLabelsMap` in `src/app_charts/victoriametrics/victoriametrics-robotmetrics/robot/victoriametrics-robotmetrics-operator.yaml`. - Verify `.Values.robot.name` sets default robot and cluster keys while allowing `.Values.vmagent.spec.externalLabels` entries to override or extend them. #### Gotchas - We populate `$externalLabelsMap` by iterating `.Values.vmagent.spec.externalLabels` with `range` instead of mutating it in place. - Because copying keys into a fresh dictionary avoids mutating `.Values` while preserving user-supplied external labels. ### Tested - Built `victoriametrics-robotmetrics` cloud and robot chart targets and verified 0 kubelet or kube-apiserver scrape resources in the rendered cloud manifest. ```bash bazel build \ //src/app_charts/victoriametrics/victoriametrics-robotmetrics:all ``` </details> Signed-off-by: methylDragon <methylDragon@intrinsic.ai>
methylDragon
force-pushed
the
ch3/victoriametrics-robotmetrics-fixes
branch
from
October 22, 2026 01:15
bc2f44f to
4296dac
Compare
methylDragon
enabled stacked auto-merge (squash)
October 22, 2026 01:15
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.
Why: Edge robot metrics scraped by vmagent lack robot and cluster labels, while the cloud robotmetrics chart creates duplicate kubelet and kube-apiserver scrape resources.
TL;DR: Default robot and cluster labels in edge
vmagentfrom.Values.robot.name, disable cloud kubelet and API server scrape resources on the robotmetrics proxy, and add defaultvmstorageresources.📖 Detailed Change Description (click to expand)
Problem
victoriametrics-robotmetrics-operator.yamlcopies.Values.vmagent.spec.externalLabelswithout merging.Values.robot.namefrom the rollout controller, leaving robot-scraped series without robot or cluster labels.victoriametrics-robotmetrics-cloud.values.yamldisables node-exporter and kube-state-metrics on the cloud ingestion proxy, but leaveskubeletandkubeApiServerenabled so cloud vmagent-vmc double-scrapes cloud nodes and the API server.Changes
vmagent.$externalLabelsMapfrom.Values.robot.namebefore merging.Values.vmagent.spec.externalLabelsso edge metrics match federated labels.kubelet.enabled: falseandkubeApiServer.enabled: falseso the cloud robotmetrics chart stops emitting duplicate cluster scrape targets.vmstorageCPU and memory requests and limits in cloud values.vmcluster.spec.vmstorage.resources, matching the chart-levellimitsdefaults (values-cloud.yaml).Review Focus
Where to Look
$externalLabelsMapinsrc/app_charts/victoriametrics/victoriametrics-robotmetrics/robot/victoriametrics-robotmetrics-operator.yaml..Values.robot.namesets default robot and cluster keys while allowing.Values.vmagent.spec.externalLabelsentries to override or extend them.Gotchas
$externalLabelsMapby iterating.Values.vmagent.spec.externalLabelswithrangeinstead of mutating it in place..Valueswhile preserving user-supplied external labels.Tested
victoriametrics-robotmetricscloud and robot chart targets and verified 0 kubelet or kube-apiserver scrape resources in the rendered cloud manifest.