Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add metricRelabelings support to ServiceMonitor #433

Merged
merged 1 commit into from
Oct 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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