diff options
author | Rajamohan Raj <rajamohan.raj@intel.com> | 2020-07-02 00:48:08 +0000 |
---|---|---|
committer | Rajamohan Raj <rajamohan.raj@intel.com> | 2020-07-07 01:37:58 +0000 |
commit | 1e083940563e5e4b996d0389c62771cfbdd74cf6 (patch) | |
tree | c83e3d9f67a1a2a7895ccb7aecbf3f38667c599d /kud/tests/vnfs/comp-app/collection/app2/helm/prometheus-operator/templates | |
parent | 8b071065d68d664446a5e232a931c43ad2edebc5 (diff) |
Script for prometheus as composite app using orchestrator
In this patch, identified few issues with rsync
and came with a work around for handling list
as a kind.
Wrote a scipt which can deploy prometheus
as a composite app using orchestrator.
Issue-ID: MULTICLOUD-1110
Signed-off-by: Rajamohan Raj <rajamohan.raj@intel.com>
Change-Id: Ib7172c16a2f37dbc4715e59c5be217e154cd3be0
Diffstat (limited to 'kud/tests/vnfs/comp-app/collection/app2/helm/prometheus-operator/templates')
2 files changed, 20 insertions, 34 deletions
diff --git a/kud/tests/vnfs/comp-app/collection/app2/helm/prometheus-operator/templates/prometheus/servicemonitor-collectd.yaml b/kud/tests/vnfs/comp-app/collection/app2/helm/prometheus-operator/templates/prometheus/servicemonitor-collectd.yaml new file mode 100644 index 00000000..6bd961c0 --- /dev/null +++ b/kud/tests/vnfs/comp-app/collection/app2/helm/prometheus-operator/templates/prometheus/servicemonitor-collectd.yaml @@ -0,0 +1,20 @@ +{{- if and .Values.prometheus.enabled .Values.prometheus.additionalServiceMonitors }} +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + name: service-monitor-collectd + namespace: {{ $.Release.Namespace | quote }} + labels: + app: {{ template "prometheus-operator.name" $ }}-prometheus +{{ include "prometheus-operator.labels" $ | indent 8 }} + collector: collectd +spec: + endpoints: + - interval : 10s + path: /metrics + port: collectd-prometheus + jobLabel: collectd + selector: + matchLabels: + app: collectd +{{- end }} diff --git a/kud/tests/vnfs/comp-app/collection/app2/helm/prometheus-operator/templates/prometheus/servicemonitors.yaml b/kud/tests/vnfs/comp-app/collection/app2/helm/prometheus-operator/templates/prometheus/servicemonitors.yaml deleted file mode 100755 index 4da752ff..00000000 --- a/kud/tests/vnfs/comp-app/collection/app2/helm/prometheus-operator/templates/prometheus/servicemonitors.yaml +++ /dev/null @@ -1,34 +0,0 @@ -{{- if and .Values.prometheus.enabled .Values.prometheus.additionalServiceMonitors }} -apiVersion: v1 -kind: List -items: -{{- range .Values.prometheus.additionalServiceMonitors }} - - apiVersion: monitoring.coreos.com/v1 - kind: ServiceMonitor - metadata: - name: {{ .name }} - namespace: {{ $.Release.Namespace | quote }} - labels: - app: {{ template "prometheus-operator.name" $ }}-prometheus -{{ include "prometheus-operator.labels" $ | indent 8 }} - {{- if .additionalLabels }} -{{ toYaml .additionalLabels | indent 8 }} - {{- end }} - spec: - endpoints: -{{ toYaml .endpoints | indent 8 }} - {{- if .jobLabel }} - jobLabel: {{ .jobLabel }} - {{- end }} - {{- if .namespaceSelector }} - namespaceSelector: -{{ toYaml .namespaceSelector | indent 8 }} - {{- end }} - selector: -{{ toYaml .selector | indent 8 }} - {{- if .targetLabels }} - targetLabels: -{{ toYaml .targetLabels | indent 8 }} - {{- end }} -{{- end }} -{{- end }} |