159 lines
2.8 KiB
YAML
159 lines
2.8 KiB
YAML
![]() |
apiVersion: apps/v1
|
||
|
kind: Deployment
|
||
|
metadata:
|
||
|
name: prometheus
|
||
|
namespace: general-bots
|
||
|
spec:
|
||
|
selector:
|
||
|
matchLabels:
|
||
|
app: prometheus
|
||
|
template:
|
||
|
metadata:
|
||
|
labels:
|
||
|
app: prometheus
|
||
|
spec:
|
||
|
containers:
|
||
|
- name: prometheus
|
||
|
image: prom/prometheus:v2.45.0
|
||
|
ports:
|
||
|
- containerPort: 9090
|
||
|
volumeMounts:
|
||
|
- name: config
|
||
|
mountPath: /etc/prometheus
|
||
|
- name: storage
|
||
|
mountPath: /prometheus
|
||
|
volumes:
|
||
|
- name: config
|
||
|
configMap:
|
||
|
name: prometheus-config
|
||
|
- name: storage
|
||
|
persistentVolumeClaim:
|
||
|
claimName: prometheus-storage
|
||
|
---
|
||
|
apiVersion: v1
|
||
|
kind: Service
|
||
|
metadata:
|
||
|
name: prometheus
|
||
|
namespace: general-bots
|
||
|
spec:
|
||
|
selector:
|
||
|
app: prometheus
|
||
|
ports:
|
||
|
- port: 9090
|
||
|
---
|
||
|
apiVersion: apps/v1
|
||
|
kind: Deployment
|
||
|
metadata:
|
||
|
name: grafana
|
||
|
namespace: general-bots
|
||
|
spec:
|
||
|
selector:
|
||
|
matchLabels:
|
||
|
app: grafana
|
||
|
template:
|
||
|
metadata:
|
||
|
labels:
|
||
|
app: grafana
|
||
|
spec:
|
||
|
containers:
|
||
|
- name: grafana
|
||
|
image: grafana/grafana:9.5.5
|
||
|
ports:
|
||
|
- containerPort: 3000
|
||
|
volumeMounts:
|
||
|
- name: storage
|
||
|
mountPath: /var/lib/grafana
|
||
|
volumes:
|
||
|
- name: storage
|
||
|
persistentVolumeClaim:
|
||
|
claimName: grafana-storage
|
||
|
---
|
||
|
apiVersion: v1
|
||
|
kind: Service
|
||
|
metadata:
|
||
|
name: grafana
|
||
|
namespace: general-bots
|
||
|
spec:
|
||
|
selector:
|
||
|
app: grafana
|
||
|
ports:
|
||
|
- port: 3000
|
||
|
---
|
||
|
apiVersion: apps/v1
|
||
|
kind: Deployment
|
||
|
metadata:
|
||
|
name: jaeger
|
||
|
namespace: general-bots
|
||
|
spec:
|
||
|
selector:
|
||
|
matchLabels:
|
||
|
app: jaeger
|
||
|
template:
|
||
|
metadata:
|
||
|
labels:
|
||
|
app: jaeger
|
||
|
spec:
|
||
|
containers:
|
||
|
- name: jaeger
|
||
|
image: jaegertracing/all-in-one:1.47
|
||
|
ports:
|
||
|
- containerPort: 16686
|
||
|
- containerPort: 4317
|
||
|
- containerPort: 4318
|
||
|
---
|
||
|
apiVersion: v1
|
||
|
kind: Service
|
||
|
metadata:
|
||
|
name: jaeger
|
||
|
namespace: general-bots
|
||
|
spec:
|
||
|
selector:
|
||
|
app: jaeger
|
||
|
ports:
|
||
|
- name: ui
|
||
|
port: 16686
|
||
|
- name: otlp-grpc
|
||
|
port: 4317
|
||
|
- name: otlp-http
|
||
|
port: 4318
|
||
|
---
|
||
|
apiVersion: v1
|
||
|
kind: ConfigMap
|
||
|
metadata:
|
||
|
name: prometheus-config
|
||
|
namespace: general-bots
|
||
|
data:
|
||
|
prometheus.yml: |
|
||
|
global:
|
||
|
scrape_interval: 15s
|
||
|
evaluation_interval: 15s
|
||
|
|
||
|
scrape_configs:
|
||
|
- job_name: 'general-bots'
|
||
|
static_configs:
|
||
|
- targets: ['api:8080']
|
||
|
---
|
||
|
apiVersion: v1
|
||
|
kind: PersistentVolumeClaim
|
||
|
metadata:
|
||
|
name: prometheus-storage
|
||
|
namespace: general-bots
|
||
|
spec:
|
||
|
accessModes:
|
||
|
- ReadWriteOnce
|
||
|
resources:
|
||
|
requests:
|
||
|
storage: 10Gi
|
||
|
---
|
||
|
apiVersion: v1
|
||
|
kind: PersistentVolumeClaim
|
||
|
metadata:
|
||
|
name: grafana-storage
|
||
|
namespace: general-bots
|
||
|
spec:
|
||
|
accessModes:
|
||
|
- ReadWriteOnce
|
||
|
resources:
|
||
|
requests:
|
||
|
storage: 10Gi
|