Skip to content

Commit

Permalink
Merge pull request #573 from hebestreit/feature/prometheus-exporter-env
Browse files Browse the repository at this point in the history
allow prometheus-exporter to export metrics on workload level
  • Loading branch information
matthyx authored Dec 19, 2024
2 parents 7c5f94d + 2ec9d41 commit 31aa80f
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions charts/kubescape-operator/tests/snapshot_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: {}
Expand Down
5 changes: 4 additions & 1 deletion charts/kubescape-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -772,6 +772,9 @@ prometheusExporter:
targetPort: 8080
protocol: TCP

enableWorkloadMetrics: false


# +++++++++++++++++++++++++++++ Upgrader ++++++++++++++++++++++++++++++++++++++++++++++++

# Configures the Helm Release Upgrader
Expand Down

0 comments on commit 31aa80f

Please sign in to comment.