Merge pull request 'grafana-prometheus - add withelists on grafana et prometheus from traefik' (#4) from grafana_ipwhitelist into master

Reviewed-on: #4
This commit is contained in:
Ludovic Cartier 2024-02-20 14:55:50 +01:00
commit ec65c1cb51

View File

@ -66,6 +66,10 @@ services:
traefik.http.routers.grafana.tls.certresolver: letsencrypt
traefik.http.routers.grafana.entrypoints: "{{ grafana_traefik_entrypoint }}"
traefik.http.services.grafana.loadbalancer.server.port: 3000
{% else %}
{% if grafana_traefik_ipwhitelist is defined %}
traefik.http.middlewares.grafana-clientips.ipwhitelist.sourcerange: {{ grafana_traefik_ipwhitelist }}
traefik.http.routers.grafana.middlewares: "grafana-clientips@docker"
{% else %}
ports:
- "{{ grafana_port | default(3000) }}:3000"
@ -95,6 +99,10 @@ services:
traefik.http.routers.prometheus.tls.certresolver: letsencrypt
traefik.http.routers.prometheus.entrypoints: "{{ grafana_traefik_entrypoint }}"
traefik.http.services.prometheus.loadbalancer.server.port: 9090
{% else %}
{% if prometheus_traefik_ipwhitelist is defined %}
traefik.http.middlewares.prometheus-clientips.ipwhitelist.sourcerange: {{ prometheus_traefik_ipwhitelist }}
traefik.http.routers.prometheus.middlewares: "prometheus-clientips@docker"
{% else %}
ports:
- "{{ prometheus_port | default(9090) }}:9090"