replicatedhq / troubleshoot

Preflight Checks and Support Bundles Framework for Kubernetes Applications
https://troubleshoot.sh
Apache License 2.0
543 stars 92 forks source link

feat: node metrics collector #1516

Closed banjoh closed 5 months ago

banjoh commented 5 months ago

Description, Motivation and Context

Node metrics collect used to collect node metrics gathered by kubelet and served by the API server.

Simple spec. This spec will collect metrics for all nodes in a cluster

apiVersion: troubleshoot.sh/v1beta2
kind: SupportBundle
spec:
  collectors:
    - nodeMetrics: {}

Spec that collects metrics filtered by node names and selectors

apiVersion: troubleshoot.sh/v1beta2
kind: SupportBundle
spec:
  collectors:
    - nodeMetrics:
        nodeNames:
          - worker-1
        selector:
          - node-role.kubernetes.io/control-plane=true

Fixes: https://github.com/replicatedhq/troubleshoot/issues/1496

Docs PR: https://github.com/replicatedhq/troubleshoot.sh/pull/552

Checklist

Does this PR introduce a breaking change?