Skip to content
This repository was archived by the owner on Jun 7, 2023. It is now read-only.

Commit c418518

Browse files
author
Anand Sanmukhani
authored
Merge pull request #150 from 4n4nd/add-k8s-template
Add k8s manifests
2 parents 7c37460 + 12b9bc8 commit c418518

File tree

3 files changed

+67
-0
lines changed

3 files changed

+67
-0
lines changed

openshift/k8s-deployment.yaml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
apiVersion: apps/v1
3+
kind: Deployment
4+
metadata:
5+
name: prometheus-anomaly-detector
6+
spec:
7+
selector:
8+
matchLabels:
9+
app: prometheus-anomaly-detector
10+
replicas: 1
11+
template:
12+
metadata:
13+
labels:
14+
app: prometheus-anomaly-detector
15+
spec:
16+
containers:
17+
- env:
18+
- name: FLT_PROM_URL
19+
value: "http://demo.robustperception.io:9090/"
20+
- name: FLT_PROM_ACCESS_TOKEN
21+
value: "my-oauth-token"
22+
- name: FLT_METRICS_LIST
23+
value: "up"
24+
- name: FLT_RETRAINING_INTERVAL_MINUTES
25+
value: "15m"
26+
- name: FLT_ROLLING_TRAINING_WINDOW_SIZE
27+
value: "24h"
28+
- name: FLT_DEBUG_MODE
29+
value: "True"
30+
- name: APP_FILE
31+
value: "app.py"
32+
name: prometheus-anomaly-detector
33+
image: quay.io/aicoe/prometheus-anomaly-detector:latest
34+
ports:
35+
- containerPort: 8080

openshift/k8s-service.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
apiVersion: v1
3+
kind: Service
4+
metadata:
5+
name: prometheus-anomaly-detector
6+
labels:
7+
app: prometheus-anomaly-detector
8+
operated-prometheus: 'true'
9+
spec:
10+
selector:
11+
app: prometheus-anomaly-detector
12+
ports:
13+
- protocol: TCP
14+
port: 8080
15+
targetPort: 8080
16+
name: metrics

openshift/k8s-servicemonitor.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
apiVersion: monitoring.coreos.com/v1
3+
kind: ServiceMonitor
4+
metadata:
5+
name: prometheus-anomaly-detector-monitor
6+
spec:
7+
endpoints:
8+
- port: metrics
9+
interval: 60s
10+
selector:
11+
matchLabels:
12+
operated-prometheus: 'true'
13+
app: prometheus-anomaly-detector
14+
namespaceSelector:
15+
matchNames:
16+
- prometheus-anomaly-detector # update namespace to where the service is deployed

0 commit comments

Comments
 (0)