fleet icon indicating copy to clipboard operation
fleet copied to clipboard

fix: collect dump metrics services across namespaces

Open immanuwell opened this issue 6 months ago • 0 comments

fixes a small hole in fleet dump metrics collection.

right now it only looks in cattle-fleet-system. that misses metrics when Fleet is installed in another Helm release namespace, which is a normal setup.

how to repro:

  1. install Fleet with metrics enabled into a namespace like custom-fleet-system
  2. run fleet dump -p dump.tgz
  3. no metrics_* files show up, even though monitoring-fleet-controller* and monitoring-gitjob* services exist

what changed:

  • list monitoring services across namespaces
  • keep the monitoring- name filter, so scope stays tight
  • include namespace in metrics archive filenames, just in case names overlap

tests:

  • added a regression test for a monitoring service in a non-default namespace
  • ran go test ./internal/cmd/cli/dump ./internal/cmd/cli ./internal/cmd/cli/apply -count=1

immanuwell avatar May 24 '26 13:05 immanuwell