-
Notifications
You must be signed in to change notification settings - Fork 53
/
haproxy_spec.yaml
21049 lines (21048 loc) · 686 KB
/
haproxy_spec.yaml
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
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
---
swagger: "2.0"
info:
title: HAProxy Data Plane API
description: |
API for editing and managing haproxy instances. Provides process information, configuration management,
haproxy stats and logs.
version: '3.0'
contact:
name: HAProxy Support
url: https://my.haproxy.com/portal/cust/login
email: support@haproxy.com
externalDocs:
url: https://docs.haproxy.org/
description: HAProxy Documentation
definitions:
program:
description: HAProxy program configuration
example:
command: spoa-mirror --runtime 0 --mirror-url http://test.local
group: mygroupname
name: mirror
start-on-reload: enabled
user: myusername
properties:
command:
description: The command to be run, with flags and options.
type: string
group:
description: The group to run the command as, if different than the HAProxy group.
type: string
name:
pattern: ^[A-Za-z0-9-_.:]+$
type: string
x-nullable: false
start-on-reload:
description: HAProxy stops and recreates child programs at reload.
enum:
- enabled
- disabled
type: string
user:
description: The user to run the command as, if different than the HAProxy user.
type: string
required:
- name
- command
title: Program
type: object
programs:
type: array
items:
$ref: "#/definitions/program"
fcgiApp:
description: HAProxy FastCGI application configuration
properties:
docroot:
description: Defines the document root on the remote host. The parameter serves to build the default value of FastCGI parameters SCRIPT_FILENAME and PATH_TRANSLATED. It is a mandatory setting.
type: string
get_values:
description: Enables or disables the retrieval of variables related to connection management.
enum:
- enabled
- disabled
type: string
index:
description: Defines the script name to append after a URI that ends with a slash ("/") to set the default value for the FastCGI parameter SCRIPT_NAME. It is an optional setting.
type: string
keep_conn:
description: Tells the FastCGI application whether or not to keep the connection open after it sends a response. If disabled, the FastCGI application closes the connection after responding to this request.
enum:
- enabled
- disabled
type: string
log_stderrs:
items:
$ref: '#/definitions/fcgiLogStderr'
type: array
x-omitempty: true
max_reqs:
default: 1
description: Defines the maximum number of concurrent requests this application can accept. If the FastCGI application retrieves the variable FCGI_MAX_REQS during connection establishment, it can override this option. Furthermore, if the application does not do multiplexing, it will ignore this option.
minimum: 1
type: integer
mpxs_conns:
description: Enables or disables the support of connection multiplexing. If the FastCGI application retrieves the variable FCGI_MPXS_CONNS during connection establishment, it can override this option.
enum:
- enabled
- disabled
type: string
name:
description: Declares a FastCGI application
pattern: ^[^\s]+$
type: string
x-nullable: false
pass_headers:
items:
$ref: '#/definitions/fcgiPassHeader'
type: array
x-omitempty: true
path_info:
description: |-
Defines a regular expression to extract the script-name and the path-info from the URI.
Thus, <regex> must have two captures: the first to capture the script name, and the second to capture the path- info.
If not defined, it does not perform matching on the URI, and does not fill the FastCGI parameters PATH_INFO and PATH_TRANSLATED.
type: string
set_params:
items:
$ref: '#/definitions/fcgiSetParam'
type: array
x-omitempty: true
required:
- name
- docroot
title: FCGI application
type: object
fcgiApps:
type: array
items:
$ref: "#/definitions/fcgiApp"
fcgiSetParam:
description: |-
Sets a FastCGI parameter to pass to this application.
Its value, defined by <format> can take a formatted string, the same as the log directive.
Optionally, you can follow it with an ACL-based condition, in which case the FastCGI application evaluates it only if the condition is true.
properties:
cond:
enum:
- if
- unless
type: string
x-display-name: Condition
cond_test:
type: string
x-dependency:
cond:
required: true
x-display-name: Condition Test
format:
type: string
name:
type: string
type: object
fcgiPassHeader:
description: |-
Specifies the name of a request header to pass to the FastCGI application.
Optionally, you can follow it with an ACL-based condition, in which case the FastCGI application evaluates it only if the condition is true.
Most request headers are already available to the FastCGI application with the prefix "HTTP".
Thus, you only need this directive to pass headers that are purposefully omitted.
Currently, the headers "Authorization", "Proxy-Authorization", and hop-by-hop headers are omitted.
Note that the headers "Content-type" and "Content-length" never pass to the FastCGI application because they are already converted into parameters.
properties:
cond:
enum:
- if
- unless
type: string
x-display-name: Condition
cond_test:
type: string
x-dependency:
cond:
required: true
x-display-name: Condition Test
name:
type: string
type: object
fcgiLogStderr:
description: |-
Enables logging of STDERR messages that the FastCGI application reports.
It is an optional setting. By default, HAProxy Enterprise ignores STDERR messages.
properties:
address:
type: string
facility:
title: Facility
type: string
format:
title: Format
type: string
global:
title: Global
type: boolean
len:
title: Length
type: integer
level:
title: Level
type: string
x-dependency:
facility:
required: true
minlevel:
title: Minimum level
type: string
x-dependency:
facility:
required: true
sample:
properties:
ranges:
title: Range
type: string
size:
title: Size
type: integer
required:
- ranges
- size
title: Sample
type: object
type: object
bind_params:
additionalProperties: false
properties:
accept_netscaler_cip:
type: integer
accept_proxy:
type: boolean
allow_0rtt:
type: boolean
alpn:
pattern: ^[^\s]+$
type: string
x-display-name: ALPN Protocols
backlog:
type: string
ca_ignore_err:
type: string
x-dependency:
ssl:
value: true
ca_sign_file:
type: string
x-dependency:
ssl:
value: true
ca_sign_pass:
type: string
x-dependency:
ssl:
value: true
x-display-name: Passphrase
ca_verify_file:
type: string
x-dependency:
ca_file:
value: true
ciphers:
type: string
x-dependency:
ssl:
value: true
ciphersuites:
type: string
x-dependency:
ssl:
value: true
client_sigalgs:
type: string
x-dependency:
ssl:
value: true
crl_file:
type: string
x-dependency:
ssl:
value: true
crt_ignore_err:
type: string
x-dependency:
ssl:
value: true
crt_list:
type: string
x-dependency:
ssl:
value: true
curves:
type: string
x-dependency:
ssl:
value: true
default_crt_list:
items:
pattern: ^[^\s]+$
type: string
type: array
x-omitempty: true
defer_accept:
type: boolean
ecdhe:
type: string
x-dependency:
ssl:
value: true
expose_fd_listeners:
type: boolean
force_sslv3:
type: boolean
force_tlsv10:
type: boolean
force_tlsv11:
type: boolean
force_tlsv12:
type: boolean
force_tlsv13:
type: boolean
generate_certificates:
type: boolean
x-dependency:
ssl:
value: true
gid:
type: integer
x-display-name: Group ID
group:
type: string
x-display-name: Group name
guid_prefix:
pattern: ^[A-Za-z0-9-_.:]+$
type: string
id:
type: string
x-display-name: Socket ID
interface:
type: string
level:
enum:
- user
- operator
- admin
example: user
type: string
maxconn:
example: 1234
type: integer
mode:
type: string
mss:
type: string
name:
pattern: ^[^\s]+$
type: string
x-nullable: false
namespace:
example: app
type: string
nbconn:
type: integer
x-display-name: Number of connection
nice:
example: 1
type: integer
no_alpn:
type: boolean
x-dependency:
ssl:
value: true
no_ca_names:
type: boolean
x-dependency:
ssl:
value: true
no_sslv3:
type: boolean
x-dependency:
ssl:
value: true
no_tls_tickets:
type: boolean
x-dependency:
ssl:
value: true
no_tlsv10:
type: boolean
x-dependency:
ssl:
value: true
no_tlsv11:
type: boolean
x-dependency:
ssl:
value: true
no_tlsv12:
type: boolean
x-dependency:
ssl:
value: true
no_tlsv13:
type: boolean
x-dependency:
ssl:
value: true
npn:
type: string
prefer_client_ciphers:
type: boolean
proto:
type: string
x-display-name: Protocol name
quic-cc-algo:
enum:
- cubic
- newreno
type: string
quic-force-retry:
type: boolean
quic-socket:
enum:
- connection
- listener
type: string
severity_output:
enum:
- none
- number
- string
example: none
type: string
x-display-name: Format
sigalgs:
type: string
x-dependency:
ssl:
value: true
ssl:
type: boolean
ssl_cafile:
pattern: ^[^\s]+$
type: string
x-dependency:
ssl:
value: true
x-display-name: SSL CA File
ssl_certificate:
pattern: ^[^\s]+$
type: string
x-dependency:
ssl:
value: true
ssl_max_ver:
enum:
- SSLv3
- TLSv1.0
- TLSv1.1
- TLSv1.2
- TLSv1.3
type: string
ssl_min_ver:
enum:
- SSLv3
- TLSv1.0
- TLSv1.1
- TLSv1.2
- TLSv1.3
type: string
strict_sni:
type: boolean
x-dependency:
ssl:
value: true
tcp_user_timeout:
type: integer
x-nullable: true
tfo:
type: boolean
thread:
type: string
tls_ticket_keys:
type: string
transparent:
type: boolean
uid:
type: string
user:
type: string
v4v6:
type: boolean
v6only:
type: boolean
verify:
enum:
- none
- optional
- required
example: none
type: string
x-dependency:
ssl:
value: enabled
type: object
server_params:
properties:
agent-addr:
pattern: ^[^\s]+$
type: string
agent-check:
enum:
- enabled
- disabled
type: string
x-dependency:
agent-port:
required: true
agent-inter:
type: integer
x-nullable: true
agent-port:
maximum: 65535
minimum: 1
type: integer
x-nullable: true
agent-send:
type: string
allow_0rtt:
type: boolean
alpn:
pattern: ^[^\s]+$
type: string
x-display-name: ALPN Protocols
backup:
enum:
- enabled
- disabled
type: string
check:
enum:
- enabled
- disabled
type: string
check-send-proxy:
enum:
- enabled
- disabled
type: string
check-sni:
pattern: ^[^\s]+$
type: string
check-ssl:
enum:
- enabled
- disabled
type: string
check_alpn:
pattern: ^[^\s]+$
type: string
x-display-name: Protocols
check_proto:
pattern: ^[^\s]+$
type: string
x-display-name: Name
check_via_socks4:
enum:
- enabled
- disabled
type: string
ciphers:
type: string
x-dependency:
ssl:
value: enabled
ciphersuites:
type: string
x-dependency:
ssl:
value: enabled
client_sigalgs:
type: string
x-dependency:
ssl:
value: true
cookie:
pattern: ^[^\s]+$
type: string
crl_file:
type: string
x-dependency:
ssl:
value: enabled
curves:
type: string
x-dependency:
ssl:
value: true
downinter:
type: integer
x-nullable: true
error_limit:
type: integer
x-display-name: Error count
fall:
type: integer
x-display-name: Nr. of consecutive failed checks
x-nullable: true
fastinter:
type: integer
x-nullable: true
force_sslv3:
enum:
- enabled
- disabled
type: string
force_tlsv10:
enum:
- enabled
- disabled
type: string
force_tlsv11:
enum:
- enabled
- disabled
type: string
force_tlsv12:
enum:
- enabled
- disabled
type: string
force_tlsv13:
enum:
- enabled
- disabled
type: string
guid:
pattern: ^[A-Za-z0-9-_.:]+$
type: string
hash_key:
pattern: ^[^\s]+$
type: string
health_check_address:
pattern: ^[^\s]+$
type: string
health_check_port:
maximum: 65535
minimum: 1
type: integer
x-nullable: true
init-addr:
pattern: ^[^\s]+$
type: string
x-nullable: true
inter:
type: integer
x-nullable: true
log-bufsize:
type: integer
x-nullable: true
log_proto:
enum:
- legacy
- octet-count
type: string
maintenance:
enum:
- enabled
- disabled
type: string
max_reuse:
type: integer
x-nullable: true
maxconn:
type: integer
x-display-name: Max Concurrent Connections
x-nullable: true
maxqueue:
type: integer
x-display-name: Max Number of Connections
x-nullable: true
minconn:
type: integer
x-nullable: true
namespace:
type: string
no_sslv3:
enum:
- enabled
- disabled
type: string
no_tlsv10:
enum:
- enabled
- disabled
type: string
no_tlsv11:
enum:
- enabled
- disabled
type: string
no_tlsv12:
enum:
- enabled
- disabled
type: string
no_tlsv13:
enum:
- enabled
- disabled
type: string
no_verifyhost:
enum:
- enabled
- disabled
type: string
npn:
type: string
x-dependency:
ssl:
value: enabled
observe:
enum:
- layer4
- layer7
type: string
x-dependency:
ssl:
value: enabled
on-error:
enum:
- fastinter
- fail-check
- sudden-death
- mark-down
type: string
on-marked-down:
enum:
- shutdown-sessions
type: string
on-marked-up:
enum:
- shutdown-backup-sessions
type: string
pool_conn_name:
pattern: ^[^\s]+$
type: string
pool_low_conn:
type: integer
x-nullable: true
pool_max_conn:
type: integer
x-nullable: true
pool_purge_delay:
type: integer
x-nullable: true
proto:
pattern: ^[^\s]+$
type: string
proxy-v2-options:
items:
enum:
- authority
- cert-cn
- cert-key
- cert-sig
- crc32c
- ssl
- ssl-cipher
- unique-id
type: string
type: array
x-omitempty: true
redir:
type: string
x-display-name: Prefix
resolve-net:
pattern: ^([A-Za-z0-9.:/]+)(,[A-Za-z0-9.:/]+)*$
type: string
resolve-prefer:
enum:
- ipv4
- ipv6
type: string
resolve_opts:
pattern: ^(allow-dup-ip|ignore-weight|prevent-dup-ip)(,(allow-dup-ip|ignore-weight|prevent-dup-ip))*$
type: string
resolvers:
pattern: ^[^\s]+$
type: string
x-dynamic-enum:
operation: getResolvers
property: name
rise:
type: integer
x-nullable: true
send-proxy:
enum:
- enabled
- disabled
type: string
send-proxy-v2:
enum:
- enabled
- disabled
type: string
send_proxy_v2_ssl:
enum:
- enabled
- disabled
type: string
send_proxy_v2_ssl_cn:
enum:
- enabled
- disabled
type: string
set-proxy-v2-tlv-fmt:
properties:
id:
type: string
value:
type: string
required:
- id
- value
type: object
shard:
type: integer
sigalgs:
type: string
x-dependency:
ssl:
value: true
slowstart:
type: integer
x-nullable: true
sni:
pattern: ^[^\s]+$
type: string
socks4:
pattern: ^[^\s]+$
type: string
x-dependency:
check-via-socks4:
required: true
source:
type: string
ssl:
enum:
- enabled
- disabled
type: string
ssl_cafile:
pattern: ^[^\s]+$
type: string
x-dependency:
ssl:
value: enabled
x-display-name: SSL CA File
ssl_certificate:
pattern: ^[^\s]+$
type: string
x-dependency:
ssl:
value: enabled
ssl_max_ver:
enum:
- SSLv3
- TLSv1.0
- TLSv1.1
- TLSv1.2
- TLSv1.3
type: string
ssl_min_ver:
enum:
- SSLv3
- TLSv1.0
- TLSv1.1
- TLSv1.2
- TLSv1.3
type: string
ssl_reuse:
enum:
- enabled
- disabled
type: string
stick:
enum:
- enabled
- disabled
type: string
tcp_ut:
type: integer
x-nullable: true
tfo:
enum:
- enabled
- disabled
type: string
tls_tickets:
enum:
- enabled
- disabled
type: string
x-dependency:
ssl:
value: enabled
track:
type: string
verify:
enum:
- none
- required
type: string
x-dependency:
ssl:
value: enabled
verifyhost:
type: string
x-dependency:
ssl:
value: enabled
verify:
value: required
weight:
type: integer
x-nullable: true
ws:
enum:
- auto
- h1
- h2
type: string
x-display-name: Relaying websocket stream protocol
type: object
site:
additionalProperties: false
description: |
Site configuration. Sites are considered as one service and all farms connected to that service.
Farms are connected to service using use-backend and default_backend directives. Sites let you
configure simple HAProxy configurations, for more advanced options use /haproxy/configuration
endpoints.
example:
farms:
- balance:
algorithm: roundrobin
mode: http
name: www_backend
servers:
- address: 127.0.1.1
name: www_server
port: 4567
- address: 127.0.1.2
name: www_server_new
port: 4567
use_as: default
name: test_site
service:
http_connection_mode: httpclose
maxconn: 2000
mode: http
properties:
farms:
items:
properties:
balance:
$ref: '#/definitions/balance'
cond:
enum:
- if
- unless
type: string
x-dependency:
use_as:
required: true
value: conditional
x-display-name: Condition
cond_test:
type: string
x-dependency:
use_as:
required: true
value: conditional
x-display-name: Condition Test
forwardfor:
$ref: '#/definitions/forwardfor'
mode:
enum:
- http
- tcp
type: string
name:
pattern: ^[A-Za-z0-9-_.:]+$
type: string
x-nullable: false
servers:
items:
$ref: '#/definitions/server'
type: array
x-omitempty: true
use_as:
enum:
- default
- conditional
type: string
x-nullable: false
required:
- name
- use_as
type: object
x-go-name: SiteFarm
type: array
x-omitempty: true