Skip to content
This repository has been archived by the owner on Sep 27, 2024. It is now read-only.

Commit

Permalink
Adds VictoriaMetrics Monitors
Browse files Browse the repository at this point in the history
  • Loading branch information
a-ryoo committed Sep 20, 2023
1 parent 31167b6 commit 2c60162
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ jobs:
password: ${{ secrets.ARTIFACTORY_PASS }}
repoName: allure-testops
chart: charts/allure-testops
version: 2.0.2
version: 2.0.3
2 changes: 1 addition & 1 deletion charts/allure-testops/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: allure-testops
version: 2.0.2
version: 2.0.3
appVersion: 4.20.3

description: Allure TestOps
Expand Down
62 changes: 59 additions & 3 deletions charts/allure-testops/templates/infra/monitoring.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{{- if .Values.monitoring.enabled }}
{{- if eq .Values.monitoring.kind "prometheus" }}
---
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
Expand All @@ -14,7 +15,7 @@ spec:
endpoints:
- port: http
path: "/management/prometheus"
interval: 10s
interval: {{ .Values.monitoring.interval}}
honorLabels: true

---
Expand All @@ -32,7 +33,7 @@ spec:
endpoints:
- port: http
path: "{{ .Values.allure.uaaContextPath }}management/prometheus"
interval: 10s
interval: {{ .Values.monitoring.interval}}
honorLabels: true

---
Expand All @@ -50,6 +51,61 @@ spec:
endpoints:
- port: http
path: "{{ .Values.allure.reportContextPath }}management/prometheus"
interval: 10s
interval: {{ .Values.monitoring.interval}}
honorLabels: true
{{- else if eq .Values.monitoring.kind "victoria" }}
---
apiVersion: operator.victoriametrics.com/v1beta1
kind: VMServiceScrape
metadata:
name: testops-gateway
spec:
namespaceSelector:
any: false
selector:
matchLabels:
app: {{ template "allure-testops.gateway.fullname" . }}
endpoints:
- path: /management/prometheus
interval: {{ .Values.monitoring.interval}}
port: http
metricRelabelConfigs:
- action: drop
regex: lettuce_command_(completion_seconds_bucket|firstresponse_seconds_bucket|completion_seconds)
sourceLabels:
- __name__

---
apiVersion: operator.victoriametrics.com/v1beta1
kind: VMServiceScrape
metadata:
name: testops-uaa
spec:
namespaceSelector:
any: false
selector:
matchLabels:
app: {{ template "allure-testops.uaa.fullname" . }}
endpoints:
- path: "{{ .Values.allure.uaaContextPath }}management/prometheus"
interval: {{ .Values.monitoring.interval}}
port: http

---
apiVersion: operator.victoriametrics.com/v1beta1
kind: VMServiceScrape
metadata:
name: testops-report
spec:
namespaceSelector:
any: false
selector:
matchLabels:
app: {{ template "allure-testops.report.fullname" . }}
endpoints:
- path: "{{ .Values.allure.reportContextPath }}management/prometheus"
interval: {{ .Values.monitoring.interval}}
port: http

{{- end }}
{{- end }}
3 changes: 3 additions & 0 deletions charts/allure-testops/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -541,6 +541,9 @@ report:
# Before enabling monitoring make sure you have Prometheus & Prometheus Operator Installed
monitoring:
enabled: false
# prometheus for Prometheus Operator ServiceMonitor, victoria for VictoriaMetrics Operator ServiceScrape
kind: prometheus
interval: 15s

### Always leave it as it is
## Role Based Access Control
Expand Down

0 comments on commit 2c60162

Please sign in to comment.