Add PodMonitor to gha-runner-scale-set-controller chart
This commit is contained in:
parent
a152741a1a
commit
6a850e9ea8
|
|
@ -111,6 +111,10 @@ Create the name of the service account to use
|
|||
{{- include "gha-runner-scale-set-controller.fullname" . }}-listener
|
||||
{{- end }}
|
||||
|
||||
{{- define "gha-runner-scale-set-controller.managerPodMonitor" -}}
|
||||
{{- include "gha-runner-scale-set-controller.fullname" . }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "gha-runner-scale-set-controller.leaderElectionRoleName" -}}
|
||||
{{- include "gha-runner-scale-set-controller.fullname" . }}-leader-election
|
||||
{{- end }}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,23 @@
|
|||
{{- if hasKey .Values "metrics" }}
|
||||
{{- if and (hasKey .Values.metrics "podMonitor") .Values.metrics.podMonitor.enabled }}
|
||||
apiVersion: monitoring.coreos.com/v1
|
||||
kind: PodMonitor
|
||||
metadata:
|
||||
labels:
|
||||
{{- include "gha-runner-scale-set-controller.labels" . | nindent 4 }}
|
||||
name: {{ include "gha-runner-scale-set-controller.managerPodMonitor" . }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
spec:
|
||||
podMetricsEndpoints:
|
||||
{{- with .Values.metrics }}
|
||||
- path: {{ .listenerEndpoint }}
|
||||
port: metrics
|
||||
{{- end }}
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "gha-runner-scale-set-controller.selectorLabels" . | nindent 6 }}
|
||||
namespaceSelector:
|
||||
matchNames:
|
||||
- {{ .Release.Namespace }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
|
@ -93,6 +93,8 @@ priorityClassName: ""
|
|||
# controllerManagerAddr: ":8080"
|
||||
# listenerAddr: ":8080"
|
||||
# listenerEndpoint: "/metrics"
|
||||
# podMonitor:
|
||||
# enabled: true
|
||||
|
||||
flags:
|
||||
## Log level can be set here with one of the following values: "debug", "info", "warn", "error".
|
||||
|
|
|
|||
Loading…
Reference in New Issue