diff --git a/charts/actions-runner-controller/README.md b/charts/actions-runner-controller/README.md index 91c3608a..528ced34 100644 --- a/charts/actions-runner-controller/README.md +++ b/charts/actions-runner-controller/README.md @@ -32,6 +32,7 @@ _Default values are the defaults set in the charts values.yaml, some properties | `metrics.proxy.enabled` | Deploy kube-rbac-proxy container in controller pod | true | | `metrics.proxy.image.repository` | The "repository/image" of the kube-proxy container | quay.io/brancz/kube-rbac-proxy | | `metrics.proxy.image.tag` | The tag of the kube-proxy image to use when pulling the container | v0.10.0 | +| `metrics.serviceMonitorLabels` | Set labels to apply to ServiceMonitor resources | | | `imagePullSecrets` | Specifies the secret to be used when pulling the controller pod containers | | | `fullNameOverride` | Override the full resource names | | | `nameOverride` | Override the resource name prefix | | diff --git a/charts/actions-runner-controller/templates/controller.metrics.serviceMonitor.yaml b/charts/actions-runner-controller/templates/controller.metrics.serviceMonitor.yaml index 3e4cbffe..f0f6387a 100644 --- a/charts/actions-runner-controller/templates/controller.metrics.serviceMonitor.yaml +++ b/charts/actions-runner-controller/templates/controller.metrics.serviceMonitor.yaml @@ -4,6 +4,9 @@ kind: ServiceMonitor metadata: labels: {{- include "actions-runner-controller.labels" . | nindent 4 }} + {{- with .Values.metrics.serviceMonitorLabels }} + {{- toYaml . | nindent 4 }} + {{- end }} name: {{ include "actions-runner-controller.serviceMonitorName" . }} spec: endpoints: diff --git a/charts/actions-runner-controller/templates/githubwebhook.serviceMonitor.yaml b/charts/actions-runner-controller/templates/githubwebhook.serviceMonitor.yaml index 6b4bec73..c144ea9f 100644 --- a/charts/actions-runner-controller/templates/githubwebhook.serviceMonitor.yaml +++ b/charts/actions-runner-controller/templates/githubwebhook.serviceMonitor.yaml @@ -4,6 +4,9 @@ kind: ServiceMonitor metadata: labels: {{- include "actions-runner-controller.labels" . | nindent 4 }} + {{- with .Values.metrics.serviceMonitorLabels }} + {{- toYaml . | nindent 4 }} + {{- end }} name: {{ include "actions-runner-controller-github-webhook-server.serviceMonitorName" . }} spec: endpoints: diff --git a/charts/actions-runner-controller/values.yaml b/charts/actions-runner-controller/values.yaml index 7c68dd45..bfbd3158 100644 --- a/charts/actions-runner-controller/values.yaml +++ b/charts/actions-runner-controller/values.yaml @@ -70,6 +70,7 @@ service: metrics: serviceMonitor: false + serviceMonitorLabels: {} port: 8443 proxy: enabled: true