From 2ec9d4137c29a287eb3d9fd58a8764de19cf8bf3 Mon Sep 17 00:00:00 2001 From: hebestreit <8803424+hebestreit@users.noreply.github.com> Date: Wed, 18 Dec 2024 17:46:50 +0100 Subject: [PATCH] updated prometheus-exporter to latest version to support metrics on workload level Signed-off-by: hebestreit <8803424+hebestreit@users.noreply.github.com> --- .../templates/prometheus-exporter/deployment.yaml | 4 ++++ .../tests/__snapshot__/snapshot_test.yaml.snap | 4 +++- charts/kubescape-operator/tests/snapshot_test.yaml | 2 ++ charts/kubescape-operator/values.yaml | 5 ++++- 4 files changed, 13 insertions(+), 2 deletions(-) diff --git a/charts/kubescape-operator/templates/prometheus-exporter/deployment.yaml b/charts/kubescape-operator/templates/prometheus-exporter/deployment.yaml index d30eab4e..41edc4e0 100644 --- a/charts/kubescape-operator/templates/prometheus-exporter/deployment.yaml +++ b/charts/kubescape-operator/templates/prometheus-exporter/deployment.yaml @@ -63,6 +63,10 @@ spec: value: "{{ .Values.logger.level }}" - name: KS_LOGGER_NAME value: "{{ .Values.logger.name }}" + {{- if .Values.prometheusExporter.enableWorkloadMetrics }} + - name: ENABLE_WORKLOAD_METRICS + value: "true" + {{- end }} volumeMounts: - name: {{ .Values.global.cloudConfig }} mountPath: /etc/config diff --git a/charts/kubescape-operator/tests/__snapshot__/snapshot_test.yaml.snap b/charts/kubescape-operator/tests/__snapshot__/snapshot_test.yaml.snap index 89971f4f..ae18c2e6 100644 --- a/charts/kubescape-operator/tests/__snapshot__/snapshot_test.yaml.snap +++ b/charts/kubescape-operator/tests/__snapshot__/snapshot_test.yaml.snap @@ -4253,7 +4253,9 @@ all capabilities: value: info - name: KS_LOGGER_NAME value: zap - image: quay.io/kubescape/prometheus-exporter:v0.0.129 + - name: ENABLE_WORKLOAD_METRICS + value: "true" + image: quay.io/kubescape/prometheus-exporter:v0.2.0 imagePullPolicy: IfNotPresent livenessProbe: initialDelaySeconds: 3 diff --git a/charts/kubescape-operator/tests/snapshot_test.yaml b/charts/kubescape-operator/tests/snapshot_test.yaml index 4bc59d19..23699e2d 100644 --- a/charts/kubescape-operator/tests/snapshot_test.yaml +++ b/charts/kubescape-operator/tests/snapshot_test.yaml @@ -58,6 +58,8 @@ tests: kubevulnScheduler.scanSchedule: "1 2 3 4 5" nodeAgent.config.skipKernelVersionCheck: true storage.forceVirtualCrds: true + prometheusExporter: + enableWorkloadMetrics: true - it: minimal capabilities asserts: - matchSnapshot: {} diff --git a/charts/kubescape-operator/values.yaml b/charts/kubescape-operator/values.yaml index 8e888b18..04fd9e89 100644 --- a/charts/kubescape-operator/values.yaml +++ b/charts/kubescape-operator/values.yaml @@ -756,7 +756,7 @@ prometheusExporter: name: "prometheus-exporter" image: repository: quay.io/kubescape/prometheus-exporter - tag: v0.0.129 + tag: v0.2.0 pullPolicy: IfNotPresent resources: @@ -772,6 +772,9 @@ prometheusExporter: targetPort: 8080 protocol: TCP + enableWorkloadMetrics: false + + # +++++++++++++++++++++++++++++ Upgrader ++++++++++++++++++++++++++++++++++++++++++++++++ # Configures the Helm Release Upgrader