Basic Prometheus support (#28)

Co-authored-by: Marco Franssen <[email protected]>
This commit is contained in:
kfox1111
2023-02-24 22:39:15 +01:00
committed by GitHub
co-authored by Marco Franssen
parent 495d9d67e8
commit 35eb3bb42e
15 changed files with 114 additions and 7 deletions
@@ -30,6 +30,8 @@ A Helm chart to install the SPIRE agent.
| serviceAccount.annotations | object | `{}` | |
| serviceAccount.create | bool | `true` | |
| serviceAccount.name | string | `""` | |
| telemetry.prometheus.enabled | bool | `false` | |
| telemetry.prometheus.port | int | `9988` | |
| trustDomain | string | `"example.org"` | |
| waitForIt.image.pullPolicy | string | `"IfNotPresent"` | |
| waitForIt.image.registry | string | `"cgr.dev"` | |
@@ -51,3 +51,12 @@ data:
live_path = "/live"
ready_path = "/ready"
}
{{- if (dig "telemetry" "prometheus" "enabled" .Values.telemetry.prometheus.enabled .Values.global) }}
telemetry {
Prometheus {
host = "0.0.0.0"
port = {{ .Values.telemetry.prometheus.port }}
}
}
{{- end }}
@@ -1,3 +1,4 @@
{{- $configSum := (include (print $.Template.BasePath "/configmap.yaml") . | sha256sum) }}
apiVersion: apps/v1
kind: DaemonSet
metadata:
@@ -11,10 +12,11 @@ spec:
{{- include "spire-agent.selectorLabels" . | nindent 6 }}
template:
metadata:
{{- with .Values.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
checksum/config: {{ $configSum }}
{{- with .Values.podAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "spire-agent.selectorLabels" . | nindent 8 }}
spec:
@@ -46,6 +48,10 @@ spec:
ports:
- containerPort: {{ .Values.healthChecks.port }}
name: healthz
{{- if (dig "telemetry" "prometheus" "enabled" .Values.telemetry.prometheus.enabled .Values.global) }}
- containerPort: {{ .Values.telemetry.prometheus.port }}
name: prom
{{- end }}
volumeMounts:
- name: spire-config
mountPath: /run/spire/config
@@ -79,3 +79,8 @@ workloadAttestors:
unix:
# -- enables the Unix workload attestor
enabled: false
telemetry:
prometheus:
enabled: false
port: 9988