Skip to content

Commit

Permalink
feat: add servicemonitor additonal labels (#354)
Browse files Browse the repository at this point in the history
* feat: add servicemonitor additonal labels

* Update README spacing

* Update charts/atlantis/templates/servicemonitor.yaml

Co-authored-by: Gabriel Martinez <19713226+GMartinez-Sisti@users.noreply.github.com>

---------

Co-authored-by: Gabriel Martinez <19713226+GMartinez-Sisti@users.noreply.github.com>
  • Loading branch information
ckav370 and GMartinez-Sisti committed Feb 27, 2024
1 parent 2ee4d8c commit 9fb5bfd
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
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
5 changes: 4 additions & 1 deletion charts/atlantis/templates/servicemonitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ kind: ServiceMonitor
metadata:
name: {{ template "atlantis.fullname" . }}
labels:
{{- include "atlantis.labels" . | nindent 4 }}
{{- include "atlantis.labels" . | nindent 4 }}
{{- with .Values.servicemonitor.additionalLabels }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- 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

0 comments on commit 9fb5bfd

Please sign in to comment.