summaryrefslogtreecommitdiff
path: root/roles/monitoring/alerta/templates/pod-spec.yml.j2
blob: 9ce209884b55163bef5c84b10e841b8ca307ea86 (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
containers:
- name: alerta
  image: "alerta/alerta-web:{{ alerta_web_version }}-custom"
  env:
  - name: "DATABASE_URL"
    value: "postgres://alerta:{{ alerta_postgres_password }}@127.0.0.1:5432/alerta"
  - name: "AUTH_REQUIRED"
    value: "True"
  - name: "ADMIN_USERS"
    value: "admin"
  - name: "SECRET_KEY"
    value: "{{ alerta_web_secret_key }}"
  - name: "SUPERVISORD_LOG_LEVEL"
    value: "warn"
  volumeMounts:
  - name: config
    mountPath: /app/alertad.conf.j2
    subPath: alertad.conf.j2
    readOnly: true
  - name: config
    mountPath: /app/alerta.conf.j2
    subPath: alerta.conf.j2
    readOnly: true
{% if alerta_mailer is defined %}
  - name: config
    mountPath: /app/email.tmpl
    subPath: email.tmpl
    readOnly: true
{% endif %}
  ports:
  - containerPort: 8080
    hostPort: {{ alerta_web_port }}

- name: postgresql
  image: "postgres:{{ alerta_postgres_version }}"
  args:
  - postgres
  - -c
  - listen_addresses=127.0.0.1
  env:
  - name: "POSTGRES_DB"
    value: "alerta"
  - name: "POSTGRES_USER"
    value: "alerta"
  - name: "POSTGRES_PASSWORD"
    value: "{{ alerta_postgres_password }}"
  volumeMounts:
  - name: postgres
    mountPath: /var/lib/postgresql/data
{% if 'amqp' in alerta_plugins %}

- name: redis
  image: "redis:{{ alerta_redis_version }}"
  args:
  - redis-server
  - --bind
  - 127.0.0.1
{% endif %}

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