From 056664fd891477887d8f21a0c0b21aaf0b4da058 Mon Sep 17 00:00:00 2001 From: Axel Schmidt Date: Wed, 22 May 2024 08:56:56 +0200 Subject: [PATCH 1/2] add chart option for cluster-collector to set cache-maxsize if a k8s-cluster generate more than 10000 metrics --- deploy/charts/checkmk/templates/cluster-collector-deploy.yaml | 1 + deploy/charts/checkmk/values.yaml | 3 +++ 2 files changed, 4 insertions(+) diff --git a/deploy/charts/checkmk/templates/cluster-collector-deploy.yaml b/deploy/charts/checkmk/templates/cluster-collector-deploy.yaml index e62f128..c41c509 100644 --- a/deploy/charts/checkmk/templates/cluster-collector-deploy.yaml +++ b/deploy/charts/checkmk/templates/cluster-collector-deploy.yaml @@ -47,6 +47,7 @@ spec: args: - "--log-level={{ .Values.clusterCollector.logLevel }}" - "--address={{ default "0.0.0.0" .Values.clusterCollector.address }}" + - "--cache-maxsize={{ defaulut "10000" .Values.clusterCollector.cacheMaxsize }}" - "--reader-whitelist={{ .Release.Namespace }}:{{ template "checkmk.serviceAccountName.checkmk" . }}" - "--writer-whitelist={{ .Release.Namespace }}:{{ template "checkmk.serviceAccountName.nodeCollector.containerMetricsCollector" . }},{{ .Release.Namespace }}:{{ template "checkmk.serviceAccountName.nodeCollector.machineSectionsCollector" . }}" {{- if .Values.tlsCommunication.enabled }} diff --git a/deploy/charts/checkmk/values.yaml b/deploy/charts/checkmk/values.yaml index ce566ab..7650b81 100644 --- a/deploy/charts/checkmk/values.yaml +++ b/deploy/charts/checkmk/values.yaml @@ -97,6 +97,9 @@ clusterCollector: # can be: "debug", "info", "warning" (default), "critical" logLevel: warning + # cacheMaxsize set the maximum number of metric entries the cluster collector can hold at a time + cacheMaxsize: "10000" + podAnnotations: {} podSecurityContext: {} From 66655a9edb8295d8293a5858b72ef70e352c79a5 Mon Sep 17 00:00:00 2001 From: Axel Schmidt Date: Wed, 22 May 2024 09:06:59 +0200 Subject: [PATCH 2/2] fix typo --- deploy/charts/checkmk/templates/cluster-collector-deploy.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy/charts/checkmk/templates/cluster-collector-deploy.yaml b/deploy/charts/checkmk/templates/cluster-collector-deploy.yaml index c41c509..5bf5ce1 100644 --- a/deploy/charts/checkmk/templates/cluster-collector-deploy.yaml +++ b/deploy/charts/checkmk/templates/cluster-collector-deploy.yaml @@ -47,7 +47,7 @@ spec: args: - "--log-level={{ .Values.clusterCollector.logLevel }}" - "--address={{ default "0.0.0.0" .Values.clusterCollector.address }}" - - "--cache-maxsize={{ defaulut "10000" .Values.clusterCollector.cacheMaxsize }}" + - "--cache-maxsize={{ default "10000" .Values.clusterCollector.cacheMaxsize }}" - "--reader-whitelist={{ .Release.Namespace }}:{{ template "checkmk.serviceAccountName.checkmk" . }}" - "--writer-whitelist={{ .Release.Namespace }}:{{ template "checkmk.serviceAccountName.nodeCollector.containerMetricsCollector" . }},{{ .Release.Namespace }}:{{ template "checkmk.serviceAccountName.nodeCollector.machineSectionsCollector" . }}" {{- if .Values.tlsCommunication.enabled }}