summaryrefslogtreecommitdiff
path: root/roles/monitoring/alerta/templates/pod-spec.yml.j2
blob: 6edabae5d7db2ab722da4c2620f6616d84f3e9e0 (plain) (blame)
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
containers:
- name: alerta
  image: "alerta-web-with-mailer:8.7.0"
  env:
  - name: "DATABASE_URL"
    value: "postgres://alerta:secret@127.0.0.1:5432/alerta"
  - name: "AUTH_REQUIRED"
    value: "True"
  - name: "ADMIN_USERS"
    value: "admin"
  - name: "DEBUG"
    value: "1"
  - name: "SUPERVISORD_LOG_LEVEL"
    value: "warn"
  volumeMounts:
  - name: config
    mountPath: /app/alertad.conf.j2
    subPath: alertad.conf.j2
    readOnly: true
  ports:
  - containerPort: 8080
    hostPort: 8080

- name: postgresql
  image: "postgres:14.2"
  args:
  - postgres
  - -c
  - listen_addresses=127.0.0.1
  env:
  - name: "POSTGRES_DB"
    value: "alerta"
  - name: "POSTGRES_USER"
    value: "alerta"
  - name: "POSTGRES_PASSWORD"
    value: "secret"
  volumeMounts:
  - name: postgres
    mountPath: /var/lib/postgresql/data

- name: redis
  image: "redis:6.2.6"
  args:
  - redis-server
  - --bind
  - 127.0.0.1

- name: mailer
  image: "alerta-web-with-mailer:8.7.0"
  command:
  - alerta-mailer
  env:
  - name: "ALERTA_CONF_FILE"
    value: "/app/alerta-mailer.conf"
  volumeMounts:
  - name: config
    mountPath: /app/alerta-mailer.conf
    subPath: alerta-mailer.conf
    readOnly: true
  - name: config
    mountPath: /app/email.tmpl
    subPath: email.tmpl
    readOnly: true

volumes:
- name: config
  hostPath:
    path: "{{ alerta_base_path }}/config"
    type: Directory
- name: postgres
  hostPath:
    path: "{{ alerta_base_path }}/postgres"
    type: Directory