vvp -- VNF Validation Platform
[oom.git] / kubernetes / vvp / charts / vvp-int-haproxy / resources / config / int-haproxy-cfg / file
1 # Copyright © 2018 Amdocs, AT&T, Bell Canada
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 #       http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14
15 resolvers dns
16     nameserver pod_dns "10.3.0.10:53"
17     resolve_retries    3
18     timeout retry      1s
19     hold valid         30s
20
21 defaults
22     mode http
23     timeout connect 5000ms
24     timeout client 50000ms
25     timeout server 50000ms
26     option httpclose
27     option redispatch
28     option abortonclose
29     option httplog
30     option dontlognull
31     default-server init-addr last,libc,none
32
33 backend gitlab_web_backend
34     mode http
35     server gitlab_web_1 vvp-gitlab:80 resolvers dns
36
37 frontend gitlab_web
38     mode http
39     bind 0.0.0.0:80
40
41     acl is_scanner  path_beg /imagescanner
42     acl is_em_admin hdr_beg(host) em.  staging-em.  dev-em.
43     acl is_cms      hdr_beg(host) cms. staging-cms. dev-cms.
44     acl is_ci_admin hdr_beg(host)      staging-ci.  dev-ci.
45     acl is_s3       hdr_beg(host) s3.  staging-s3.  dev-s3.
46
47     use_backend imagescanner if is_em_admin is_scanner
48     use_backend cms if is_cms
49     use_backend api if is_em_admin
50     use_backend ci  if is_ci_admin
51     use_backend s3  if is_s3
52
53     default_backend gitlab_web_backend
54
55 backend s3
56     mode http
57     balance roundrobin
58     server ceph-01 10.252.0.21:8080
59
60 backend cms
61   mode http
62   server cms_server vvp-cms-uwsgi:80 resolvers dns
63
64 backend api
65     mode http
66     server engagement_manager vvp-em-uwsgi:80 resolvers dns
67
68 backend ci
69     mode http
70     server ci_test vvp-ci-uwsgi:8282 resolvers dns
71
72 listen jenkins
73     bind 0.0.0.0:8080
74     server jenkins vvp-jenkins:8080 resolvers dns
75
76 backend imagescanner
77     mode http
78     server imagescanner vvp-imagescanner:80 resolvers dns
79
80 listen stats
81     bind 0.0.0.0:9000
82     mode http
83     stats enable  # Enable stats page
84     stats realm Haproxy\ Statistics
85     stats uri /haproxy_stats
86     stats auth "${HAPROXY_USER}:${HAPROXY_PASS}"
87     acl network_allowed src 10.252.0.0/16 127.0.0.1/32 10.2.0.0/16
88     block if !network_allowed