-
Notifications
You must be signed in to change notification settings - Fork 0
/
podman.yaml
113 lines (113 loc) · 2.62 KB
/
podman.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
apiVersion: v1
kind: Pod
metadata:
name: grafana
spec:
containers:
- name: grafana
image: docker.io/grafana/grafana:11.2.0
ports:
- containerPort: 3000
hostPort: 3000
volumeMounts:
- name: grafana
mountPath: /configmap
env:
- name: GF_PATHS_CONFIG
value: /configmap/grafana.ini
- name: GF_INSTALL_PLUGINS
value: "grafana-oncall-app vv1.9.0"
- name: oncall-engine
image: grafana/oncall:v1.9.0
command: ["sh", "-c", "python manage.py migrate && python manage.py runserver 0.0.0.0:8080"]
envFrom:
- configMapRef:
name: oncall
ports:
- containerPort: 8080
hostPort: 8080
- name: oncall-celery
image: grafana/oncall:v1.9.0
command: ["sh", "-c", "./celery_with_exporter.sh"]
envFrom:
- configMapRef:
name: oncall
env:
- name: CELERY_WORKER_QUEUE
value: "default,critical,long,slack,webhook,retry,celery,grafana"
- name: CELERY_WORKER_CONCURRENCY
value: "1"
- name: CELERY_WORKER_MAX_TASKS_PER_CHILD
value: "1"
- name: redis
image: redis
ports:
- containerPort: 6379
hostPort: 6379
- name: prometheus
image: prom/prometheus
ports:
- containerPort: 9090
hostPort: 9090
- name: postgres
image: postgres:17
env:
- name: POSTGRES_PASSWORD
value: postgres
ports:
- containerPort: 5432
hostPort: 5432
volumeMounts:
- name: postgres
mountPath: /docker-entrypoint-initdb.d/
volumes:
- name: grafana
configMap:
name: grafana
- name: postgres
configMap:
name: postgres
---
apiVersion: v1
kind: ConfigMap
metadata:
name: grafana
data:
grafana.ini: |
[database]
type = postgres
host = 127.0.0.1
name = grafana
user = grafana
password = grafana
---
apiVersion: v1
kind: ConfigMap
metadata:
name: oncall
data:
BASE_URL: http://localhost:8080
DATABASE_TYPE: postgresql
DATABASE_NAME: oncall
DATABASE_USER: oncall
DATABASE_PASSWORD: oncall
DATABASE_HOST: 127.0.0.1
DATABASE_PORT: 5432
BROKER_TYPE: redis
REDIS_URI: redis://127.0.0.1:6379/0
DJANGO_SETTINGS_MODULE: settings.hobby
SECRET_KEY: changemeinproductionchangemeinproductionchangemeinproductionchangemeinproductionchangemeinproduction
GRAFANA_API_URL: "http://localhost:3000/"
---
apiVersion: v1
kind: ConfigMap
metadata:
name: postgres
data:
init.sql: |
CREATE ROLE grafana LOGIN PASSWORD 'grafana';
CREATE DATABASE grafana OWNER grafana;
CREATE ROLE oncall LOGIN PASSWORD 'oncall';
CREATE DATABASE oncall OWNER oncall;
CREATE DATABASE timeseries OWNER grafana;
---