summaryrefslogtreecommitdiffstats
path: root/vnfs/DAaaS/prometheus-operator/templates/alertmanager/alertmanager.yaml
diff options
context:
space:
mode:
authorDileep Ranganathan <dileep.ranganathan@intel.com>2019-01-25 02:44:36 -0800
committerDileep Ranganathan <dileep.ranganathan@intel.com>2019-01-25 02:49:50 -0800
commitc942e55ceea4ce28e84168bb672a83572d0a6313 (patch)
tree8ef8e93a9d4bbd70c4076338ca5ce2be98990268 /vnfs/DAaaS/prometheus-operator/templates/alertmanager/alertmanager.yaml
parent1b97e2665be03fc518eb11de0863c42b2280149e (diff)
Helm charts for Distributed Edge Analytics.
Initial Helm charts for CollectD, Prometheus Operator, Kafka Strimzi operator, Rook Ceph Operator. Change-Id: I7323029bd0bf1e4b39aac329fc567f705a59bc0c Issue-ID: ONAPARC-366 Signed-off-by: Dileep Ranganathan <dileep.ranganathan@intel.com>
Diffstat (limited to 'vnfs/DAaaS/prometheus-operator/templates/alertmanager/alertmanager.yaml')
-rw-r--r--vnfs/DAaaS/prometheus-operator/templates/alertmanager/alertmanager.yaml100
1 files changed, 100 insertions, 0 deletions
diff --git a/vnfs/DAaaS/prometheus-operator/templates/alertmanager/alertmanager.yaml b/vnfs/DAaaS/prometheus-operator/templates/alertmanager/alertmanager.yaml
new file mode 100644
index 00000000..64466466
--- /dev/null
+++ b/vnfs/DAaaS/prometheus-operator/templates/alertmanager/alertmanager.yaml
@@ -0,0 +1,100 @@
+{{- if .Values.alertmanager.enabled }}
+apiVersion: {{ printf "%s/v1" (.Values.prometheusOperator.crdApiGroup | default "monitoring.coreos.com") }}
+kind: Alertmanager
+metadata:
+ name: {{ template "prometheus-operator.fullname" . }}-alertmanager
+ labels:
+ app: {{ template "prometheus-operator.name" . }}-alertmanager
+{{ include "prometheus-operator.labels" . | indent 4 }}
+spec:
+{{- if .Values.alertmanager.alertmanagerSpec.image }}
+ baseImage: {{ .Values.alertmanager.alertmanagerSpec.image.repository }}
+ version: {{ .Values.alertmanager.alertmanagerSpec.image.tag }}
+{{- end }}
+ replicas: {{ .Values.alertmanager.alertmanagerSpec.replicas }}
+ listenLocal: {{ .Values.alertmanager.alertmanagerSpec.listenLocal }}
+ serviceAccountName: {{ template "prometheus-operator.alertmanager.serviceAccountName" . }}
+{{- if .Values.alertmanager.alertmanagerSpec.externalUrl }}
+ externalUrl: "{{ .Values.alertmanager.alertmanagerSpec.externalUrl }}"
+{{- end }}
+{{- if .Values.alertmanager.alertmanagerSpec.externalUrl }}
+ externalUrl: "{{ .Values.alertmanager.alertmanagerSpec.externalUrl }}"
+{{- else if .Values.alertmanager.ingress.enabled }}
+ externalUrl: "http://{{ index .Values.alertmanager.ingress.hosts 0 }}{{ .Values.alertmanager.alertmanagerSpec.routePrefix }}"
+{{- else }}
+ externalUrl: http://{{ template "prometheus-operator.fullname" . }}-alertmanager.{{ .Release.Namespace }}:9093
+{{- end }}
+{{- if .Values.alertmanager.alertmanagerSpec.nodeSelector }}
+ nodeSelector:
+{{ toYaml .Values.alertmanager.alertmanagerSpec.nodeSelector | indent 4 }}
+{{- end }}
+ paused: {{ .Values.alertmanager.alertmanagerSpec.paused }}
+ logLevel: {{ .Values.alertmanager.alertmanagerSpec.logLevel | quote }}
+ retention: {{ .Values.alertmanager.alertmanagerSpec.retention | quote }}
+{{- if .Values.alertmanager.alertmanagerSpec.secrets }}
+ secrets:
+{{ toYaml .Values.alertmanager.alertmanagerSpec.secrets | indent 4 }}
+{{- end }}
+{{- if .Values.alertmanager.alertmanagerSpec.configMaps }}
+ configMaps:
+{{ toYaml .Values.alertmanager.alertmanagerSpec.configMaps | indent 4 }}
+{{- end }}
+{{- if .Values.alertmanager.alertmanagerSpec.resources }}
+ resources:
+{{ toYaml .Values.alertmanager.alertmanagerSpec.resources | indent 4 }}
+{{- end }}
+{{- if .Values.alertmanager.alertmanagerSpec.routePrefix }}
+ routePrefix: "{{ .Values.alertmanager.alertmanagerSpec.routePrefix }}"
+{{- end }}
+{{- if .Values.alertmanager.alertmanagerSpec.securityContext }}
+ securityContext:
+{{ toYaml .Values.alertmanager.alertmanagerSpec.securityContext | indent 4 }}
+{{- end }}
+{{- if .Values.alertmanager.alertmanagerSpec.storage }}
+ storage:
+{{ toYaml .Values.alertmanager.alertmanagerSpec.storage | indent 4 }}
+{{- end }}
+{{- if .Values.alertmanager.alertmanagerSpec.podMetadata }}
+ podMetadata:
+{{ toYaml .Values.alertmanager.alertmanagerSpec.podMetadata | indent 4 }}
+{{- end }}
+{{- if eq .Values.alertmanager.alertmanagerSpec.podAntiAffinity "hard" }}
+ affinity:
+ podAntiAffinity:
+ requiredDuringSchedulingIgnoredDuringExecution:
+ - topologyKey: kubernetes.io/hostname
+ labelSelector:
+ matchLabels:
+ app: alertmanager
+ alertmanager: {{ template "prometheus-operator.fullname" . }}-alertmanager
+{{- else if eq .Values.alertmanager.alertmanagerSpec.podAntiAffinity "soft" }}
+ affinity:
+ podAntiAffinity:
+ preferredDuringSchedulingIgnoredDuringExecution:
+ - weight: 100
+ podAffinityTerm:
+ topologyKey: kubernetes.io/hostname
+ labelSelector:
+ matchLabels:
+ app: alertmanager
+ alertmanager: {{ template "prometheus-operator.fullname" . }}-alertmanager
+{{- end }}
+{{- if .Values.alertmanager.alertmanagerSpec.tolerations }}
+ tolerations:
+{{ toYaml .Values.alertmanager.alertmanagerSpec.tolerations | indent 4 }}
+{{- end }}
+{{- if .Values.global.imagePullSecrets }}
+ imagePullSecrets:
+{{ toYaml .Values.global.imagePullSecrets | indent 4 }}
+{{- end }}
+{{- if .Values.alertmanager.alertmanagerSpec.containers }}
+ containers:
+{{ toYaml .Values.alertmanager.alertmanagerSpec.containers | indent 4 }}
+{{- end }}
+{{- if .Values.alertmanager.alertmanagerSpec.priorityClassName }}
+ priorityClassName: {{.Values.alertmanager.alertmanagerSpec.priorityClassName }}
+{{- end }}
+{{- if .Values.alertmanager.alertmanagerSpec.additionalPeers }}
+ additionalPeers: {{.Values.alertmanager.alertmanagerSpec.additionalPeers }}
+{{- end }}
+{{- end }}