Skip to content

Commit

Permalink
feat: add metricRelabelings support to ServiceMonitor (#433)
Browse files Browse the repository at this point in the history
Signed-off-by: benjohnson-dev <[email protected]>
  • Loading branch information
benjohnson-dev authored Oct 26, 2024
1 parent bc98b31 commit a6ba6a3
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/atlantis/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions charts/atlantis/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 | `{}` | |
Expand Down
4 changes: 4 additions & 0 deletions charts/atlantis/templates/servicemonitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
6 changes: 6 additions & 0 deletions charts/atlantis/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1217,6 +1217,12 @@
}
}
}
},
"metricRelabelings": {
"description": "Optional metric relabelings to drop or modify metrics.",
"items": {},
"type": "array",
"default": []
}
}
},
Expand Down
6 changes: 6 additions & 0 deletions charts/atlantis/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit a6ba6a3

Please sign in to comment.