This commit is contained in:
Fabio Furushou 2025-09-18 16:00:46 +09:00 committed by GitHub
commit dc3a9f8768
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 29 additions and 0 deletions

View File

@ -122,6 +122,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 }}

View File

@ -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 }}

View File

@ -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".