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 servicemonitor additonal labels #354

Merged
merged 3 commits into from
Feb 27, 2024
Merged
Show file tree
Hide file tree
Changes from 2 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
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ The following options are supported. See [values.yaml](/charts/atlantis/values.y
| `servicemonitor.enabled` | Enable Prometheus service monitor. This requires metrics.prometheus.endpoint to be defined (/metrics is a good default) in the repoConfig value | `false` |
| `servicemonitor.interval` | Interval at which metrics should be scraped | `30s` |
| `servicemonitor.path` | HTTP path to scrape for metrics | `/metrics` |
| `servicemonitor.additionalLabels` | Prometheus ServiceMonitor labels | `{}` |
| `statefulSet.annotations` | Additional annotations to use for StatefulSet. | `{}` |
| `statefulSet.labels` | Additional labels to use for StatefulSet. | `{}` |
| `statefulSet.priorityClassName` | Leverage a PriorityClass to ensure your pods survive resource shortages. | `{}` |
Expand Down
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.27.0
description: A Helm chart for Atlantis https://www.runatlantis.io
name: atlantis
version: 4.20.0
version: 4.21.0
keywords:
- terraform
home: https://www.runatlantis.io
Expand Down
3 changes: 3 additions & 0 deletions charts/atlantis/templates/servicemonitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ metadata:
name: {{ template "atlantis.fullname" . }}
labels:
{{- include "atlantis.labels" . | nindent 4 }}
{{- with .Values.servicemonitor.additionalLabels }}
{{- toYaml . | nindent 4 }}
{{- end }}
ckav370 marked this conversation as resolved.
Show resolved Hide resolved
{{- with .Values.service.annotations }}
annotations:
{{ toYaml . | indent 4 }}
Expand Down
2 changes: 2 additions & 0 deletions charts/atlantis/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -567,6 +567,8 @@ servicemonitor:
enabled: false
interval: "30s"
path: /metrics
# Prometheus ServiceMonitor labels
additionalLabels: {}
auth:
# if auth is enabled on Atlantis, use one of the following mechanism
basicAuth:
Expand Down