Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,11 @@ spec:
- name: docker
mountPath: /var/lib/docker
readOnly: true
{{- if and .Values.nodeCollector.cadvisor.containerdSocket .Values.nodeCollector.cadvisor.containerdSocket.enabled }}
- name: containerdsock
mountPath: {{ .Values.nodeCollector.cadvisor.containerdSocket.mountPath | quote }}
readOnly: true
{{- end }}
- name: container-metrics-collector
securityContext:
{{- toYaml .Values.nodeCollector.containerMetricsCollector.securityContext | nindent 12 }}
Expand Down Expand Up @@ -133,6 +138,12 @@ spec:
- name: docker
hostPath:
path: /var/lib/docker
{{- if and .Values.nodeCollector.cadvisor.containerdSocket .Values.nodeCollector.cadvisor.containerdSocket.enabled }}
- name: containerdsock
hostPath:
path: {{ .Values.nodeCollector.cadvisor.containerdSocket.hostPath | quote }}
type: Socket
{{- end }}
{{- if .Values.tlsCommunication.enabled }}
- name: checkmk-ca-cert
secret:
Expand Down
29 changes: 29 additions & 0 deletions deploy/charts/checkmk/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,35 @@ nodeCollector:
cpu: 150m
memory: 200Mi

# Configuration for containerd socket (used by cadvisor in the node collector).
# This section is optional and only needed if CPU/Memory metrics are missing the required labels.
# Access to the container runtime socket (e.g., for metrics collection).
# Known limitation:
# - When Kubernetes nodes run with cgroup v2 (common in newer distros),
# cAdvisor cannot properly map container metadata (pod name, namespace, labels)
# from cgroups alone.
# - To work around this, the container runtime socket must be mounted inside the cAdvisor pod
# so that cAdvisor can query containerd directly for metadata via its gRPC interface.
#
# To locate the correct socket path on your host node, run:
# find / -type s -name 'containerd.sock' 2>/dev/null
#
# The path varies depending on your Kubernetes setup:
# - MicroK8s: /var/snap/microk8s/common/run/containerd.sock
# - Standard containerd: /run/containerd/containerd.sock
# - k3s: /run/k3s/containerd/containerd.sock
#
# mountPath is where the socket is available inside the container.
# hostPath is the full path to the socket file on the Kubernetes node.
#
# Example to enable:
# containerdSocket:
# enabled: true
# name: containerdsock
# mountPath: /var/snap/microk8s/common/run/containerd.sock
# hostPath: /var/snap/microk8s/common/run/containerd.sock


containerMetricsCollector:
image:
repository: checkmk/kubernetes-collector
Expand Down