aboutsummaryrefslogtreecommitdiffstats
path: root/kud/tests/vnfs/comp-app/collection/app2/helm/prometheus-operator/templates/prometheus/additionalPrometheusRules.yaml
diff options
context:
space:
mode:
authorRitu Sood <Ritu.Sood@intel.com>2020-06-25 19:43:36 +0000
committerGerrit Code Review <gerrit@onap.org>2020-06-25 19:43:36 +0000
commit7696e3865b96f0bb49333fbdf68c03057df8c74b (patch)
treedb2c667c00888e975c8eecf37d64ba4ab810b9ec /kud/tests/vnfs/comp-app/collection/app2/helm/prometheus-operator/templates/prometheus/additionalPrometheusRules.yaml
parent672d736a054ddffaecd2910a8171844fddc38bdd (diff)
parent94bfc956f43bcaec29f2fc9844b9ca4c35d72260 (diff)
Merge "Integrate collectd, prometheus and grafana."
Diffstat (limited to 'kud/tests/vnfs/comp-app/collection/app2/helm/prometheus-operator/templates/prometheus/additionalPrometheusRules.yaml')
-rwxr-xr-xkud/tests/vnfs/comp-app/collection/app2/helm/prometheus-operator/templates/prometheus/additionalPrometheusRules.yaml40
1 files changed, 40 insertions, 0 deletions
diff --git a/kud/tests/vnfs/comp-app/collection/app2/helm/prometheus-operator/templates/prometheus/additionalPrometheusRules.yaml b/kud/tests/vnfs/comp-app/collection/app2/helm/prometheus-operator/templates/prometheus/additionalPrometheusRules.yaml
new file mode 100755
index 00000000..bc631fc8
--- /dev/null
+++ b/kud/tests/vnfs/comp-app/collection/app2/helm/prometheus-operator/templates/prometheus/additionalPrometheusRules.yaml
@@ -0,0 +1,40 @@
+{{- if or .Values.additionalPrometheusRules .Values.additionalPrometheusRulesMap}}
+apiVersion: v1
+kind: List
+items:
+{{- if .Values.additionalPrometheusRulesMap }}
+{{- range $prometheusRuleName, $prometheusRule := .Values.additionalPrometheusRulesMap }}
+ - apiVersion: monitoring.coreos.com/v1
+ kind: PrometheusRule
+ metadata:
+ name: {{ template "prometheus-operator.name" $ }}-{{ $prometheusRuleName }}
+ namespace: {{ template "prometheus-operator.namespace" . }}
+ labels:
+ app: {{ template "prometheus-operator.name" $ }}
+{{ include "prometheus-operator.labels" $ | indent 8 }}
+ {{- if $prometheusRule.additionalLabels }}
+{{ toYaml $prometheusRule.additionalLabels | indent 8 }}
+ {{- end }}
+ spec:
+ groups:
+{{ toYaml $prometheusRule.groups| indent 8 }}
+{{- end }}
+{{- else }}
+{{- range .Values.additionalPrometheusRules }}
+ - apiVersion: monitoring.coreos.com/v1
+ kind: PrometheusRule
+ metadata:
+ name: {{ template "prometheus-operator.name" $ }}-{{ .name }}
+ namespace: {{ template "prometheus-operator.namespace" . }}
+ labels:
+ app: {{ template "prometheus-operator.name" $ }}
+{{ include "prometheus-operator.labels" $ | indent 8 }}
+ {{- if .additionalLabels }}
+{{ toYaml .additionalLabels | indent 8 }}
+ {{- end }}
+ spec:
+ groups:
+{{ toYaml .groups| indent 8 }}
+{{- end }}
+{{- end }}
+{{- end }}