diff --git a/charts/atlantis/Chart.yaml b/charts/atlantis/Chart.yaml index 81316299..96a2bd71 100644 --- a/charts/atlantis/Chart.yaml +++ b/charts/atlantis/Chart.yaml @@ -3,7 +3,7 @@ apiVersion: v1 appVersion: v0.30.0 description: A Helm chart for Atlantis https://www.runatlantis.io name: atlantis -version: 5.7.0 +version: 5.8.0 keywords: - terraform home: https://www.runatlantis.io diff --git a/charts/atlantis/README.md b/charts/atlantis/README.md index 36667512..932ef379 100644 --- a/charts/atlantis/README.md +++ b/charts/atlantis/README.md @@ -201,6 +201,7 @@ extraManifests: | servicemonitor.auth.externalSecret.name | string | `""` | | | servicemonitor.enabled | bool | `false` | To enable a Prometheus servicemonitor, set enabled to true, and enable the metrics in this file's repoConfig by setting a value for metrics.prometheus.endpoint. | | servicemonitor.interval | string | `"30s"` | | +| servicemonitor.metricRelabelings | list | `[]` | Optional metric relabelings to drop or modify metrics. | | servicemonitor.path | string | `"/metrics"` | | | statefulSet.annotations | object | `{}` | | | statefulSet.labels | object | `{}` | | diff --git a/charts/atlantis/templates/servicemonitor.yaml b/charts/atlantis/templates/servicemonitor.yaml index 660f19d6..aecb96f7 100644 --- a/charts/atlantis/templates/servicemonitor.yaml +++ b/charts/atlantis/templates/servicemonitor.yaml @@ -28,6 +28,10 @@ spec: - port: atlantis interval: {{ .Values.servicemonitor.interval }} path: {{ .Values.servicemonitor.path }} + {{- with .Values.servicemonitor.metricRelabelings }} + metricRelabelings: + {{- toYaml . | nindent 6 }} + {{- end }} {{- if .Values.servicemonitor.auth.basicAuth.enabled }} basicAuth: username: diff --git a/charts/atlantis/values.schema.json b/charts/atlantis/values.schema.json index 6a5caa21..af8ef852 100644 --- a/charts/atlantis/values.schema.json +++ b/charts/atlantis/values.schema.json @@ -1217,6 +1217,12 @@ } } } + }, + "metricRelabelings": { + "description": "Optional metric relabelings to drop or modify metrics.", + "items": {}, + "type": "array", + "default": [] } } }, diff --git a/charts/atlantis/values.yaml b/charts/atlantis/values.yaml index df2c9308..b3c9b67c 100644 --- a/charts/atlantis/values.yaml +++ b/charts/atlantis/values.yaml @@ -700,6 +700,12 @@ servicemonitor: # keys: # username: USERNAME # password: ATLANTIS_WEB_PASSWORD + # -- Optional metric relabelings to drop or modify metrics. + metricRelabelings: [] + # metricRelabelings: + # - action: drop + # regex: "atlantis_project_apply_execution_.*" + # sourceLabels: [__name__] # -- Enable this if you're using Google Managed Prometheus. podMonitor: