summaryrefslogtreecommitdiffstats
path: root/src/pybind/mgr/cephadm/templates/services/mgmt-gateway/nginx.conf.j2
blob: b9773ceeeb3c9ba693bc694d867c1608fd15859c (plain)
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
# {{ cephadm_managed }}
worker_rlimit_nofile 8192;

events {
    worker_connections 4096;
}

http {

    #access_log /dev/stdout;
    client_header_buffer_size 32K;
    large_client_header_buffers 4 32k;
    proxy_busy_buffers_size 512k;
    proxy_buffers 4 512k;
    proxy_buffer_size 256K;
    proxy_headers_hash_max_size 1024;
    proxy_headers_hash_bucket_size 128;

{% if oauth2_proxy_endpoints %}
    upstream oauth2_proxy_servers {
     {% for ep in oauth2_proxy_endpoints %}
     server {{ ep }};
     {% endfor %}
    }
{% endif %}

{% if service_discovery_endpoints %}
    upstream service_discovery_servers {
     {% for ep in service_discovery_endpoints %}
     server {{ ep }};
     {% endfor %}
    }
{% endif %}

{% if dashboard_endpoints %}
    upstream dashboard_servers {
     {% for ep in dashboard_endpoints %}
     server {{ ep }};
     {% endfor %}
    }
{% endif %}

{% if grafana_endpoints %}
    upstream grafana_servers {
     {% for ep in grafana_endpoints %}
     server {{ ep }};
     {% endfor %}
    }
{% endif %}

{% if prometheus_endpoints %}
    upstream prometheus_servers {
     {% for ep in prometheus_endpoints %}
     server {{ ep }};
     {% endfor %}
    }
{% endif %}

{% if alertmanager_endpoints %}
    upstream alertmanager_servers {
     {% for ep in alertmanager_endpoints %}
     server {{ ep }};
     {% endfor %}
    }
{% endif %}

    include /etc/nginx_external_server.conf;
    include /etc/nginx_internal_server.conf;
}