google / cadvisor

Analyzes resource usage and performance characteristics of running containers.
Other
17.23k stars 2.33k forks source link

fix: containerd handler missing `restartCount` label #3585

Open chengjoey opened 2 months ago

chengjoey commented 2 months ago
root@localhost: crictl inspect 09eef3cd60125 | grep -i restart -C 5
      "version": "RELEASE.2022-11-17T23-20-09Z"
    },
    "annotations": {
      "io.kubernetes.container.hash": "cbda2490",
      "io.kubernetes.container.ports": "[{\"name\":\"api\",\"containerPort\":9000,\"protocol\":\"TCP\"},{\"name\":\"dashboard\",\"containerPort\":9001,\"protocol\":\"TCP\"}]",
      "io.kubernetes.container.restartCount": "1",
      "io.kubernetes.container.terminationMessagePath": "/dev/termination-log",
      "io.kubernetes.container.terminationMessagePolicy": "File",
      "io.kubernetes.pod.terminationGracePeriod": "30"
    },
    "mounts": [

containerd handler could get restartCount from spec.Annotations, like crio