fleet
fleet copied to clipboard
fix: collect dump metrics services across namespaces
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:
- install Fleet with metrics enabled into a namespace like
custom-fleet-system - run
fleet dump -p dump.tgz - no
metrics_*files show up, even thoughmonitoring-fleet-controller*andmonitoring-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