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
@@ -81,3 +81,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 = 9988
}
}
{{- end }}
@@ -14,7 +14,7 @@ data:
labels:
{{- include "spire-server.labels" . | nindent 8 }}
metrics:
bindAddress: 127.0.0.1:8082
bindAddress: 0.0.0.0:8082
healthProbe:
bindAddress: 127.0.0.1:8083
leaderElection:
@@ -1,3 +1,4 @@
{{- $configSum := (include (print $.Template.BasePath "/configmap.yaml") . | sha256sum) }}
{{- $fullname := include "spire-server.fullname" . }}
apiVersion: apps/v1
kind: StatefulSet
@@ -15,10 +16,11 @@ spec:
{{- include "spire-server.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-server.selectorLabels" . | nindent 8 }}
spec:
@@ -45,6 +47,10 @@ spec:
protocol: TCP
- containerPort: 8080
name: healthz
{{- if (dig "telemetry" "prometheus" "enabled" .Values.telemetry.prometheus.enabled .Values.global) }}
- containerPort: 9988
name: prom
{{- end }}
livenessProbe:
httpGet:
path: /live
@@ -92,6 +98,10 @@ spec:
protocol: TCP
- containerPort: 8008
name: healthz
{{- if (dig "telemetry" "prometheus" "enabled" .Values.telemetry.prometheus.enabled .Values.global) }}
- containerPort: 8082
name: prom2
{{- end }}
# TODO: implement probes
# livenessProbe:
# httpGet: