summaryrefslogtreecommitdiff
path: root/interface-definitions/load-balancing-haproxy.xml.in
blob: e295dcb63703325c9b5c8cfbef9abc2a7c122d4e (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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
<?xml version="1.0"?>
<interfaceDefinition>
  <node name="load-balancing">
    <children>
      <node name="reverse-proxy" owner="${vyos_conf_scripts_dir}/load-balancing-haproxy.py">
        <properties>
          <help>Configure reverse-proxy</help>
        </properties>
        <children>
          <tagNode name="service">
            <properties>
              <help>Frontend service name</help>
              <constraint>
                #include <include/constraint/alpha-numeric-hyphen-underscore.xml.i>
              </constraint>
              <constraintErrorMessage>Server name must be alphanumeric and can contain hyphen and underscores</constraintErrorMessage>
            </properties>
            <children>
              <leafNode name="backend">
                <properties>
                  <help>Backend member</help>
                  <constraint>
                    #include <include/constraint/alpha-numeric-hyphen-underscore.xml.i>
                  </constraint>
                  <constraintErrorMessage>Backend name must be alphanumeric and can contain hyphen and underscores</constraintErrorMessage>
                  <valueHelp>
                    <format>txt</format>
                    <description>Name of reverse-proxy backend system</description>
                  </valueHelp>
                  <completionHelp>
                    <path>load-balancing reverse-proxy backend</path>
                  </completionHelp>
                  <multi/>
                </properties>
              </leafNode>
              #include <include/generic-description.xml.i>
              #include <include/listen-address.xml.i>
              #include <include/haproxy/mode.xml.i>
              #include <include/port-number.xml.i>
              #include <include/haproxy/rule-frontend.xml.i>
              <leafNode name="redirect-http-to-https">
                <properties>
                  <help>Redirect HTTP to HTTPS</help>
                  <valueless/>
                </properties>
              </leafNode>
              <node name="ssl">
                <properties>
                  <help>SSL Certificate, SSL Key and CA</help>
                </properties>
                <children>
                  #include <include/pki/certificate.xml.i>
                </children>
              </node>
            </children>
          </tagNode>
          <tagNode name="backend">
            <properties>
              <help>Backend server name</help>
              <constraint>
                #include <include/constraint/alpha-numeric-hyphen-underscore.xml.i>
              </constraint>
              <constraintErrorMessage>Backend name must be alphanumeric and can contain hyphen and underscores</constraintErrorMessage>
            </properties>
            <children>
              <leafNode name="balance">
                <properties>
                  <help>Load-balancing algorithm</help>
                  <completionHelp>
                    <list>source-address round-robin least-connection</list>
                  </completionHelp>
                  <valueHelp>
                    <format>source-address</format>
                    <description>Based on hash of source IP address</description>
                  </valueHelp>
                  <valueHelp>
                    <format>round-robin</format>
                    <description>Round robin</description>
                  </valueHelp>
                  <valueHelp>
                    <format>least-connection</format>
                    <description>Least connection</description>
                  </valueHelp>
                  <constraint>
                    <regex>(source-address|round-robin|least-connection)</regex>
                  </constraint>
                </properties>
                <defaultValue>round-robin</defaultValue>
              </leafNode>
              #include <include/generic-description.xml.i>
              #include <include/haproxy/mode.xml.i>
              <node name="parameters">
                <properties>
                  <help>Backend parameters</help>
                </properties>
                <children>
                  <leafNode name="http-check">
                    <properties>
                      <help>HTTP health check</help>
                      <valueless/>
                    </properties>
                  </leafNode>
                </children>
              </node>
              #include <include/haproxy/rule-backend.xml.i>
              <tagNode name="server">
                <properties>
                  <help>Backend server name</help>
                </properties>
                <children>
                  <leafNode name="address">
                    <properties>
                      <help>Backend server address</help>
                      <valueHelp>
                        <format>ipv4</format>
                        <description>IPv4 unicast peer address</description>
                      </valueHelp>
                      <valueHelp>
                        <format>ipv6</format>
                        <description>IPv6 unicast peer address</description>
                      </valueHelp>
                      <constraint>
                        <validator name="ip-address"/>
                      </constraint>
                    </properties>
                  </leafNode>
                  <leafNode name="check">
                    <properties>
                      <help>Active health check backend server</help>
                      <valueless/>
                    </properties>
                  </leafNode>
                  #include <include/port-number.xml.i>
                </children>
              </tagNode>
              <node name="ssl">
                <properties>
                  <help>SSL Certificate, SSL Key and CA</help>
                </properties>
                <children>
                  #include <include/pki/ca-certificate.xml.i>
                </children>
              </node>
              #include <include/haproxy/timeout.xml.i>
            </children>
          </tagNode>
          <node name="global-parameters">
            <properties>
              <help>Global perfomance parameters and limits</help>
            </properties>
            <children>
              <leafNode name="max-connections">
                <properties>
                  <help>Maximum allowed connections</help>
                  <valueHelp>
                    <format>u32:1-2000000</format>
                    <description>Maximum allowed connections</description>
                  </valueHelp>
                  <constraint>
                    <validator name="numeric" argument="--range 1-2000000"/>
                  </constraint>
                </properties>
              </leafNode>
              <leafNode name="ssl-bind-ciphers">
                <properties>
                  <help>Cipher algorithms ("cipher suite") used during SSL/TLS handshake for all frontend servers</help>
                  <completionHelp>
                    <list>ecdhe-ecdsa-aes128-gcm-sha256 ecdhe-rsa-aes128-gcm-sha256 ecdhe-ecdsa-aes256-gcm-sha384 ecdhe-rsa-aes256-gcm-sha384 ecdhe-ecdsa-chacha20-poly1305 ecdhe-rsa-chacha20-poly1305 dhe-rsa-aes128-gcm-sha256 dhe-rsa-aes256-gcm-sha384</list>
                  </completionHelp>
                  <valueHelp>
                    <format>ecdhe-ecdsa-aes128-gcm-sha256</format>
                    <description>ecdhe-ecdsa-aes128-gcm-sha256</description>
                  </valueHelp>
                  <valueHelp>
                    <format>ecdhe-rsa-aes128-gcm-sha256</format>
                    <description>ecdhe-rsa-aes128-gcm-sha256</description>
                  </valueHelp>
                  <valueHelp>
                    <format>ecdhe-ecdsa-aes256-gcm-sha384</format>
                    <description>ecdhe-ecdsa-aes256-gcm-sha384</description>
                  </valueHelp>
                  <valueHelp>
                    <format>ecdhe-rsa-aes256-gcm-sha384</format>
                    <description>ecdhe-rsa-aes256-gcm-sha384</description>
                  </valueHelp>
                  <valueHelp>
                    <format>ecdhe-ecdsa-chacha20-poly1305</format>
                    <description>ecdhe-ecdsa-chacha20-poly1305</description>
                  </valueHelp>
                  <valueHelp>
                    <format>ecdhe-rsa-chacha20-poly1305</format>
                    <description>ecdhe-rsa-chacha20-poly1305</description>
                  </valueHelp>
                  <valueHelp>
                    <format>dhe-rsa-aes128-gcm-sha256</format>
                    <description>dhe-rsa-aes128-gcm-sha256</description>
                  </valueHelp>
                  <valueHelp>
                    <format>dhe-rsa-aes256-gcm-sha384</format>
                    <description>dhe-rsa-aes256-gcm-sha384</description>
                  </valueHelp>
                  <constraint>
                    <regex>(ecdhe-ecdsa-aes128-gcm-sha256|ecdhe-rsa-aes128-gcm-sha256|ecdhe-ecdsa-aes256-gcm-sha384|ecdhe-rsa-aes256-gcm-sha384|ecdhe-ecdsa-chacha20-poly1305|ecdhe-rsa-chacha20-poly1305|dhe-rsa-aes128-gcm-sha256|dhe-rsa-aes256-gcm-sha384)</regex>
                  </constraint>
                  <multi/>
                </properties>
                <defaultValue>ecdhe-ecdsa-aes128-gcm-sha256 ecdhe-rsa-aes128-gcm-sha256 ecdhe-ecdsa-aes256-gcm-sha384 ecdhe-rsa-aes256-gcm-sha384 ecdhe-ecdsa-chacha20-poly1305 ecdhe-rsa-chacha20-poly1305 dhe-rsa-aes128-gcm-sha256 dhe-rsa-aes256-gcm-sha384</defaultValue>
              </leafNode>
              <leafNode name="tls-version-min">
                <properties>
                  <help>Specify the minimum required TLS version</help>
                  <completionHelp>
                    <list>1.2 1.3</list>
                  </completionHelp>
                  <valueHelp>
                    <format>1.2</format>
                    <description>TLS v1.2</description>
                  </valueHelp>
                  <valueHelp>
                    <format>1.3</format>
                    <description>TLS v1.3</description>
                  </valueHelp>
                  <constraint>
                    <regex>(1.2|1.3)</regex>
                  </constraint>
                </properties>
                <defaultValue>1.3</defaultValue>
              </leafNode>
            </children>
          </node>
          #include <include/interface/vrf.xml.i>
        </children>
      </node>
    </children>
  </node>
</interfaceDefinition>