diff options
Diffstat (limited to 'roles/monitoring')
-rw-r--r-- | roles/monitoring/alerta/defaults/main.yml | 1 | ||||
-rw-r--r-- | roles/monitoring/alerta/tasks/main.yml | 7 | ||||
-rw-r--r-- | roles/monitoring/alerta/templates/pod-spec.yml.j2 | 3 |
3 files changed, 11 insertions, 0 deletions
diff --git a/roles/monitoring/alerta/defaults/main.yml b/roles/monitoring/alerta/defaults/main.yml index a38d737b..f7ef4aec 100644 --- a/roles/monitoring/alerta/defaults/main.yml +++ b/roles/monitoring/alerta/defaults/main.yml @@ -9,6 +9,7 @@ # alerta_redis_version: 6.2.6 alerta_web_port: 8080 +# alerta_web_nginx_vhost: # alerta_web_secret_key: "randomstring" # alerta_postgres_password: "secret" diff --git a/roles/monitoring/alerta/tasks/main.yml b/roles/monitoring/alerta/tasks/main.yml index 43c2e892..0b0e8028 100644 --- a/roles/monitoring/alerta/tasks/main.yml +++ b/roles/monitoring/alerta/tasks/main.yml @@ -95,3 +95,10 @@ - checksum include_role: name: kubernetes/standalone/pod + +- name: configure nginx vhost + when: alerta_web_nginx_vhost is defined + vars: + nginx_vhost: "{{ alerta_web_nginx_vhost }}" + include_role: + name: nginx/vhost diff --git a/roles/monitoring/alerta/templates/pod-spec.yml.j2 b/roles/monitoring/alerta/templates/pod-spec.yml.j2 index 9ce20988..5523b621 100644 --- a/roles/monitoring/alerta/templates/pod-spec.yml.j2 +++ b/roles/monitoring/alerta/templates/pod-spec.yml.j2 @@ -29,6 +29,9 @@ containers: {% endif %} ports: - containerPort: 8080 +{% if alerta_web_nginx_vhost is defined %} + hostIP: "127.0.0.1" +{% endif %} hostPort: {{ alerta_web_port }} - name: postgresql |