WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit a6ba6a3

Browse files
feat: add metricRelabelings support to ServiceMonitor (#433)
Signed-off-by: benjohnson-dev <[email protected]>
1 parent bc98b31 commit a6ba6a3

File tree

5 files changed

+18
-1
lines changed

5 files changed

+18
-1
lines changed

charts/atlantis/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apiVersion: v1
33
appVersion: v0.30.0
44
description: A Helm chart for Atlantis https://www.runatlantis.io
55
name: atlantis
6-
version: 5.7.0
6+
version: 5.8.0
77
keywords:
88
- terraform
99
home: https://www.runatlantis.io

charts/atlantis/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,7 @@ extraManifests:
201201
| servicemonitor.auth.externalSecret.name | string | `""` | |
202202
| 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. |
203203
| servicemonitor.interval | string | `"30s"` | |
204+
| servicemonitor.metricRelabelings | list | `[]` | Optional metric relabelings to drop or modify metrics. |
204205
| servicemonitor.path | string | `"/metrics"` | |
205206
| statefulSet.annotations | object | `{}` | |
206207
| statefulSet.labels | object | `{}` | |

charts/atlantis/templates/servicemonitor.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ spec:
2828
- port: atlantis
2929
interval: {{ .Values.servicemonitor.interval }}
3030
path: {{ .Values.servicemonitor.path }}
31+
{{- with .Values.servicemonitor.metricRelabelings }}
32+
metricRelabelings:
33+
{{- toYaml . | nindent 6 }}
34+
{{- end }}
3135
{{- if .Values.servicemonitor.auth.basicAuth.enabled }}
3236
basicAuth:
3337
username:

charts/atlantis/values.schema.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1217,6 +1217,12 @@
12171217
}
12181218
}
12191219
}
1220+
},
1221+
"metricRelabelings": {
1222+
"description": "Optional metric relabelings to drop or modify metrics.",
1223+
"items": {},
1224+
"type": "array",
1225+
"default": []
12201226
}
12211227
}
12221228
},

charts/atlantis/values.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -700,6 +700,12 @@ servicemonitor:
700700
# keys:
701701
# username: USERNAME
702702
# password: ATLANTIS_WEB_PASSWORD
703+
# -- Optional metric relabelings to drop or modify metrics.
704+
metricRelabelings: []
705+
# metricRelabelings:
706+
# - action: drop
707+
# regex: "atlantis_project_apply_execution_.*"
708+
# sourceLabels: [__name__]
703709

704710
# -- Enable this if you're using Google Managed Prometheus.
705711
podMonitor:

0 commit comments

Comments
 (0)