Alertmanager: Add Prometheus Scrape Annotation

This change adds the scrape annotation to the alertmanager service

Change-Id: I62e405eb37750a57a22fdafdf1ab457aecbb151e
This commit is contained in:
Steven Fitzpatrick 2021-02-16 15:50:37 +00:00 committed by Tin Lam
parent 054c5fde24
commit 39173f27a8
3 changed files with 12 additions and 1 deletions

View File

@ -15,7 +15,7 @@ apiVersion: v1
appVersion: v0.20.0
description: OpenStack-Helm Alertmanager for Prometheus
name: prometheus-alertmanager
version: 0.1.4
version: 0.1.5
home: https://prometheus.io/docs/alerting/alertmanager/
sources:
- https://github.com/prometheus/alertmanager

View File

@ -14,11 +14,16 @@ limitations under the License.
{{- if .Values.manifests.service }}
{{- $envAll := . }}
{{- $prometheus_annotations := $envAll.Values.monitoring.prometheus.prometheus }}
---
apiVersion: v1
kind: Service
metadata:
name: {{ tuple "alertmanager" "internal" . | include "helm-toolkit.endpoints.hostname_short_endpoint_lookup" }}
annotations:
{{- if .Values.monitoring.prometheus.enabled }}
{{ tuple $prometheus_annotations | include "helm-toolkit.snippets.prometheus_service_annotations" | indent 4 }}
{{- end }}
spec:
ports:
- name: http

View File

@ -243,6 +243,12 @@ network_policy:
egress:
- {}
monitoring:
prometheus:
enabled: true
prometheus:
scrape: true
conf:
httpd: |
ServerRoot "/usr/local/apache2"