summaryrefslogtreecommitdiffstats
path: root/vnfs/DAaaS/prometheus-operator/templates/alertmanager/service.yaml
diff options
context:
space:
mode:
Diffstat (limited to 'vnfs/DAaaS/prometheus-operator/templates/alertmanager/service.yaml')
-rw-r--r--vnfs/DAaaS/prometheus-operator/templates/alertmanager/service.yaml42
1 files changed, 42 insertions, 0 deletions
diff --git a/vnfs/DAaaS/prometheus-operator/templates/alertmanager/service.yaml b/vnfs/DAaaS/prometheus-operator/templates/alertmanager/service.yaml
new file mode 100644
index 00000000..d10bf745
--- /dev/null
+++ b/vnfs/DAaaS/prometheus-operator/templates/alertmanager/service.yaml
@@ -0,0 +1,42 @@
+{{- if .Values.alertmanager.enabled }}
+apiVersion: v1
+kind: Service
+metadata:
+ name: {{ template "prometheus-operator.fullname" . }}-alertmanager
+ labels:
+ app: {{ template "prometheus-operator.name" . }}-alertmanager
+{{ include "prometheus-operator.labels" . | indent 4 }}
+{{- if .Values.alertmanager.service.annotations }}
+ annotations:
+{{ toYaml .Values.alertmanager.service.annotations | indent 4 }}
+{{- end }}
+spec:
+{{- if .Values.alertmanager.service.clusterIP }}
+ clusterIP: {{ .Values.alertmanager.service.clusterIP }}
+{{- end }}
+{{- if .Values.alertmanager.service.externalIPs }}
+ externalIPs:
+{{ toYaml .Values.alertmanager.service.externalIPs | indent 4 }}
+{{- end }}
+{{- if .Values.alertmanager.service.loadBalancerIP }}
+ loadBalancerIP: {{ .Values.alertmanager.service.loadBalancerIP }}
+{{- end }}
+{{- if .Values.alertmanager.service.loadBalancerSourceRanges }}
+ loadBalancerSourceRanges:
+ {{- range $cidr := .Values.alertmanager.service.loadBalancerSourceRanges }}
+ - {{ $cidr }}
+ {{- end }}
+{{- end }}
+ ports:
+ - name: web
+ {{- if eq .Values.alertmanager.service.type "NodePort" }}
+ nodePort: {{ .Values.alertmanager.service.nodePort }}
+ {{- end }}
+ port: 9093
+ targetPort: 9093
+ protocol: TCP
+ selector:
+ app: alertmanager
+ alertmanager: {{ template "prometheus-operator.fullname" . }}-alertmanager
+ type: "{{ .Values.alertmanager.service.type }}"
+{{- end }}