From 0bfca6f9edf085d31a6cb338e333b7bc3103fb97 Mon Sep 17 00:00:00 2001 From: Goran Galinec Date: Mon, 18 Jul 2022 11:36:18 +0200 Subject: [PATCH] CLEANUP: refactor server params --- e2e/tests/servers/data/put.json | 8 +- e2e/tests/sites/data/post.json | 12 +- e2e/tests/sites/data/put.json | 12 +- embedded_spec.go | 5150 +++++++++---------------------- go.mod | 2 +- go.sum | 4 +- 6 files changed, 1539 insertions(+), 3649 deletions(-) diff --git a/e2e/tests/servers/data/put.json b/e2e/tests/servers/data/put.json index f94a46c0..3119ba77 100644 --- a/e2e/tests/servers/data/put.json +++ b/e2e/tests/servers/data/put.json @@ -1,8 +1,8 @@ { - "address": "10.1.1.2", "check": "enabled", - "name": "server_01", - "port": 8081, "proxy-v2-options": null, - "weight": 10 + "weight": 10, + "address": "10.1.1.2", + "name": "server_01", + "port": 8081 } diff --git a/e2e/tests/sites/data/post.json b/e2e/tests/sites/data/post.json index c7172824..ae099632 100644 --- a/e2e/tests/sites/data/post.json +++ b/e2e/tests/sites/data/post.json @@ -8,18 +8,18 @@ "name": "site_backend", "servers": [ { + "proxy-v2-options": null, + "weight": 30, "address": "127.0.1.1", "name": "site_server_01", - "port": 4567, - "proxy-v2-options": null, - "weight": 30 + "port": 4567 }, { + "proxy-v2-options": null, + "weight": 70, "address": "127.0.1.2", "name": "site_server_02", - "port": 4567, - "proxy-v2-options": null, - "weight": 70 + "port": 4567 } ], "use_as": "default" diff --git a/e2e/tests/sites/data/put.json b/e2e/tests/sites/data/put.json index 914b2ca0..3111e3c0 100644 --- a/e2e/tests/sites/data/put.json +++ b/e2e/tests/sites/data/put.json @@ -8,18 +8,18 @@ "name": "tcp_backend", "servers": [ { + "proxy-v2-options": null, + "weight": 30, "address": "127.0.1.1", "name": "tcp_server_01", - "port": 4567, - "proxy-v2-options": null, - "weight": 30 + "port": 4567 }, { + "proxy-v2-options": null, + "weight": 70, "address": "127.0.1.2", "name": "tcp_server_02", - "port": 4567, - "proxy-v2-options": null, - "weight": 70 + "port": 4567 } ], "use_as": "default" diff --git a/embedded_spec.go b/embedded_spec.go index c67eb28b..5904b914 100644 --- a/embedded_spec.go +++ b/embedded_spec.go @@ -15551,955 +15551,426 @@ func init() { "default_server": { "type": "object", "title": "Default Server", + "allOf": [ + { + "$ref": "#/definitions/server_params" + } + ], "properties": { - "address": { - "type": "string", - "pattern": "^[^\\s]+$", - "x-nullable": false - }, - "agent-addr": { - "type": "string", - "pattern": "^[^\\s]+$" - }, - "agent-check": { + "ca_file": { "type": "string", - "enum": [ - "enabled", - "disabled" - ], "x-dependency": { - "agent-port": { - "required": true + "ssl": { + "value": true } } }, - "agent-inter": { - "type": "integer", - "x-nullable": true - }, - "agent-port": { - "type": "integer", - "maximum": 65535, - "minimum": 1, - "x-nullable": true - }, - "agent-send": { - "type": "string" - }, - "allow_0rtt": { - "type": "boolean" - }, - "alpn": { - "type": "string", - "pattern": "^[^\\s]+$", - "x-display-name": "ALPN Protocols" - }, - "backup": { + "disabled": { "type": "string", "enum": [ "enabled", "disabled" ] }, - "ca_file": { - "type": "string", - "x-dependency": { - "ssl": { - "value": true - } - } - }, - "check": { + "enabled": { "type": "string", "enum": [ "enabled", "disabled" ] }, - "check-send-proxy": { + "port": { + "type": "integer", + "maximum": 65535, + "minimum": 1, + "x-nullable": true + } + } + }, + "defaults": { + "description": "HAProxy defaults configuration", + "type": "object", + "title": "Defaults", + "properties": { + "abortonclose": { "type": "string", "enum": [ "enabled", "disabled" ] }, - "check-sni": { - "type": "string", - "pattern": "^[^\\s]+$" - }, - "check-ssl": { + "accept_invalid_http_request": { "type": "string", "enum": [ "enabled", "disabled" - ] + ], + "x-display-name": "Accept Invalid HTTP Request" }, - "check_alpn": { + "accept_invalid_http_response": { "type": "string", - "pattern": "^[^\\s]+$", - "x-display-name": "Protocols" + "enum": [ + "enabled", + "disabled" + ], + "x-display-name": "Accept Invalid HTTP Response" }, - "check_proto": { + "adv_check": { "type": "string", - "pattern": "^[^\\s]+$", - "x-display-name": "Name" + "enum": [ + "ssl-hello-chk", + "smtpchk", + "ldap-check", + "mysql-check", + "pgsql-check", + "tcp-check", + "redis-check", + "httpchk" + ], + "x-display-name": "Advanced Check" }, - "check_via_socks4": { + "allbackups": { "type": "string", "enum": [ "enabled", "disabled" - ] + ], + "x-display-name": "All Backups" }, - "ciphers": { - "type": "string", - "x-dependency": { - "ssl": { - "value": "enabled" - } - } + "backlog": { + "type": "integer", + "x-display-name": "Backlog", + "x-nullable": true }, - "ciphersuites": { - "type": "string", - "x-dependency": { - "ssl": { - "value": "enabled" - } - } + "balance": { + "$ref": "#/definitions/balance" }, - "cookie": { + "bind_process": { "type": "string", "pattern": "^[^\\s]+$" }, - "crl_file": { - "type": "string", - "x-dependency": { - "ssl": { - "value": "enabled" - } - } + "check_timeout": { + "type": "integer", + "x-nullable": true }, - "disabled": { + "checkcache": { "type": "string", "enum": [ "enabled", "disabled" - ] + ], + "x-display-name": "Checkcache" }, - "downinter": { + "clflog": { + "type": "boolean", + "x-display-name": "CLF Log" + }, + "client_fin_timeout": { "type": "integer", "x-nullable": true }, - "enabled": { + "client_timeout": { + "type": "integer", + "x-nullable": true + }, + "clitcpka": { "type": "string", "enum": [ "enabled", "disabled" - ] + ], + "x-display-name": "Client TCP Keep Alive" }, - "error_limit": { + "clitcpka_cnt": { "type": "integer", - "x-display-name": "Error count" + "x-display-name": "Clitcpka Cnt", + "x-nullable": true }, - "fall": { + "clitcpka_idle": { "type": "integer", - "x-display-name": "Nr. of consecutive failed checks", + "x-display-name": "Clitcpka Idle", "x-nullable": true }, - "fastinter": { + "clitcpka_intvl": { "type": "integer", + "x-display-name": "Clitcpka Intvl", "x-nullable": true }, - "force_sslv3": { + "compression": { + "$ref": "#/definitions/compression" + }, + "connect_timeout": { + "type": "integer", + "x-nullable": true + }, + "contstats": { "type": "string", "enum": [ - "enabled", - "disabled" - ] + "enabled" + ], + "x-display-name": "Continuous Statistics" }, - "force_tlsv10": { + "cookie": { + "$ref": "#/definitions/cookie" + }, + "default_backend": { "type": "string", - "enum": [ - "enabled", - "disabled" - ] + "pattern": "^[A-Za-z0-9-_.:]+$", + "x-dynamic-enum": { + "operation": "getBackends", + "property": "name" + } }, - "force_tlsv11": { + "default_server": { + "$ref": "#/definitions/default_server" + }, + "disable_h2_upgrade": { "type": "string", "enum": [ "enabled", "disabled" - ] + ], + "x-display-name": "Disable HTTP/2 Upgrade" }, - "force_tlsv12": { + "dontlog_normal": { "type": "string", "enum": [ "enabled", "disabled" - ] + ], + "x-display-name": "Dontlog Normal" }, - "force_tlsv13": { + "dontlognull": { "type": "string", "enum": [ "enabled", "disabled" - ] - }, - "health_check_port": { - "type": "integer", - "maximum": 65535, - "minimum": 1, - "x-nullable": true + ], + "x-display-name": "Don't Log Null" }, - "init-addr": { + "dynamic_cookie_key": { "type": "string", "pattern": "^[^\\s]+$" }, - "inter": { - "type": "integer", - "x-nullable": true + "error_files": { + "type": "array", + "items": { + "$ref": "#/definitions/errorfile" + }, + "x-go-name": "ErrorFiles" }, - "log_proto": { + "external_check": { "type": "string", "enum": [ - "legacy", - "octet-count" - ] - }, - "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 + "enabled", + "disabled" + ], + "x-display-name": "External Check" }, - "minconn": { - "type": "integer", - "x-nullable": true + "external_check_command": { + "type": "string", + "pattern": "^[^\\s]+$", + "x-display-name": "External Check Command" }, - "name": { + "external_check_path": { "type": "string", "pattern": "^[^\\s]+$", - "x-nullable": false + "x-display-name": "External Check Path" }, - "namespace": { - "type": "string" + "forwardfor": { + "$ref": "#/definitions/forwardfor" }, - "no_sslv3": { + "h1_case_adjust_bogus_client": { "type": "string", "enum": [ "enabled", "disabled" - ] + ], + "x-display-name": "H1 Adjust Bogus Client" }, - "no_tlsv10": { + "h1_case_adjust_bogus_server": { "type": "string", "enum": [ "enabled", "disabled" - ] + ], + "x-display-name": "H1 Adjust Bogus Server" }, - "no_tlsv11": { + "http-buffer-request": { "type": "string", "enum": [ "enabled", "disabled" - ] + ], + "x-display-name": "HTTP bufferrequest" }, - "no_tlsv12": { + "http-check": { + "$ref": "#/definitions/http_check" + }, + "http-use-htx": { "type": "string", "enum": [ "enabled", "disabled" - ] + ], + "x-display-name": "HTTP Use HTX" }, - "no_tlsv13": { + "http_connection_mode": { "type": "string", "enum": [ - "enabled", - "disabled" + "httpclose", + "http-server-close", + "http-keep-alive" ] }, - "no_verifyhost": { + "http_ignore_probes": { "type": "string", "enum": [ "enabled", "disabled" - ] + ], + "x-display-name": "HTTP Ignore Probes" }, - "npn": { - "type": "string", - "x-dependency": { - "ssl": { - "value": "enabled" - } - } + "http_keep_alive_timeout": { + "type": "integer", + "x-nullable": true }, - "observe": { + "http_no_delay": { "type": "string", "enum": [ - "layer4", - "layer7" + "enabled", + "disabled" ], - "x-dependency": { - "ssl": { - "value": "enabled" - } - } + "x-display-name": "HTTP No Delay" }, - "on-error": { + "http_pretend_keepalive": { "type": "string", "enum": [ - "fastinter", - "fail-check", - "sudden-death", - "mark-down" + "enabled", + "disabled" ] }, - "on-marked-down": { + "http_request_timeout": { + "type": "integer", + "x-nullable": true + }, + "http_reuse": { "type": "string", "enum": [ - "shutdown-sessions" + "aggressive", + "always", + "never", + "safe" ] }, - "on-marked-up": { + "http_use_proxy_header": { "type": "string", "enum": [ - "shutdown-backup-sessions" - ] - }, - "pool_low_conn": { - "type": "integer", - "x-nullable": true - }, - "pool_max_conn": { - "type": "integer", - "x-nullable": true - }, - "pool_purge_delay": { - "type": "integer", - "x-nullable": true - }, - "port": { - "type": "integer", - "maximum": 65535, - "minimum": 1, - "x-nullable": true + "enabled", + "disabled" + ], + "x-display-name": "HTTP Use Proxy Header" }, - "proto": { - "type": "string", - "pattern": "^[^\\s]+$" + "httpchk_params": { + "$ref": "#/definitions/httpchk_params" }, - "proxy-v2-options": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "ssl", - "cert-cn", - "ssl-cipher", - "cert-sig", - "cert-key", - "authority", - "crc32c", - "unique-id" - ] - } + "httplog": { + "type": "boolean", + "x-display-name": "HTTP Log" }, - "redir": { + "httpslog": { "type": "string", - "x-display-name": "Prefix" + "enum": [ + "enabled", + "disabled" + ], + "x-display-name": "Httpslog" }, - "resolve-net": { + "idle_close_on_response": { "type": "string", - "pattern": "^[^\\s]+$", - "x-dependency": { - "resolvers": { - "required": true - } - } + "enum": [ + "enabled", + "disabled" + ], + "x-display-name": "Idle Close On Response" }, - "resolve-prefer": { + "independent_streams": { "type": "string", - "pattern": "^[^\\s]+$", "enum": [ - "ipv4", - "ipv6" + "enabled", + "disabled" ], - "x-dependency": { - "resolvers": { - "required": true - } - } + "x-display-name": "Independent Streams" }, - "resolve_opts": { + "load_server_state_from_file": { "type": "string", - "pattern": "^[^,\\s][^\\,]*[^,\\s]*$" + "enum": [ + "global", + "local", + "none" + ] }, - "resolvers": { - "type": "string", - "pattern": "^[^\\s]+$", - "x-dynamic-enum": { - "operation": "getResolvers", - "property": "name" - } + "log_format": { + "type": "string" }, - "rise": { - "type": "integer", - "x-nullable": true + "log_format_sd": { + "type": "string", + "x-display-name": "Log Format SD" }, - "send-proxy": { + "log_health_checks": { "type": "string", "enum": [ "enabled", "disabled" - ] + ], + "x-display-name": "Log Health Checks" }, - "send-proxy-v2": { + "log_separate_errors": { "type": "string", "enum": [ "enabled", "disabled" ] }, - "send_proxy_v2_ssl": { + "log_tag": { "type": "string", - "enum": [ - "enabled", - "disabled" - ] + "pattern": "^[^\\s]+$" }, - "send_proxy_v2_ssl_cn": { + "logasap": { "type": "string", "enum": [ "enabled", "disabled" - ] + ], + "x-display-name": "Log ASAP" }, - "slowstart": { + "maxconn": { "type": "integer", + "x-display-name": "Max Connections", "x-nullable": true }, - "sni": { + "mode": { "type": "string", - "pattern": "^[^\\s]+$" + "enum": [ + "tcp", + "http" + ] }, - "socks4": { - "type": "string", - "pattern": "^[^\\s]+$", - "x-dependency": { - "check-via-socks4": { - "required": true - } - } + "monitor_uri": { + "$ref": "#/definitions/monitor_uri" }, - "source": { - "type": "string" + "mysql_check_params": { + "$ref": "#/definitions/mysql_check_params" }, - "ssl": { + "nolinger": { "type": "string", "enum": [ "enabled", "disabled" - ] + ], + "x-display-name": "Nolinger" }, - "ssl_certificate": { - "type": "string", - "pattern": "^[^\\s]+$", - "x-dependency": { - "ssl": { - "value": "enabled" - } - } - }, - "ssl_max_ver": { - "type": "string", - "enum": [ - "SSLv3", - "TLSv1.0", - "TLSv1.1", - "TLSv1.2", - "TLSv1.3" - ] - }, - "ssl_min_ver": { - "type": "string", - "enum": [ - "SSLv3", - "TLSv1.0", - "TLSv1.1", - "TLSv1.2", - "TLSv1.3" - ] - }, - "ssl_reuse": { - "type": "string", - "enum": [ - "enabled", - "disabled" - ] - }, - "stick": { - "type": "string", - "enum": [ - "enabled", - "disabled" - ] - }, - "tcp_ut": { - "type": "integer" - }, - "tfo": { - "type": "string", - "enum": [ - "enabled", - "disabled" - ] - }, - "tls_tickets": { - "type": "string", - "enum": [ - "enabled", - "disabled" - ], - "x-dependency": { - "ssl": { - "value": "enabled" - } - } - }, - "track": { - "type": "string" - }, - "verify": { - "type": "string", - "enum": [ - "none", - "required" - ], - "x-dependency": { - "ssl": { - "value": "enabled" - } - } - }, - "verifyhost": { - "type": "string", - "x-dependency": { - "ssl": { - "value": "enabled" - }, - "verify": { - "value": "required" - } - } - }, - "weight": { - "type": "integer", - "x-nullable": true - }, - "ws": { - "type": "string", - "enum": [ - "auto", - "h1", - "h2" - ], - "x-display-name": "Relaying websocket stream protocol" - } - } - }, - "defaults": { - "description": "HAProxy defaults configuration", - "type": "object", - "title": "Defaults", - "properties": { - "abortonclose": { - "type": "string", - "enum": [ - "enabled", - "disabled" - ] - }, - "accept_invalid_http_request": { - "type": "string", - "enum": [ - "enabled", - "disabled" - ], - "x-display-name": "Accept Invalid HTTP Request" - }, - "accept_invalid_http_response": { - "type": "string", - "enum": [ - "enabled", - "disabled" - ], - "x-display-name": "Accept Invalid HTTP Response" - }, - "adv_check": { - "type": "string", - "enum": [ - "ssl-hello-chk", - "smtpchk", - "ldap-check", - "mysql-check", - "pgsql-check", - "tcp-check", - "redis-check", - "httpchk" - ], - "x-display-name": "Advanced Check" - }, - "allbackups": { - "type": "string", - "enum": [ - "enabled", - "disabled" - ], - "x-display-name": "All Backups" - }, - "backlog": { - "type": "integer", - "x-display-name": "Backlog", - "x-nullable": true - }, - "balance": { - "$ref": "#/definitions/balance" - }, - "bind_process": { - "type": "string", - "pattern": "^[^\\s]+$" - }, - "check_timeout": { - "type": "integer", - "x-nullable": true - }, - "checkcache": { - "type": "string", - "enum": [ - "enabled", - "disabled" - ], - "x-display-name": "Checkcache" - }, - "clflog": { - "type": "boolean", - "x-display-name": "CLF Log" - }, - "client_fin_timeout": { - "type": "integer", - "x-nullable": true - }, - "client_timeout": { - "type": "integer", - "x-nullable": true - }, - "clitcpka": { - "type": "string", - "enum": [ - "enabled", - "disabled" - ], - "x-display-name": "Client TCP Keep Alive" - }, - "clitcpka_cnt": { - "type": "integer", - "x-display-name": "Clitcpka Cnt", - "x-nullable": true - }, - "clitcpka_idle": { - "type": "integer", - "x-display-name": "Clitcpka Idle", - "x-nullable": true - }, - "clitcpka_intvl": { - "type": "integer", - "x-display-name": "Clitcpka Intvl", - "x-nullable": true - }, - "compression": { - "$ref": "#/definitions/compression" - }, - "connect_timeout": { - "type": "integer", - "x-nullable": true - }, - "contstats": { - "type": "string", - "enum": [ - "enabled" - ], - "x-display-name": "Continuous Statistics" - }, - "cookie": { - "$ref": "#/definitions/cookie" - }, - "default_backend": { - "type": "string", - "pattern": "^[A-Za-z0-9-_.:]+$", - "x-dynamic-enum": { - "operation": "getBackends", - "property": "name" - } - }, - "default_server": { - "$ref": "#/definitions/default_server" - }, - "disable_h2_upgrade": { - "type": "string", - "enum": [ - "enabled", - "disabled" - ], - "x-display-name": "Disable HTTP/2 Upgrade" - }, - "dontlog_normal": { - "type": "string", - "enum": [ - "enabled", - "disabled" - ], - "x-display-name": "Dontlog Normal" - }, - "dontlognull": { - "type": "string", - "enum": [ - "enabled", - "disabled" - ], - "x-display-name": "Don't Log Null" - }, - "dynamic_cookie_key": { - "type": "string", - "pattern": "^[^\\s]+$" - }, - "error_files": { - "type": "array", - "items": { - "$ref": "#/definitions/errorfile" - }, - "x-go-name": "ErrorFiles" - }, - "external_check": { - "type": "string", - "enum": [ - "enabled", - "disabled" - ], - "x-display-name": "External Check" - }, - "external_check_command": { - "type": "string", - "pattern": "^[^\\s]+$", - "x-display-name": "External Check Command" - }, - "external_check_path": { - "type": "string", - "pattern": "^[^\\s]+$", - "x-display-name": "External Check Path" - }, - "forwardfor": { - "$ref": "#/definitions/forwardfor" - }, - "h1_case_adjust_bogus_client": { - "type": "string", - "enum": [ - "enabled", - "disabled" - ], - "x-display-name": "H1 Adjust Bogus Client" - }, - "h1_case_adjust_bogus_server": { - "type": "string", - "enum": [ - "enabled", - "disabled" - ], - "x-display-name": "H1 Adjust Bogus Server" - }, - "http-buffer-request": { - "type": "string", - "enum": [ - "enabled", - "disabled" - ], - "x-display-name": "HTTP bufferrequest" - }, - "http-check": { - "$ref": "#/definitions/http_check" - }, - "http-use-htx": { - "type": "string", - "enum": [ - "enabled", - "disabled" - ], - "x-display-name": "HTTP Use HTX" - }, - "http_connection_mode": { - "type": "string", - "enum": [ - "httpclose", - "http-server-close", - "http-keep-alive" - ] - }, - "http_ignore_probes": { - "type": "string", - "enum": [ - "enabled", - "disabled" - ], - "x-display-name": "HTTP Ignore Probes" - }, - "http_keep_alive_timeout": { - "type": "integer", - "x-nullable": true - }, - "http_no_delay": { - "type": "string", - "enum": [ - "enabled", - "disabled" - ], - "x-display-name": "HTTP No Delay" - }, - "http_pretend_keepalive": { - "type": "string", - "enum": [ - "enabled", - "disabled" - ] - }, - "http_request_timeout": { - "type": "integer", - "x-nullable": true - }, - "http_reuse": { - "type": "string", - "enum": [ - "aggressive", - "always", - "never", - "safe" - ] - }, - "http_use_proxy_header": { - "type": "string", - "enum": [ - "enabled", - "disabled" - ], - "x-display-name": "HTTP Use Proxy Header" - }, - "httpchk_params": { - "$ref": "#/definitions/httpchk_params" - }, - "httplog": { - "type": "boolean", - "x-display-name": "HTTP Log" - }, - "httpslog": { - "type": "string", - "enum": [ - "enabled", - "disabled" - ], - "x-display-name": "Httpslog" - }, - "idle_close_on_response": { - "type": "string", - "enum": [ - "enabled", - "disabled" - ], - "x-display-name": "Idle Close On Response" - }, - "independent_streams": { - "type": "string", - "enum": [ - "enabled", - "disabled" - ], - "x-display-name": "Independent Streams" - }, - "load_server_state_from_file": { - "type": "string", - "enum": [ - "global", - "local", - "none" - ] - }, - "log_format": { - "type": "string" - }, - "log_format_sd": { - "type": "string", - "x-display-name": "Log Format SD" - }, - "log_health_checks": { - "type": "string", - "enum": [ - "enabled", - "disabled" - ], - "x-display-name": "Log Health Checks" - }, - "log_separate_errors": { - "type": "string", - "enum": [ - "enabled", - "disabled" - ] - }, - "log_tag": { - "type": "string", - "pattern": "^[^\\s]+$" - }, - "logasap": { - "type": "string", - "enum": [ - "enabled", - "disabled" - ], - "x-display-name": "Log ASAP" - }, - "maxconn": { - "type": "integer", - "x-display-name": "Max Connections", - "x-nullable": true - }, - "mode": { - "type": "string", - "enum": [ - "tcp", - "http" - ] - }, - "monitor_uri": { - "$ref": "#/definitions/monitor_uri" - }, - "mysql_check_params": { - "$ref": "#/definitions/mysql_check_params" - }, - "nolinger": { - "type": "string", - "enum": [ - "enabled", - "disabled" - ], - "x-display-name": "Nolinger" - }, - "originalto": { + "originalto": { "type": "string", "enum": [ "enabled", @@ -22195,12 +21666,45 @@ func init() { "name", "address" ], + "allOf": [ + { + "$ref": "#/definitions/server_params" + } + ], "properties": { "address": { "type": "string", "pattern": "^[^\\s]+$", "x-nullable": false }, + "id": { + "type": "integer", + "x-nullable": true + }, + "name": { + "type": "string", + "pattern": "^[^\\s]+$", + "x-nullable": false + }, + "port": { + "type": "integer", + "maximum": 65535, + "minimum": 1, + "x-nullable": true + } + }, + "additionalProperties": false, + "example": { + "address": "10.1.1.1", + "check": "enabled", + "name": "www", + "port": 8080, + "weight": 80 + } + }, + "server_params": { + "type": "object", + "properties": { "agent-addr": { "type": "string", "pattern": "^[^\\s]+$" @@ -22373,10 +21877,6 @@ func init() { "minimum": 1, "x-nullable": true }, - "id": { - "type": "integer", - "x-nullable": true - }, "init-addr": { "type": "string", "pattern": "^[^\\s]+$", @@ -22418,11 +21918,6 @@ func init() { "type": "integer", "x-nullable": true }, - "name": { - "type": "string", - "pattern": "^[^\\s]+$", - "x-nullable": false - }, "namespace": { "type": "string" }, @@ -22521,12 +22016,6 @@ func init() { "type": "integer", "x-nullable": true }, - "port": { - "type": "integer", - "maximum": 65535, - "minimum": 1, - "x-nullable": true - }, "proto": { "type": "string", "pattern": "^[^\\s]+$" @@ -22757,14 +22246,6 @@ func init() { ], "x-display-name": "Relaying websocket stream protocol" } - }, - "additionalProperties": false, - "example": { - "address": "10.1.1.1", - "check": "enabled", - "name": "www", - "port": 8080, - "weight": 80 } }, "server_switching_rule": { @@ -22837,880 +22318,344 @@ func init() { "num_or_range", "fqdn" ], + "allOf": [ + { + "$ref": "#/definitions/server_params" + } + ], "properties": { - "agent-addr": { - "type": "string", - "pattern": "^[^\\s]+$" - }, - "agent-check": { + "fqdn": { "type": "string", - "enum": [ - "enabled", - "disabled" - ], - "x-dependency": { - "agent-port": { - "required": true - } - } + "x-nullable": false }, - "agent-inter": { + "id": { "type": "integer", "x-nullable": true }, - "agent-port": { + "num_or_range": { + "type": "string", + "x-nullable": false + }, + "port": { "type": "integer", "maximum": 65535, "minimum": 1, "x-nullable": true }, - "agent-send": { - "type": "string" - }, - "allow_0rtt": { - "type": "boolean" - }, - "alpn": { - "type": "string", - "pattern": "^[^\\s]+$", - "x-display-name": "ALPN Protocols" - }, - "backup": { - "type": "string", - "enum": [ - "enabled", - "disabled" - ] - }, - "check": { - "type": "string", - "enum": [ - "enabled", - "disabled" - ] - }, - "check-send-proxy": { - "type": "string", - "enum": [ - "enabled", - "disabled" - ] - }, - "check-sni": { - "type": "string", - "pattern": "^[^\\s]+$" - }, - "check-ssl": { - "type": "string", - "enum": [ - "enabled", - "disabled" - ] - }, - "check_alpn": { - "type": "string", - "pattern": "^[^\\s]+$", - "x-display-name": "Protocols" - }, - "check_proto": { + "prefix": { "type": "string", "pattern": "^[^\\s]+$", - "x-display-name": "Name" + "x-nullable": false + } + }, + "additionalProperties": false, + "example": { + "fqdn": "google.com", + "num_or_range": "1-3", + "port": 80, + "prefix": "srv" + } + }, + "server_templates": { + "description": "HAProxy backend server templates array", + "type": "array", + "title": "Server templates", + "items": { + "$ref": "#/definitions/server_template" + } + }, + "servers": { + "description": "HAProxy backend servers array", + "type": "array", + "title": "Servers", + "items": { + "$ref": "#/definitions/server" + } + }, + "site": { + "description": "Site configuration. Sites are considered as one service and all farms connected to that service.\nFarms are connected to service using use-backend and default_backend directives. Sites let you\nconfigure simple HAProxy configurations, for more advanced options use /haproxy/configuration\nendpoints.\n", + "type": "object", + "title": "Site", + "required": [ + "name" + ], + "properties": { + "farms": { + "type": "array", + "items": { + "type": "object", + "required": [ + "name", + "use_as" + ], + "properties": { + "balance": { + "$ref": "#/definitions/balance" + }, + "cond": { + "type": "string", + "enum": [ + "if", + "unless" + ], + "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": { + "type": "string", + "enum": [ + "http", + "tcp" + ] + }, + "name": { + "type": "string", + "pattern": "^[A-Za-z0-9-_.:]+$", + "x-nullable": false + }, + "servers": { + "type": "array", + "items": { + "$ref": "#/definitions/server" + } + }, + "use_as": { + "type": "string", + "enum": [ + "default", + "conditional" + ], + "x-nullable": false + } + }, + "x-go-name": "SiteFarm" + } }, - "check_via_socks4": { + "name": { "type": "string", - "enum": [ - "enabled", - "disabled" - ] + "pattern": "^[A-Za-z0-9-_.:]+$", + "x-nullable": false }, - "ciphers": { - "type": "string", - "x-dependency": { - "ssl": { - "value": "enabled" + "service": { + "type": "object", + "properties": { + "http_connection_mode": { + "type": "string", + "enum": [ + "http-tunnel", + "httpclose", + "forced-close", + "http-server-close", + "http-keep-alive" + ], + "x-dependency": { + "mode": { + "value": "http" + } + }, + "x-display-name": "HTTP Connection Mode" + }, + "listeners": { + "type": "array", + "items": { + "$ref": "#/definitions/bind" + } + }, + "maxconn": { + "type": "integer", + "x-display-name": "Max Connections", + "x-nullable": true + }, + "mode": { + "type": "string", + "enum": [ + "http", + "tcp" + ] } } - }, - "ciphersuites": { - "type": "string", - "x-dependency": { - "ssl": { - "value": "enabled" - } + } + }, + "additionalProperties": false, + "example": { + "farms": [ + { + "balance": { + "algorithm": "roundrobin" + }, + "mode": "http", + "name": "www_backend", + "servers": [ + { + "address": "127.0.1.1", + "name": "www_server", + "port": 4567, + "weight": 30 + }, + { + "address": "127.0.1.2", + "name": "www_server_new", + "port": 4567, + "weight": 70 + } + ], + "use_as": "default" } - }, - "cookie": { - "type": "string", - "pattern": "^[^\\s]+$" - }, - "crl_file": { - "type": "string", - "x-dependency": { - "ssl": { - "value": "enabled" + ], + "name": "test_site", + "service": { + "http_connection_mode": "httpclose", + "listeners": [ + { + "address": "127.0.0.1", + "name": "test_listener", + "port": 80 + }, + { + "address": "127.0.0.1", + "name": "test_listener_2", + "port": 8080 } - } - }, - "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 + ], + "maxconn": 2000, + "mode": "http" + } + } + }, + "sites": { + "description": "Sites array. Sites are considered as one service and all farms connected to that service.\nFarms are connected to service using use-backend and default_backend directives. Sites let you\nconfigure simple HAProxy configurations, for more advanced options use /haproxy/configuration\nendpoints.\n", + "type": "array", + "title": "Sites", + "items": { + "$ref": "#/definitions/site" + } + }, + "smtpchk_params": { + "type": "object", + "properties": { + "domain": { + "type": "string" }, - "force_sslv3": { + "hello": { + "type": "string" + } + } + }, + "spoe_agent": { + "description": "SPOE agent configuration", + "type": "object", + "title": "SPOE agent", + "required": [ + "name" + ], + "properties": { + "async": { "type": "string", "enum": [ "enabled", "disabled" ] }, - "force_tlsv10": { + "continue-on-error": { "type": "string", "enum": [ - "enabled", - "disabled" + "enabled" ] }, - "force_tlsv11": { + "dontlog-normal": { "type": "string", "enum": [ "enabled", "disabled" ] }, - "force_tlsv12": { - "type": "string", - "enum": [ - "enabled", - "disabled" - ] + "engine-name": { + "type": "string" }, - "force_tlsv13": { + "force-set-var": { "type": "string", "enum": [ - "enabled", - "disabled" + "enabled" ] }, - "fqdn": { - "type": "string", - "x-nullable": false + "groups": { + "type": "string" }, - "health_check_port": { - "type": "integer", - "maximum": 65535, - "minimum": 1, - "x-nullable": true + "hello_timeout": { + "type": "integer" }, - "id": { - "type": "integer", - "x-nullable": true + "idle_timeout": { + "type": "integer" }, - "init-addr": { - "type": "string", - "pattern": "^[^\\s]+$", - "x-nullable": true + "log": { + "$ref": "#/definitions/log_targets" }, - "inter": { - "type": "integer", - "x-nullable": true + "max-frame-size": { + "type": "integer" }, - "log_proto": { - "type": "string", - "enum": [ - "legacy", - "octet-count" - ] + "max-waiting-frames": { + "type": "integer" }, - "maintenance": { - "type": "string", - "enum": [ - "enabled", - "disabled" - ] + "maxconnrate": { + "type": "integer" }, - "max_reuse": { - "type": "integer", - "x-nullable": true + "maxerrrate": { + "type": "integer" }, - "maxconn": { - "type": "integer", - "x-display-name": "Max Concurrent Connections", - "x-nullable": true + "messages": { + "type": "string" }, - "maxqueue": { - "type": "integer", - "x-display-name": "Max Number of Connections", - "x-nullable": true + "name": { + "type": "string" }, - "minconn": { - "type": "integer", - "x-nullable": true + "option_set-on-error": { + "type": "string", + "pattern": "^[A-Za-z0-9-_.]+$" }, - "namespace": { - "type": "string" + "option_set-process-time": { + "type": "string", + "pattern": "^[A-Za-z0-9-_.]+$" }, - "no_sslv3": { + "option_set-total-time": { "type": "string", - "enum": [ - "enabled", - "disabled" - ] + "pattern": "^[A-Za-z0-9-_.]+$" }, - "no_tlsv10": { + "option_var-prefix": { "type": "string", - "enum": [ - "enabled", - "disabled" - ] + "pattern": "^[A-Za-z0-9-_.]+$" }, - "no_tlsv11": { + "pipelining": { "type": "string", "enum": [ "enabled", "disabled" ] }, - "no_tlsv12": { - "type": "string", - "enum": [ - "enabled", - "disabled" - ] - }, - "no_tlsv13": { - "type": "string", - "enum": [ - "enabled", - "disabled" - ] - }, - "no_verifyhost": { - "type": "string", - "enum": [ - "enabled", - "disabled" - ] - }, - "npn": { - "type": "string", - "x-dependency": { - "ssl": { - "value": "enabled" - } - } - }, - "num_or_range": { - "type": "string", - "x-nullable": false - }, - "observe": { - "type": "string", - "enum": [ - "layer4", - "layer7" - ], - "x-dependency": { - "ssl": { - "value": "enabled" - } - } - }, - "on-error": { - "type": "string", - "enum": [ - "fastinter", - "fail-check", - "sudden-death", - "mark-down" - ] - }, - "on-marked-down": { - "type": "string", - "enum": [ - "shutdown-sessions" - ] - }, - "on-marked-up": { - "type": "string", - "enum": [ - "shutdown-backup-sessions" - ] - }, - "pool_low_conn": { - "type": "integer", - "x-nullable": true - }, - "pool_max_conn": { - "type": "integer", - "x-nullable": true - }, - "pool_purge_delay": { - "type": "integer", - "x-nullable": true - }, - "port": { - "type": "integer", - "maximum": 65535, - "minimum": 1, - "x-nullable": true - }, - "prefix": { - "type": "string", - "pattern": "^[^\\s]+$", - "x-nullable": false - }, - "proto": { - "type": "string", - "pattern": "^[^\\s]+$" - }, - "proxy-v2-options": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "ssl", - "cert-cn", - "ssl-cipher", - "cert-sig", - "cert-key", - "authority", - "crc32c", - "unique-id" - ] - } - }, - "redir": { - "type": "string", - "x-display-name": "Prefix" - }, - "resolve-net": { - "type": "string", - "pattern": "^[^,\\s][^\\,]*[^,\\s]*$", - "x-dependency": { - "resolvers": { - "required": true - } - } - }, - "resolve-prefer": { - "type": "string", - "enum": [ - "ipv4", - "ipv6" - ], - "x-dependency": { - "resolvers": { - "required": true - } - } - }, - "resolve_opts": { - "type": "string", - "pattern": "^[^,\\s][^\\,]*[^,\\s]*$" - }, - "resolvers": { - "type": "string", - "pattern": "^[^\\s]+$", - "x-dynamic-enum": { - "operation": "getResolvers", - "property": "name" - } - }, - "rise": { - "type": "integer", - "x-nullable": true - }, - "send-proxy": { - "type": "string", - "enum": [ - "enabled", - "disabled" - ] - }, - "send-proxy-v2": { - "type": "string", - "enum": [ - "enabled", - "disabled" - ] - }, - "send_proxy_v2_ssl": { - "type": "string", - "enum": [ - "enabled", - "disabled" - ] - }, - "send_proxy_v2_ssl_cn": { - "type": "string", - "enum": [ - "enabled", - "disabled" - ] - }, - "slowstart": { - "type": "integer", - "x-nullable": true - }, - "sni": { - "type": "string", - "pattern": "^[^\\s]+$" - }, - "socks4": { - "type": "string", - "pattern": "^[^\\s]+$", - "x-dependency": { - "check-via-socks4": { - "required": true - } - } - }, - "source": { - "type": "string" - }, - "ssl": { - "type": "string", - "enum": [ - "enabled", - "disabled" - ] - }, - "ssl_cafile": { - "type": "string", - "pattern": "^[^\\s]+$", - "x-dependency": { - "ssl": { - "value": "enabled" - } - }, - "x-display-name": "SSL CA File" - }, - "ssl_certificate": { - "type": "string", - "pattern": "^[^\\s]+$", - "x-dependency": { - "ssl": { - "value": "enabled" - } - } - }, - "ssl_max_ver": { - "type": "string", - "enum": [ - "SSLv3", - "TLSv1.0", - "TLSv1.1", - "TLSv1.2", - "TLSv1.3" - ] - }, - "ssl_min_ver": { - "type": "string", - "enum": [ - "SSLv3", - "TLSv1.0", - "TLSv1.1", - "TLSv1.2", - "TLSv1.3" - ] - }, - "ssl_reuse": { - "type": "string", - "enum": [ - "enabled", - "disabled" - ] - }, - "stick": { - "type": "string", - "enum": [ - "enabled", - "disabled" - ] - }, - "tcp_ut": { - "type": "integer" - }, - "tfo": { - "type": "string", - "enum": [ - "enabled", - "disabled" - ] - }, - "tls_tickets": { - "type": "string", - "enum": [ - "enabled", - "disabled" - ], - "x-dependency": { - "ssl": { - "value": "enabled" - } - } - }, - "track": { - "type": "string" - }, - "verify": { - "type": "string", - "enum": [ - "none", - "required" - ], - "x-dependency": { - "ssl": { - "value": "enabled" - } - } - }, - "verifyhost": { - "type": "string", - "x-dependency": { - "ssl": { - "value": "enabled" - }, - "verify": { - "value": "required" - } - } - }, - "weight": { - "type": "integer", - "x-nullable": true - }, - "ws": { - "type": "string", - "enum": [ - "auto", - "h1", - "h2" - ], - "x-display-name": "Relaying websocket stream protocol" - } - }, - "additionalProperties": false, - "example": { - "fqdn": "google.com", - "num_or_range": "1-3", - "port": 80, - "prefix": "srv" - } - }, - "server_templates": { - "description": "HAProxy backend server templates array", - "type": "array", - "title": "Server templates", - "items": { - "$ref": "#/definitions/server_template" - } - }, - "servers": { - "description": "HAProxy backend servers array", - "type": "array", - "title": "Servers", - "items": { - "$ref": "#/definitions/server" - } - }, - "site": { - "description": "Site configuration. Sites are considered as one service and all farms connected to that service.\nFarms are connected to service using use-backend and default_backend directives. Sites let you\nconfigure simple HAProxy configurations, for more advanced options use /haproxy/configuration\nendpoints.\n", - "type": "object", - "title": "Site", - "required": [ - "name" - ], - "properties": { - "farms": { - "type": "array", - "items": { - "type": "object", - "required": [ - "name", - "use_as" - ], - "properties": { - "balance": { - "$ref": "#/definitions/balance" - }, - "cond": { - "type": "string", - "enum": [ - "if", - "unless" - ], - "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": { - "type": "string", - "enum": [ - "http", - "tcp" - ] - }, - "name": { - "type": "string", - "pattern": "^[A-Za-z0-9-_.:]+$", - "x-nullable": false - }, - "servers": { - "type": "array", - "items": { - "$ref": "#/definitions/server" - } - }, - "use_as": { - "type": "string", - "enum": [ - "default", - "conditional" - ], - "x-nullable": false - } - }, - "x-go-name": "SiteFarm" - } - }, - "name": { - "type": "string", - "pattern": "^[A-Za-z0-9-_.:]+$", - "x-nullable": false - }, - "service": { - "type": "object", - "properties": { - "http_connection_mode": { - "type": "string", - "enum": [ - "http-tunnel", - "httpclose", - "forced-close", - "http-server-close", - "http-keep-alive" - ], - "x-dependency": { - "mode": { - "value": "http" - } - }, - "x-display-name": "HTTP Connection Mode" - }, - "listeners": { - "type": "array", - "items": { - "$ref": "#/definitions/bind" - } - }, - "maxconn": { - "type": "integer", - "x-display-name": "Max Connections", - "x-nullable": true - }, - "mode": { - "type": "string", - "enum": [ - "http", - "tcp" - ] - } - } - } - }, - "additionalProperties": false, - "example": { - "farms": [ - { - "balance": { - "algorithm": "roundrobin" - }, - "mode": "http", - "name": "www_backend", - "servers": [ - { - "address": "127.0.1.1", - "name": "www_server", - "port": 4567, - "weight": 30 - }, - { - "address": "127.0.1.2", - "name": "www_server_new", - "port": 4567, - "weight": 70 - } - ], - "use_as": "default" - } - ], - "name": "test_site", - "service": { - "http_connection_mode": "httpclose", - "listeners": [ - { - "address": "127.0.0.1", - "name": "test_listener", - "port": 80 - }, - { - "address": "127.0.0.1", - "name": "test_listener_2", - "port": 8080 - } - ], - "maxconn": 2000, - "mode": "http" - } - } - }, - "sites": { - "description": "Sites array. Sites are considered as one service and all farms connected to that service.\nFarms are connected to service using use-backend and default_backend directives. Sites let you\nconfigure simple HAProxy configurations, for more advanced options use /haproxy/configuration\nendpoints.\n", - "type": "array", - "title": "Sites", - "items": { - "$ref": "#/definitions/site" - } - }, - "smtpchk_params": { - "type": "object", - "properties": { - "domain": { - "type": "string" - }, - "hello": { - "type": "string" - } - } - }, - "spoe_agent": { - "description": "SPOE agent configuration", - "type": "object", - "title": "SPOE agent", - "required": [ - "name" - ], - "properties": { - "async": { - "type": "string", - "enum": [ - "enabled", - "disabled" - ] - }, - "continue-on-error": { - "type": "string", - "enum": [ - "enabled" - ] - }, - "dontlog-normal": { - "type": "string", - "enum": [ - "enabled", - "disabled" - ] - }, - "engine-name": { - "type": "string" - }, - "force-set-var": { - "type": "string", - "enum": [ - "enabled" - ] - }, - "groups": { - "type": "string" - }, - "hello_timeout": { - "type": "integer" - }, - "idle_timeout": { - "type": "integer" - }, - "log": { - "$ref": "#/definitions/log_targets" - }, - "max-frame-size": { - "type": "integer" - }, - "max-waiting-frames": { - "type": "integer" - }, - "maxconnrate": { - "type": "integer" - }, - "maxerrrate": { - "type": "integer" - }, - "messages": { - "type": "string" - }, - "name": { - "type": "string" - }, - "option_set-on-error": { - "type": "string", - "pattern": "^[A-Za-z0-9-_.]+$" - }, - "option_set-process-time": { - "type": "string", - "pattern": "^[A-Za-z0-9-_.]+$" - }, - "option_set-total-time": { - "type": "string", - "pattern": "^[A-Za-z0-9-_.]+$" - }, - "option_var-prefix": { - "type": "string", - "pattern": "^[A-Za-z0-9-_.]+$" - }, - "pipelining": { - "type": "string", - "enum": [ - "enabled", - "disabled" - ] - }, - "processing_timeout": { - "type": "integer" - }, - "register-var-names": { - "type": "string" - }, - "send-frag-payload": { + "processing_timeout": { + "type": "integer" + }, + "register-var-names": { + "type": "string" + }, + "send-frag-payload": { "type": "string", "enum": [ "enabled", @@ -48272,841 +47217,312 @@ func init() { }, "description": { "type": "string", - "readOnly": true - }, - "log_targets": { - "type": "array", - "items": { - "$ref": "#/definitions/ClusterSettingsClusterLogTargetsItems0" - }, - "x-go-name": "ClusterLogTargets" - }, - "name": { - "type": "string", - "readOnly": true - }, - "port": { - "type": "integer", - "maximum": 65535, - "minimum": 1, - "x-nullable": true, - "readOnly": true - } - } - }, - "mode": { - "type": "string", - "enum": [ - "single", - "cluster" - ] - }, - "status": { - "type": "string", - "enum": [ - "active", - "unreachable", - "waiting_approval" - ], - "readOnly": true - } - } - }, - "compression": { - "type": "object", - "properties": { - "algorithms": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "identity", - "gzip", - "deflate", - "raw-deflate" - ] - } - }, - "offload": { - "type": "boolean" - }, - "types": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "config_stick_table": { - "type": "object", - "properties": { - "expire": { - "type": "integer", - "x-nullable": true - }, - "keylen": { - "type": "integer", - "x-display-name": "Key Length", - "x-nullable": true - }, - "nopurge": { - "type": "boolean", - "x-display-name": "No Purge" - }, - "peers": { - "type": "string", - "pattern": "^[^\\s]+$" - }, - "size": { - "type": "integer", - "x-nullable": true - }, - "store": { - "type": "string", - "pattern": "^[^\\s]+$" - }, - "type": { - "type": "string", - "enum": [ - "ip", - "ipv6", - "integer", - "string", - "binary" - ] - } - } - }, - "consul": { - "description": "Consul server configuration", - "type": "object", - "title": "Consul server", - "required": [ - "address", - "port", - "enabled", - "retry_timeout" - ], - "properties": { - "address": { - "type": "string", - "pattern": "^[^\\s]+$" - }, - "description": { - "type": "string" - }, - "enabled": { - "type": "boolean" - }, - "id": { - "description": "Auto generated ID.", - "type": "string", - "pattern": "^[^\\s]+$", - "x-nullable": true - }, - "name": { - "type": "string" - }, - "namespace": { - "type": "string" - }, - "port": { - "type": "integer", - "maximum": 65535, - "minimum": 1 - }, - "retry_timeout": { - "description": "Duration in seconds in-between data pulling requests to the consul server", - "type": "integer", - "minimum": 1 - }, - "server_slots_base": { - "type": "integer", - "default": 10 - }, - "server_slots_growth_increment": { - "type": "integer" - }, - "server_slots_growth_type": { - "type": "string", - "default": "exponential", - "enum": [ - "linear", - "exponential" - ] - }, - "service-blacklist": { - "description": "deprecated, use service_denylist", - "type": "array", - "items": { - "type": "string", - "pattern": "^[^\\s]+$" - } - }, - "service-whitelist": { - "description": "deprecated, use service_allowlist", - "type": "array", - "items": { - "type": "string", - "pattern": "^[^\\s]+$" - } - }, - "service_allowlist": { - "type": "array", - "items": { - "type": "string", - "pattern": "^[^\\s]+$" - } - }, - "service_denylist": { - "type": "array", - "items": { - "type": "string", - "pattern": "^[^\\s]+$" - } - }, - "token": { - "type": "string", - "pattern": "^[^\\s]+$" - } - }, - "additionalProperties": false, - "example": { - "address": "127.0.0.1", - "enabled": true, - "id": "0", - "port": 90, - "retry_timeout": 10 - } - }, - "consuls": { - "description": "Consuls array", - "type": "array", - "title": "Consuls", - "items": { - "$ref": "#/definitions/consul" - } - }, - "cookie": { - "type": "object", - "required": [ - "name" - ], - "properties": { - "domain": { - "type": "array", - "items": { - "$ref": "#/definitions/CookieDomainItems0" - }, - "x-go-name": "Domains" - }, - "dynamic": { - "type": "boolean" - }, - "httponly": { - "type": "boolean" - }, - "indirect": { - "type": "boolean" - }, - "maxidle": { - "type": "integer" - }, - "maxlife": { - "type": "integer" - }, - "name": { - "type": "string", - "pattern": "^[^\\s]+$" - }, - "nocache": { - "type": "boolean" - }, - "postonly": { - "type": "boolean" - }, - "preserve": { - "type": "boolean" - }, - "secure": { - "type": "boolean" - }, - "type": { - "type": "string", - "enum": [ - "rewrite", - "insert", - "prefix" - ] - } - } - }, - "default_server": { - "type": "object", - "title": "Default Server", - "properties": { - "address": { - "type": "string", - "pattern": "^[^\\s]+$", - "x-nullable": false - }, - "agent-addr": { - "type": "string", - "pattern": "^[^\\s]+$" - }, - "agent-check": { - "type": "string", - "enum": [ - "enabled", - "disabled" - ], - "x-dependency": { - "agent-port": { - "required": true - } - } - }, - "agent-inter": { - "type": "integer", - "x-nullable": true - }, - "agent-port": { - "type": "integer", - "maximum": 65535, - "minimum": 1, - "x-nullable": true - }, - "agent-send": { - "type": "string" - }, - "allow_0rtt": { - "type": "boolean" - }, - "alpn": { - "type": "string", - "pattern": "^[^\\s]+$", - "x-display-name": "ALPN Protocols" - }, - "backup": { - "type": "string", - "enum": [ - "enabled", - "disabled" - ] - }, - "ca_file": { - "type": "string", - "x-dependency": { - "ssl": { - "value": true - } - } - }, - "check": { - "type": "string", - "enum": [ - "enabled", - "disabled" - ] - }, - "check-send-proxy": { - "type": "string", - "enum": [ - "enabled", - "disabled" - ] - }, - "check-sni": { - "type": "string", - "pattern": "^[^\\s]+$" - }, - "check-ssl": { - "type": "string", - "enum": [ - "enabled", - "disabled" - ] - }, - "check_alpn": { - "type": "string", - "pattern": "^[^\\s]+$", - "x-display-name": "Protocols" - }, - "check_proto": { - "type": "string", - "pattern": "^[^\\s]+$", - "x-display-name": "Name" - }, - "check_via_socks4": { - "type": "string", - "enum": [ - "enabled", - "disabled" - ] - }, - "ciphers": { - "type": "string", - "x-dependency": { - "ssl": { - "value": "enabled" - } - } - }, - "ciphersuites": { - "type": "string", - "x-dependency": { - "ssl": { - "value": "enabled" - } - } - }, - "cookie": { - "type": "string", - "pattern": "^[^\\s]+$" - }, - "crl_file": { - "type": "string", - "x-dependency": { - "ssl": { - "value": "enabled" - } - } - }, - "disabled": { - "type": "string", - "enum": [ - "enabled", - "disabled" - ] - }, - "downinter": { - "type": "integer", - "x-nullable": true - }, - "enabled": { - "type": "string", - "enum": [ - "enabled", - "disabled" - ] - }, - "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": { - "type": "string", - "enum": [ - "enabled", - "disabled" - ] - }, - "force_tlsv10": { - "type": "string", - "enum": [ - "enabled", - "disabled" - ] - }, - "force_tlsv11": { - "type": "string", - "enum": [ - "enabled", - "disabled" - ] + "readOnly": true + }, + "log_targets": { + "type": "array", + "items": { + "$ref": "#/definitions/ClusterSettingsClusterLogTargetsItems0" + }, + "x-go-name": "ClusterLogTargets" + }, + "name": { + "type": "string", + "readOnly": true + }, + "port": { + "type": "integer", + "maximum": 65535, + "minimum": 1, + "x-nullable": true, + "readOnly": true + } + } }, - "force_tlsv12": { + "mode": { "type": "string", "enum": [ - "enabled", - "disabled" + "single", + "cluster" ] }, - "force_tlsv13": { + "status": { "type": "string", "enum": [ - "enabled", - "disabled" - ] - }, - "health_check_port": { - "type": "integer", - "maximum": 65535, - "minimum": 1, - "x-nullable": true + "active", + "unreachable", + "waiting_approval" + ], + "readOnly": true + } + } + }, + "compression": { + "type": "object", + "properties": { + "algorithms": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "identity", + "gzip", + "deflate", + "raw-deflate" + ] + } }, - "init-addr": { - "type": "string", - "pattern": "^[^\\s]+$" + "offload": { + "type": "boolean" }, - "inter": { + "types": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "config_stick_table": { + "type": "object", + "properties": { + "expire": { "type": "integer", "x-nullable": true }, - "log_proto": { - "type": "string", - "enum": [ - "legacy", - "octet-count" - ] - }, - "max_reuse": { + "keylen": { "type": "integer", + "x-display-name": "Key Length", "x-nullable": true }, - "maxconn": { - "type": "integer", - "x-display-name": "Max Concurrent Connections", - "x-nullable": true + "nopurge": { + "type": "boolean", + "x-display-name": "No Purge" }, - "maxqueue": { - "type": "integer", - "x-display-name": "Max Number of Connections", - "x-nullable": true + "peers": { + "type": "string", + "pattern": "^[^\\s]+$" }, - "minconn": { + "size": { "type": "integer", "x-nullable": true }, - "name": { - "type": "string", - "pattern": "^[^\\s]+$", - "x-nullable": false - }, - "namespace": { - "type": "string" - }, - "no_sslv3": { - "type": "string", - "enum": [ - "enabled", - "disabled" - ] - }, - "no_tlsv10": { - "type": "string", - "enum": [ - "enabled", - "disabled" - ] - }, - "no_tlsv11": { - "type": "string", - "enum": [ - "enabled", - "disabled" - ] - }, - "no_tlsv12": { + "store": { "type": "string", - "enum": [ - "enabled", - "disabled" - ] + "pattern": "^[^\\s]+$" }, - "no_tlsv13": { + "type": { "type": "string", "enum": [ - "enabled", - "disabled" + "ip", + "ipv6", + "integer", + "string", + "binary" ] - }, - "no_verifyhost": { + } + } + }, + "consul": { + "description": "Consul server configuration", + "type": "object", + "title": "Consul server", + "required": [ + "address", + "port", + "enabled", + "retry_timeout" + ], + "properties": { + "address": { "type": "string", - "enum": [ - "enabled", - "disabled" - ] + "pattern": "^[^\\s]+$" }, - "npn": { - "type": "string", - "x-dependency": { - "ssl": { - "value": "enabled" - } - } + "description": { + "type": "string" }, - "observe": { - "type": "string", - "enum": [ - "layer4", - "layer7" - ], - "x-dependency": { - "ssl": { - "value": "enabled" - } - } + "enabled": { + "type": "boolean" }, - "on-error": { + "id": { + "description": "Auto generated ID.", "type": "string", - "enum": [ - "fastinter", - "fail-check", - "sudden-death", - "mark-down" - ] + "pattern": "^[^\\s]+$", + "x-nullable": true }, - "on-marked-down": { - "type": "string", - "enum": [ - "shutdown-sessions" - ] + "name": { + "type": "string" }, - "on-marked-up": { - "type": "string", - "enum": [ - "shutdown-backup-sessions" - ] + "namespace": { + "type": "string" }, - "pool_low_conn": { + "port": { "type": "integer", - "x-nullable": true + "maximum": 65535, + "minimum": 1 }, - "pool_max_conn": { + "retry_timeout": { + "description": "Duration in seconds in-between data pulling requests to the consul server", "type": "integer", - "x-nullable": true + "minimum": 1 }, - "pool_purge_delay": { + "server_slots_base": { "type": "integer", - "x-nullable": true + "default": 10 }, - "port": { - "type": "integer", - "maximum": 65535, - "minimum": 1, - "x-nullable": true + "server_slots_growth_increment": { + "type": "integer" }, - "proto": { + "server_slots_growth_type": { "type": "string", - "pattern": "^[^\\s]+$" + "default": "exponential", + "enum": [ + "linear", + "exponential" + ] }, - "proxy-v2-options": { + "service-blacklist": { + "description": "deprecated, use service_denylist", "type": "array", "items": { "type": "string", - "enum": [ - "ssl", - "cert-cn", - "ssl-cipher", - "cert-sig", - "cert-key", - "authority", - "crc32c", - "unique-id" - ] + "pattern": "^[^\\s]+$" } }, - "redir": { - "type": "string", - "x-display-name": "Prefix" + "service-whitelist": { + "description": "deprecated, use service_allowlist", + "type": "array", + "items": { + "type": "string", + "pattern": "^[^\\s]+$" + } }, - "resolve-net": { - "type": "string", - "pattern": "^[^\\s]+$", - "x-dependency": { - "resolvers": { - "required": true - } + "service_allowlist": { + "type": "array", + "items": { + "type": "string", + "pattern": "^[^\\s]+$" } }, - "resolve-prefer": { - "type": "string", - "pattern": "^[^\\s]+$", - "enum": [ - "ipv4", - "ipv6" - ], - "x-dependency": { - "resolvers": { - "required": true - } + "service_denylist": { + "type": "array", + "items": { + "type": "string", + "pattern": "^[^\\s]+$" } }, - "resolve_opts": { + "token": { "type": "string", - "pattern": "^[^,\\s][^\\,]*[^,\\s]*$" + "pattern": "^[^\\s]+$" + } + }, + "additionalProperties": false, + "example": { + "address": "127.0.0.1", + "enabled": true, + "id": "0", + "port": 90, + "retry_timeout": 10 + } + }, + "consuls": { + "description": "Consuls array", + "type": "array", + "title": "Consuls", + "items": { + "$ref": "#/definitions/consul" + } + }, + "cookie": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "domain": { + "type": "array", + "items": { + "$ref": "#/definitions/CookieDomainItems0" + }, + "x-go-name": "Domains" }, - "resolvers": { - "type": "string", - "pattern": "^[^\\s]+$", - "x-dynamic-enum": { - "operation": "getResolvers", - "property": "name" - } + "dynamic": { + "type": "boolean" }, - "rise": { - "type": "integer", - "x-nullable": true + "httponly": { + "type": "boolean" }, - "send-proxy": { - "type": "string", - "enum": [ - "enabled", - "disabled" - ] + "indirect": { + "type": "boolean" }, - "send-proxy-v2": { - "type": "string", - "enum": [ - "enabled", - "disabled" - ] + "maxidle": { + "type": "integer" }, - "send_proxy_v2_ssl": { - "type": "string", - "enum": [ - "enabled", - "disabled" - ] + "maxlife": { + "type": "integer" }, - "send_proxy_v2_ssl_cn": { + "name": { "type": "string", - "enum": [ - "enabled", - "disabled" - ] + "pattern": "^[^\\s]+$" }, - "slowstart": { - "type": "integer", - "x-nullable": true + "nocache": { + "type": "boolean" }, - "sni": { - "type": "string", - "pattern": "^[^\\s]+$" + "postonly": { + "type": "boolean" }, - "socks4": { - "type": "string", - "pattern": "^[^\\s]+$", - "x-dependency": { - "check-via-socks4": { - "required": true - } - } + "preserve": { + "type": "boolean" }, - "source": { - "type": "string" + "secure": { + "type": "boolean" }, - "ssl": { + "type": { "type": "string", "enum": [ - "enabled", - "disabled" + "rewrite", + "insert", + "prefix" ] - }, - "ssl_certificate": { + } + } + }, + "default_server": { + "type": "object", + "title": "Default Server", + "allOf": [ + { + "$ref": "#/definitions/server_params" + } + ], + "properties": { + "ca_file": { "type": "string", - "pattern": "^[^\\s]+$", "x-dependency": { "ssl": { - "value": "enabled" + "value": true } } }, - "ssl_max_ver": { - "type": "string", - "enum": [ - "SSLv3", - "TLSv1.0", - "TLSv1.1", - "TLSv1.2", - "TLSv1.3" - ] - }, - "ssl_min_ver": { - "type": "string", - "enum": [ - "SSLv3", - "TLSv1.0", - "TLSv1.1", - "TLSv1.2", - "TLSv1.3" - ] - }, - "ssl_reuse": { - "type": "string", - "enum": [ - "enabled", - "disabled" - ] - }, - "stick": { + "disabled": { "type": "string", "enum": [ "enabled", "disabled" ] }, - "tcp_ut": { - "type": "integer" - }, - "tfo": { + "enabled": { "type": "string", "enum": [ "enabled", "disabled" ] }, - "tls_tickets": { - "type": "string", - "enum": [ - "enabled", - "disabled" - ], - "x-dependency": { - "ssl": { - "value": "enabled" - } - } - }, - "track": { - "type": "string" - }, - "verify": { - "type": "string", - "enum": [ - "none", - "required" - ], - "x-dependency": { - "ssl": { - "value": "enabled" - } - } - }, - "verifyhost": { - "type": "string", - "x-dependency": { - "ssl": { - "value": "enabled" - }, - "verify": { - "value": "required" - } - } - }, - "weight": { + "port": { "type": "integer", + "maximum": 65535, + "minimum": 1, "x-nullable": true - }, - "ws": { - "type": "string", - "enum": [ - "auto", - "h1", - "h2" - ], - "x-display-name": "Relaying websocket stream protocol" } } }, @@ -54092,1586 +52508,982 @@ func init() { "type": "integer", "x-nullable": true }, - "hrsp_2xx": { - "type": "integer", - "x-nullable": true - }, - "hrsp_3xx": { - "type": "integer", - "x-nullable": true - }, - "hrsp_4xx": { - "type": "integer", - "x-nullable": true - }, - "hrsp_5xx": { - "type": "integer", - "x-nullable": true - }, - "hrsp_other": { - "type": "integer", - "x-nullable": true - }, - "iid": { - "type": "integer", - "x-nullable": true - }, - "intercepted": { - "type": "integer", - "x-dependency": { - "type": [ - "frontend", - "backend" - ] - }, - "x-nullable": true - }, - "lastchg": { - "type": "integer", - "x-dependency": { - "type": [ - "server", - "backend" - ] - }, - "x-nullable": true - }, - "lastsess": { - "type": "integer", - "x-dependency": { - "type": [ - "server", - "backend" - ] - }, - "x-nullable": true - }, - "lbtot": { - "type": "integer", - "x-dependency": { - "type": [ - "server", - "backend" - ] - }, - "x-nullable": true - }, - "mode": { - "type": "string", - "enum": [ - "tcp", - "http", - "health", - "unknown" - ] - }, - "pid": { - "type": "integer", - "x-nullable": true - }, - "qcur": { - "type": "integer", - "x-dependency": { - "type": [ - "server", - "backend" - ] - }, - "x-nullable": true - }, - "qlimit": { - "type": "integer", - "x-dependency": { - "type": [ - "server", - "backend" - ] - }, - "x-nullable": true - }, - "qmax": { - "type": "integer", - "x-dependency": { - "type": [ - "server", - "backend" - ] - }, - "x-nullable": true - }, - "qtime": { - "type": "integer", - "x-dependency": { - "type": [ - "server", - "backend" - ] - }, - "x-nullable": true - }, - "rate": { - "type": "integer", - "x-nullable": true - }, - "rate_lim": { - "type": "integer", - "x-dependency": { - "type": "frontend" - }, - "x-nullable": true - }, - "rate_max": { - "type": "integer", - "x-nullable": true - }, - "req_rate": { - "type": "integer", - "x-dependency": { - "type": "frontend" - }, - "x-nullable": true - }, - "req_rate_max": { - "type": "integer", - "x-dependency": { - "type": "frontend" - }, - "x-nullable": true - }, - "req_tot": { - "type": "integer", - "x-dependency": { - "type": [ - "frontend", - "backend" - ] - }, - "x-nullable": true - }, - "rtime": { - "type": "integer", - "x-dependency": { - "type": [ - "server", - "backend" - ] - }, - "x-nullable": true - }, - "scur": { - "type": "integer", - "x-nullable": true - }, - "sid": { - "type": "integer", - "x-dependency": { - "type": "server" - }, - "x-nullable": true - }, - "slim": { - "type": "integer", - "x-nullable": true - }, - "smax": { - "type": "integer", - "x-nullable": true - }, - "srv_abrt": { - "type": "integer", - "x-dependency": { - "type": [ - "server", - "backend" - ] - }, - "x-nullable": true - }, - "status": { - "type": "string", - "enum": [ - "UP", - "DOWN", - "NOLB", - "MAINT", - "no check" - ] - }, - "stot": { - "type": "integer", - "x-nullable": true - }, - "throttle": { - "type": "integer", - "x-dependency": { - "type": "server" - }, - "x-nullable": true - }, - "tracked": { - "type": "string", - "x-dependency": { - "type": "server" - } - }, - "ttime": { - "type": "integer", - "x-dependency": { - "type": [ - "server", - "backend" - ] - }, - "x-nullable": true - }, - "weight": { - "type": "integer", - "x-dependency": { - "type": [ - "server", - "backend" - ] - }, - "x-nullable": true - }, - "wredis": { - "type": "integer", - "x-dependency": { - "type": [ - "server", - "backend" - ] - }, - "x-nullable": true - }, - "wretr": { - "type": "integer", - "x-dependency": { - "type": [ - "server", - "backend" - ] - }, - "x-nullable": true - } - }, - "example": { - "bin": 4326578, - "bout": 889901290, - "comp_byp": 0, - "comp_in": 0, - "comp_out": 0, - "comp_rsp": 0, - "conn_rate": 12, - "conn_rate_max": 456, - "conn_tot": 45682, - "dcon": 0, - "dreq": 4, - "dresp": 1, - "dses": 0, - "ereq": 54, - "hrsp_1xx": 0, - "hrsp_2xx": 165, - "hrsp_3xx": 12, - "hrsp_4xx": 50, - "hrsp_5xx": 4, - "hrsp_other": 0, - "iid": 0, - "intercepted": 346, - "mode": "http", - "pid": 3204, - "rate": 64, - "rate_lim": 20000, - "rate_max": 4000, - "req_rate": 49, - "req_rate_max": 3965, - "req_total": 1254786, - "scur": 129, - "slim": 2000, - "smax": 2000, - "status": "UP", - "stot": 12902 - } - }, - "native_stats": { - "description": "HAProxy stats array", - "type": "array", - "title": "Stats Array", - "items": { - "$ref": "#/definitions/native_stats_collection" - } - }, - "native_stats_collection": { - "description": "Stats from one runtime API", - "type": "object", - "title": "Stats collection", - "properties": { - "error": { - "type": "string" - }, - "runtimeAPI": { - "type": "string" - }, - "stats": { - "type": "array", - "items": { - "$ref": "#/definitions/native_stat" - } - } - } - }, - "peer_entries": { - "description": "HAProxy peer entries array", - "type": "array", - "title": "Peer entries", - "items": { - "$ref": "#/definitions/peer_entry" - } - }, - "peer_entry": { - "description": "Peer Entry from peers table", - "type": "object", - "title": "Peer Entry", - "required": [ - "name", - "address", - "port" - ], - "properties": { - "address": { - "type": "string", - "pattern": "^[^\\s]+$" - }, - "name": { - "type": "string", - "pattern": "^[A-Za-z0-9-_.:]+$", - "x-nullable": false - }, - "port": { - "type": "integer", - "maximum": 65535, - "minimum": 1, - "x-nullable": true - } - } - }, - "peer_section": { - "description": "HAProxy peer_section configuration", - "type": "object", - "title": "Peer Section", - "required": [ - "name" - ], - "properties": { - "name": { - "type": "string", - "pattern": "^[A-Za-z0-9-_.:]+$", - "x-nullable": false - } - }, - "additionalProperties": false - }, - "peer_sections": { - "description": "HAProxy peer_section array", - "type": "array", - "title": "Peer_Section", - "items": { - "$ref": "#/definitions/peer_section" - } - }, - "pgsql_check_params": { - "type": "object", - "properties": { - "username": { - "type": "string" - } - } - }, - "process_info": { - "type": "object", - "properties": { - "error": { - "type": "string" - }, - "info": { - "$ref": "#/definitions/process_info_item" - }, - "runtimeAPI": { - "type": "string" - } - } - }, - "process_info_item": { - "type": "object", - "properties": { - "active_peers": { - "type": "integer", - "x-nullable": true - }, - "busy_polling": { - "type": "integer", - "x-nullable": true - }, - "bytes_out_rate": { - "type": "integer", - "x-nullable": true - }, - "compress_bps_in": { - "type": "integer", - "x-nullable": true - }, - "compress_bps_out": { - "type": "integer", - "x-nullable": true - }, - "compress_bps_rate_lim": { - "type": "integer", - "x-nullable": true - }, - "conn_rate": { - "type": "integer", - "x-nullable": true - }, - "conn_rate_limit": { - "type": "integer", - "x-nullable": true - }, - "connected_peers": { - "type": "integer", - "x-nullable": true - }, - "cum_conns": { - "type": "integer", - "x-nullable": true - }, - "cum_req": { - "type": "integer", - "x-nullable": true - }, - "cum_ssl_conns": { - "type": "integer", - "x-nullable": true - }, - "curr_conns": { - "type": "integer", - "x-nullable": true - }, - "curr_ssl_conns": { - "type": "integer", - "x-nullable": true - }, - "dropped_logs": { - "type": "integer", - "x-nullable": true - }, - "failed_resolutions": { - "type": "integer", - "x-nullable": true - }, - "hard_max_conn": { - "type": "integer", - "x-nullable": true - }, - "idle_pct": { - "type": "integer", - "x-nullable": true - }, - "jobs": { - "type": "integer", - "x-nullable": true - }, - "listeners": { - "type": "integer", - "x-nullable": true - }, - "max_conn": { - "type": "integer", - "x-nullable": true - }, - "max_conn_rate": { - "type": "integer", - "x-nullable": true - }, - "max_pipes": { - "type": "integer", - "x-nullable": true - }, - "max_sess_rate": { - "type": "integer", - "x-nullable": true - }, - "max_sock": { + "hrsp_2xx": { "type": "integer", "x-nullable": true }, - "max_ssl_conns": { + "hrsp_3xx": { "type": "integer", "x-nullable": true }, - "max_ssl_rate": { + "hrsp_4xx": { "type": "integer", "x-nullable": true }, - "max_zlib_mem_usage": { + "hrsp_5xx": { "type": "integer", "x-nullable": true }, - "mem_max_mb": { + "hrsp_other": { "type": "integer", "x-nullable": true }, - "nbthread": { - "description": "Number of threads", + "iid": { "type": "integer", - "x-display-name": "Number of Threads", "x-nullable": true }, - "node": { - "type": "string" - }, - "pid": { - "description": "Process id of the replying worker process", + "intercepted": { "type": "integer", - "x-display-name": "PID", + "x-dependency": { + "type": [ + "frontend", + "backend" + ] + }, "x-nullable": true }, - "pipes_free": { + "lastchg": { "type": "integer", + "x-dependency": { + "type": [ + "server", + "backend" + ] + }, "x-nullable": true }, - "pipes_used": { + "lastsess": { "type": "integer", + "x-dependency": { + "type": [ + "server", + "backend" + ] + }, "x-nullable": true }, - "pool_alloc_mb": { + "lbtot": { "type": "integer", + "x-dependency": { + "type": [ + "server", + "backend" + ] + }, "x-nullable": true }, - "pool_failed": { + "mode": { + "type": "string", + "enum": [ + "tcp", + "http", + "health", + "unknown" + ] + }, + "pid": { "type": "integer", "x-nullable": true }, - "pool_used_mb": { + "qcur": { "type": "integer", + "x-dependency": { + "type": [ + "server", + "backend" + ] + }, "x-nullable": true }, - "process_num": { - "description": "Process number", + "qlimit": { "type": "integer", - "x-display-name": "Process Number", + "x-dependency": { + "type": [ + "server", + "backend" + ] + }, "x-nullable": true }, - "processes": { - "description": "Number of spawned processes", + "qmax": { "type": "integer", - "x-display-name": "Number of processes", + "x-dependency": { + "type": [ + "server", + "backend" + ] + }, "x-nullable": true }, - "release_date": { - "description": "HAProxy version release date", - "type": "string", - "format": "date" - }, - "run_queue": { + "qtime": { "type": "integer", + "x-dependency": { + "type": [ + "server", + "backend" + ] + }, "x-nullable": true }, - "sess_rate": { + "rate": { "type": "integer", "x-nullable": true }, - "sess_rate_limit": { + "rate_lim": { "type": "integer", + "x-dependency": { + "type": "frontend" + }, "x-nullable": true }, - "ssl_backend_key_rate": { + "rate_max": { "type": "integer", "x-nullable": true }, - "ssl_backend_max_key_rate": { + "req_rate": { "type": "integer", + "x-dependency": { + "type": "frontend" + }, "x-nullable": true }, - "ssl_cache_lookups": { + "req_rate_max": { "type": "integer", + "x-dependency": { + "type": "frontend" + }, "x-nullable": true }, - "ssl_cache_misses": { + "req_tot": { "type": "integer", + "x-dependency": { + "type": [ + "frontend", + "backend" + ] + }, "x-nullable": true }, - "ssl_frontend_key_rate": { + "rtime": { "type": "integer", + "x-dependency": { + "type": [ + "server", + "backend" + ] + }, "x-nullable": true }, - "ssl_frontend_max_key_rate": { + "scur": { "type": "integer", "x-nullable": true }, - "ssl_frontend_session_reuse": { + "sid": { "type": "integer", + "x-dependency": { + "type": "server" + }, "x-nullable": true }, - "ssl_rate": { + "slim": { "type": "integer", "x-nullable": true }, - "ssl_rate_limit": { + "smax": { "type": "integer", "x-nullable": true }, - "stopping": { + "srv_abrt": { "type": "integer", + "x-dependency": { + "type": [ + "server", + "backend" + ] + }, "x-nullable": true }, - "tasks": { + "status": { + "type": "string", + "enum": [ + "UP", + "DOWN", + "NOLB", + "MAINT", + "no check" + ] + }, + "stot": { "type": "integer", "x-nullable": true }, - "total_bytes_out": { + "throttle": { "type": "integer", + "x-dependency": { + "type": "server" + }, "x-nullable": true }, - "ulimit_n": { + "tracked": { + "type": "string", + "x-dependency": { + "type": "server" + } + }, + "ttime": { "type": "integer", + "x-dependency": { + "type": [ + "server", + "backend" + ] + }, "x-nullable": true }, - "unstoppable": { + "weight": { "type": "integer", + "x-dependency": { + "type": [ + "server", + "backend" + ] + }, "x-nullable": true }, - "uptime": { - "description": "HAProxy uptime in s", + "wredis": { "type": "integer", + "x-dependency": { + "type": [ + "server", + "backend" + ] + }, "x-nullable": true }, - "version": { - "description": "HAProxy version string", - "type": "string" - }, - "zlib_mem_usage": { + "wretr": { "type": "integer", + "x-dependency": { + "type": [ + "server", + "backend" + ] + }, "x-nullable": true } + }, + "example": { + "bin": 4326578, + "bout": 889901290, + "comp_byp": 0, + "comp_in": 0, + "comp_out": 0, + "comp_rsp": 0, + "conn_rate": 12, + "conn_rate_max": 456, + "conn_tot": 45682, + "dcon": 0, + "dreq": 4, + "dresp": 1, + "dses": 0, + "ereq": 54, + "hrsp_1xx": 0, + "hrsp_2xx": 165, + "hrsp_3xx": 12, + "hrsp_4xx": 50, + "hrsp_5xx": 4, + "hrsp_other": 0, + "iid": 0, + "intercepted": 346, + "mode": "http", + "pid": 3204, + "rate": 64, + "rate_lim": 20000, + "rate_max": 4000, + "req_rate": 49, + "req_rate_max": 3965, + "req_total": 1254786, + "scur": 129, + "slim": 2000, + "smax": 2000, + "status": "UP", + "stot": 12902 } }, - "process_infos": { - "description": "General HAProxy process information", + "native_stats": { + "description": "HAProxy stats array", "type": "array", - "title": "HAProxy Information", + "title": "Stats Array", "items": { - "$ref": "#/definitions/process_info" - } - }, - "redispatch": { - "type": "object", - "required": [ - "enabled" - ], - "properties": { - "enabled": { - "type": "string", - "enum": [ - "enabled", - "disabled" - ] - }, - "interval": { - "type": "integer", - "x-nullable": false - } + "$ref": "#/definitions/native_stats_collection" } }, - "reload": { - "description": "HAProxy reload", + "native_stats_collection": { + "description": "Stats from one runtime API", "type": "object", - "title": "HAProxy reload", + "title": "Stats collection", "properties": { - "id": { - "type": "string", - "pattern": "^\\d{4}-\\d{2}-\\d{2}-\\d+$" - }, - "reload_timestamp": { - "type": "integer" + "error": { + "type": "string" }, - "response": { + "runtimeAPI": { "type": "string" }, - "status": { - "type": "string", - "enum": [ - "failed", - "in_progress", - "succeeded" - ] + "stats": { + "type": "array", + "items": { + "$ref": "#/definitions/native_stat" + } } - }, - "example": { - "id": "2019-01-03-44", - "status": "in_progress" } }, - "reloads": { - "description": "HAProxy reloads array", + "peer_entries": { + "description": "HAProxy peer entries array", "type": "array", - "title": "HAProxy Reloads Array", + "title": "Peer entries", "items": { - "$ref": "#/definitions/reload" + "$ref": "#/definitions/peer_entry" } }, - "resolver": { - "description": "Runtime DNS configuration", + "peer_entry": { + "description": "Peer Entry from peers table", "type": "object", - "title": "Resolver", + "title": "Peer Entry", "required": [ - "name" + "name", + "address", + "port" ], "properties": { - "accepted_payload_size": { - "type": "integer", - "maximum": 8192, - "minimum": 512 - }, - "hold_nx": { - "type": "integer", - "x-nullable": true - }, - "hold_obsolete": { - "type": "integer", - "x-nullable": true - }, - "hold_other": { - "type": "integer", - "x-nullable": true - }, - "hold_refused": { - "type": "integer", - "x-nullable": true - }, - "hold_timeout": { - "type": "integer", - "x-nullable": true - }, - "hold_valid": { - "type": "integer", - "x-nullable": true + "address": { + "type": "string", + "pattern": "^[^\\s]+$" }, "name": { "type": "string", "pattern": "^[A-Za-z0-9-_.:]+$", "x-nullable": false }, - "parse-resolv-conf": { - "type": "boolean" - }, - "resolve_retries": { - "type": "integer", - "minimum": 1 - }, - "timeout_resolve": { - "type": "integer", - "x-nullable": false - }, - "timeout_retry": { + "port": { "type": "integer", - "x-nullable": false + "maximum": 65535, + "minimum": 1, + "x-nullable": true } } }, - "resolvers": { - "description": "HAProxy resolvers array", - "type": "array", - "title": "Resolvers", - "items": { - "$ref": "#/definitions/resolver" - } - }, - "return_header": { - "type": "object", - "required": [ - "name", - "fmt" - ], - "properties": { - "fmt": { - "type": "string" - }, - "name": { - "type": "string" - } - }, - "x-go-name": "ReturnHeader" - }, - "ring": { - "description": "HAProxy ring configuration", + "peer_section": { + "description": "HAProxy peer_section configuration", "type": "object", - "title": "Ring", + "title": "Peer Section", "required": [ "name" ], "properties": { - "description": { - "type": "string", - "x-display-name": "The description is an optional description string of the ring" - }, - "format": { - "type": "string", - "enum": [ - "iso", - "local", - "raw", - "rfc3164", - "rfc5424", - "short", - "priority", - "timed" - ], - "x-display-name": "Format used to store events into the ring buffer" - }, - "maxlen": { - "type": "integer", - "x-display-name": "The maximum length of an event message stored into the ring", - "x-nullable": true - }, "name": { "type": "string", "pattern": "^[A-Za-z0-9-_.:]+$", "x-nullable": false - }, - "size": { - "type": "integer", - "x-display-name": "Optional size in bytes for the ring-buffer", - "x-nullable": true - }, - "timeout_connect": { - "type": "integer", - "x-nullable": true - }, - "timeout_server": { - "type": "integer", - "x-nullable": true } }, "additionalProperties": false }, - "rings": { - "description": "HAProxy rings array", + "peer_sections": { + "description": "HAProxy peer_section array", "type": "array", - "title": "Rings", + "title": "Peer_Section", "items": { - "$ref": "#/definitions/ring" + "$ref": "#/definitions/peer_section" } }, - "runtime_server": { - "description": "Runtime transient server properties", + "pgsql_check_params": { "type": "object", - "title": "Runtime Server", "properties": { - "address": { - "type": "string", - "pattern": "^[^\\s]+$", - "x-nullable": false, - "readOnly": true - }, - "admin_state": { - "type": "string", - "enum": [ - "ready", - "maint", - "drain" - ] - }, - "id": { - "type": "string", - "readOnly": true - }, - "name": { - "type": "string", - "readOnly": true - }, - "operational_state": { - "type": "string", - "enum": [ - "up", - "down", - "stopping" - ] - }, - "port": { - "type": "integer", - "maximum": 65535, - "minimum": 1, - "x-nullable": true, - "readOnly": true + "username": { + "type": "string" } - }, - "example": { - "address": "127.0.0.5", - "admin_state": "ready", - "operational_state": "up", - "port": 80, - "server_id": 1, - "server_name": "web_server" } }, - "runtime_servers": { - "description": "HAProxy runtime servers array", - "type": "array", - "title": "HAProxy Runtime Servers Array", - "items": { - "$ref": "#/definitions/runtime_server" + "process_info": { + "type": "object", + "properties": { + "error": { + "type": "string" + }, + "info": { + "$ref": "#/definitions/process_info_item" + }, + "runtimeAPI": { + "type": "string" + } } }, - "server": { - "description": "HAProxy backend server configuration", + "process_info_item": { "type": "object", - "title": "Server", - "required": [ - "name", - "address" - ], "properties": { - "address": { - "type": "string", - "pattern": "^[^\\s]+$", - "x-nullable": false - }, - "agent-addr": { - "type": "string", - "pattern": "^[^\\s]+$" + "active_peers": { + "type": "integer", + "x-nullable": true }, - "agent-check": { - "type": "string", - "enum": [ - "enabled", - "disabled" - ], - "x-dependency": { - "agent-port": { - "required": true - } - } + "busy_polling": { + "type": "integer", + "x-nullable": true }, - "agent-inter": { + "bytes_out_rate": { "type": "integer", "x-nullable": true }, - "agent-port": { + "compress_bps_in": { "type": "integer", - "maximum": 65535, - "minimum": 1, "x-nullable": true }, - "agent-send": { - "type": "string" + "compress_bps_out": { + "type": "integer", + "x-nullable": true }, - "allow_0rtt": { - "type": "boolean" + "compress_bps_rate_lim": { + "type": "integer", + "x-nullable": true }, - "alpn": { - "type": "string", - "pattern": "^[^\\s]+$", - "x-display-name": "ALPN Protocols" + "conn_rate": { + "type": "integer", + "x-nullable": true }, - "backup": { - "type": "string", - "enum": [ - "enabled", - "disabled" - ] + "conn_rate_limit": { + "type": "integer", + "x-nullable": true }, - "check": { - "type": "string", - "enum": [ - "enabled", - "disabled" - ] + "connected_peers": { + "type": "integer", + "x-nullable": true }, - "check-send-proxy": { - "type": "string", - "enum": [ - "enabled", - "disabled" - ] + "cum_conns": { + "type": "integer", + "x-nullable": true }, - "check-sni": { - "type": "string", - "pattern": "^[^\\s]+$" + "cum_req": { + "type": "integer", + "x-nullable": true }, - "check-ssl": { - "type": "string", - "enum": [ - "enabled", - "disabled" - ] + "cum_ssl_conns": { + "type": "integer", + "x-nullable": true }, - "check_alpn": { - "type": "string", - "pattern": "^[^\\s]+$", - "x-display-name": "Protocols" + "curr_conns": { + "type": "integer", + "x-nullable": true }, - "check_proto": { - "type": "string", - "pattern": "^[^\\s]+$", - "x-display-name": "Name" + "curr_ssl_conns": { + "type": "integer", + "x-nullable": true }, - "check_via_socks4": { - "type": "string", - "enum": [ - "enabled", - "disabled" - ] + "dropped_logs": { + "type": "integer", + "x-nullable": true }, - "ciphers": { - "type": "string", - "x-dependency": { - "ssl": { - "value": "enabled" - } - } + "failed_resolutions": { + "type": "integer", + "x-nullable": true }, - "ciphersuites": { - "type": "string", - "x-dependency": { - "ssl": { - "value": "enabled" - } - } + "hard_max_conn": { + "type": "integer", + "x-nullable": true }, - "cookie": { - "type": "string", - "pattern": "^[^\\s]+$" + "idle_pct": { + "type": "integer", + "x-nullable": true }, - "crl_file": { - "type": "string", - "x-dependency": { - "ssl": { - "value": "enabled" - } - } + "jobs": { + "type": "integer", + "x-nullable": true }, - "downinter": { + "listeners": { "type": "integer", "x-nullable": true }, - "error_limit": { + "max_conn": { "type": "integer", - "x-display-name": "Error count" + "x-nullable": true }, - "fall": { + "max_conn_rate": { "type": "integer", - "x-display-name": "Nr. of consecutive failed checks", "x-nullable": true }, - "fastinter": { + "max_pipes": { "type": "integer", "x-nullable": true }, - "force_sslv3": { - "type": "string", - "enum": [ - "enabled", - "disabled" - ] + "max_sess_rate": { + "type": "integer", + "x-nullable": true }, - "force_tlsv10": { - "type": "string", - "enum": [ - "enabled", - "disabled" - ] + "max_sock": { + "type": "integer", + "x-nullable": true }, - "force_tlsv11": { - "type": "string", - "enum": [ - "enabled", - "disabled" - ] + "max_ssl_conns": { + "type": "integer", + "x-nullable": true }, - "force_tlsv12": { - "type": "string", - "enum": [ - "enabled", - "disabled" - ] + "max_ssl_rate": { + "type": "integer", + "x-nullable": true }, - "force_tlsv13": { - "type": "string", - "enum": [ - "enabled", - "disabled" - ] + "max_zlib_mem_usage": { + "type": "integer", + "x-nullable": true }, - "health_check_port": { + "mem_max_mb": { "type": "integer", - "maximum": 65535, - "minimum": 1, "x-nullable": true }, - "id": { + "nbthread": { + "description": "Number of threads", "type": "integer", + "x-display-name": "Number of Threads", "x-nullable": true }, - "init-addr": { - "type": "string", - "pattern": "^[^\\s]+$", + "node": { + "type": "string" + }, + "pid": { + "description": "Process id of the replying worker process", + "type": "integer", + "x-display-name": "PID", "x-nullable": true }, - "inter": { + "pipes_free": { "type": "integer", "x-nullable": true }, - "log_proto": { - "type": "string", - "enum": [ - "legacy", - "octet-count" - ] + "pipes_used": { + "type": "integer", + "x-nullable": true }, - "maintenance": { - "type": "string", - "enum": [ - "enabled", - "disabled" - ] + "pool_alloc_mb": { + "type": "integer", + "x-nullable": true }, - "max_reuse": { + "pool_failed": { "type": "integer", "x-nullable": true }, - "maxconn": { + "pool_used_mb": { "type": "integer", - "x-display-name": "Max Concurrent Connections", "x-nullable": true }, - "maxqueue": { + "process_num": { + "description": "Process number", "type": "integer", - "x-display-name": "Max Number of Connections", + "x-display-name": "Process Number", "x-nullable": true }, - "minconn": { + "processes": { + "description": "Number of spawned processes", "type": "integer", + "x-display-name": "Number of processes", "x-nullable": true }, - "name": { + "release_date": { + "description": "HAProxy version release date", "type": "string", - "pattern": "^[^\\s]+$", - "x-nullable": false + "format": "date" }, - "namespace": { - "type": "string" + "run_queue": { + "type": "integer", + "x-nullable": true }, - "no_sslv3": { - "type": "string", - "enum": [ - "enabled", - "disabled" - ] + "sess_rate": { + "type": "integer", + "x-nullable": true }, - "no_tlsv10": { - "type": "string", - "enum": [ - "enabled", - "disabled" - ] + "sess_rate_limit": { + "type": "integer", + "x-nullable": true }, - "no_tlsv11": { - "type": "string", - "enum": [ - "enabled", - "disabled" - ] + "ssl_backend_key_rate": { + "type": "integer", + "x-nullable": true }, - "no_tlsv12": { - "type": "string", - "enum": [ - "enabled", - "disabled" - ] + "ssl_backend_max_key_rate": { + "type": "integer", + "x-nullable": true }, - "no_tlsv13": { - "type": "string", - "enum": [ - "enabled", - "disabled" - ] + "ssl_cache_lookups": { + "type": "integer", + "x-nullable": true }, - "no_verifyhost": { - "type": "string", - "enum": [ - "enabled", - "disabled" - ] + "ssl_cache_misses": { + "type": "integer", + "x-nullable": true }, - "npn": { - "type": "string", - "x-dependency": { - "ssl": { - "value": "enabled" - } - } + "ssl_frontend_key_rate": { + "type": "integer", + "x-nullable": true }, - "observe": { - "type": "string", - "enum": [ - "layer4", - "layer7" - ], - "x-dependency": { - "ssl": { - "value": "enabled" - } - } + "ssl_frontend_max_key_rate": { + "type": "integer", + "x-nullable": true }, - "on-error": { - "type": "string", - "enum": [ - "fastinter", - "fail-check", - "sudden-death", - "mark-down" - ] + "ssl_frontend_session_reuse": { + "type": "integer", + "x-nullable": true }, - "on-marked-down": { - "type": "string", - "enum": [ - "shutdown-sessions" - ] + "ssl_rate": { + "type": "integer", + "x-nullable": true }, - "on-marked-up": { - "type": "string", - "enum": [ - "shutdown-backup-sessions" - ] + "ssl_rate_limit": { + "type": "integer", + "x-nullable": true }, - "pool_low_conn": { + "stopping": { "type": "integer", "x-nullable": true }, - "pool_max_conn": { + "tasks": { "type": "integer", "x-nullable": true }, - "pool_purge_delay": { + "total_bytes_out": { "type": "integer", "x-nullable": true }, - "port": { + "ulimit_n": { "type": "integer", - "maximum": 65535, - "minimum": 1, "x-nullable": true }, - "proto": { - "type": "string", - "pattern": "^[^\\s]+$" + "unstoppable": { + "type": "integer", + "x-nullable": true }, - "proxy-v2-options": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "ssl", - "cert-cn", - "ssl-cipher", - "cert-sig", - "cert-key", - "authority", - "crc32c", - "unique-id" - ] - } + "uptime": { + "description": "HAProxy uptime in s", + "type": "integer", + "x-nullable": true }, - "redir": { + "version": { + "description": "HAProxy version string", + "type": "string" + }, + "zlib_mem_usage": { + "type": "integer", + "x-nullable": true + } + } + }, + "process_infos": { + "description": "General HAProxy process information", + "type": "array", + "title": "HAProxy Information", + "items": { + "$ref": "#/definitions/process_info" + } + }, + "redispatch": { + "type": "object", + "required": [ + "enabled" + ], + "properties": { + "enabled": { "type": "string", - "x-display-name": "Prefix" + "enum": [ + "enabled", + "disabled" + ] }, - "resolve-net": { + "interval": { + "type": "integer", + "x-nullable": false + } + } + }, + "reload": { + "description": "HAProxy reload", + "type": "object", + "title": "HAProxy reload", + "properties": { + "id": { "type": "string", - "pattern": "^[^,\\s][^\\,]*[^,\\s]*$", - "x-dependency": { - "resolvers": { - "required": true - } - } + "pattern": "^\\d{4}-\\d{2}-\\d{2}-\\d+$" + }, + "reload_timestamp": { + "type": "integer" + }, + "response": { + "type": "string" + }, + "status": { + "type": "string", + "enum": [ + "failed", + "in_progress", + "succeeded" + ] + } + }, + "example": { + "id": "2019-01-03-44", + "status": "in_progress" + } + }, + "reloads": { + "description": "HAProxy reloads array", + "type": "array", + "title": "HAProxy Reloads Array", + "items": { + "$ref": "#/definitions/reload" + } + }, + "resolver": { + "description": "Runtime DNS configuration", + "type": "object", + "title": "Resolver", + "required": [ + "name" + ], + "properties": { + "accepted_payload_size": { + "type": "integer", + "maximum": 8192, + "minimum": 512 }, - "resolve-prefer": { - "type": "string", - "enum": [ - "ipv4", - "ipv6" - ], - "x-dependency": { - "resolvers": { - "required": true - } - } + "hold_nx": { + "type": "integer", + "x-nullable": true }, - "resolve_opts": { - "type": "string", - "pattern": "^[^,\\s][^\\,]*[^,\\s]*$" + "hold_obsolete": { + "type": "integer", + "x-nullable": true }, - "resolvers": { - "type": "string", - "pattern": "^[^\\s]+$", - "x-dynamic-enum": { - "operation": "getResolvers", - "property": "name" - } + "hold_other": { + "type": "integer", + "x-nullable": true }, - "rise": { + "hold_refused": { "type": "integer", "x-nullable": true }, - "send-proxy": { - "type": "string", - "enum": [ - "enabled", - "disabled" - ] + "hold_timeout": { + "type": "integer", + "x-nullable": true }, - "send-proxy-v2": { - "type": "string", - "enum": [ - "enabled", - "disabled" - ] + "hold_valid": { + "type": "integer", + "x-nullable": true }, - "send_proxy_v2_ssl": { + "name": { "type": "string", - "enum": [ - "enabled", - "disabled" - ] + "pattern": "^[A-Za-z0-9-_.:]+$", + "x-nullable": false }, - "send_proxy_v2_ssl_cn": { - "type": "string", - "enum": [ - "enabled", - "disabled" - ] + "parse-resolv-conf": { + "type": "boolean" }, - "slowstart": { + "resolve_retries": { "type": "integer", - "x-nullable": true + "minimum": 1 }, - "sni": { - "type": "string", - "pattern": "^[^\\s]+$" + "timeout_resolve": { + "type": "integer", + "x-nullable": false }, - "socks4": { - "type": "string", - "pattern": "^[^\\s]+$", - "x-dependency": { - "check-via-socks4": { - "required": true - } - } + "timeout_retry": { + "type": "integer", + "x-nullable": false + } + } + }, + "resolvers": { + "description": "HAProxy resolvers array", + "type": "array", + "title": "Resolvers", + "items": { + "$ref": "#/definitions/resolver" + } + }, + "return_header": { + "type": "object", + "required": [ + "name", + "fmt" + ], + "properties": { + "fmt": { + "type": "string" }, - "source": { + "name": { "type": "string" + } + }, + "x-go-name": "ReturnHeader" + }, + "ring": { + "description": "HAProxy ring configuration", + "type": "object", + "title": "Ring", + "required": [ + "name" + ], + "properties": { + "description": { + "type": "string", + "x-display-name": "The description is an optional description string of the ring" }, - "ssl": { + "format": { "type": "string", "enum": [ - "enabled", - "disabled" - ] + "iso", + "local", + "raw", + "rfc3164", + "rfc5424", + "short", + "priority", + "timed" + ], + "x-display-name": "Format used to store events into the ring buffer" }, - "ssl_cafile": { - "type": "string", - "pattern": "^[^\\s]+$", - "x-dependency": { - "ssl": { - "value": "enabled" - } - }, - "x-display-name": "SSL CA File" + "maxlen": { + "type": "integer", + "x-display-name": "The maximum length of an event message stored into the ring", + "x-nullable": true }, - "ssl_certificate": { + "name": { "type": "string", - "pattern": "^[^\\s]+$", - "x-dependency": { - "ssl": { - "value": "enabled" - } - } + "pattern": "^[A-Za-z0-9-_.:]+$", + "x-nullable": false }, - "ssl_max_ver": { - "type": "string", - "enum": [ - "SSLv3", - "TLSv1.0", - "TLSv1.1", - "TLSv1.2", - "TLSv1.3" - ] + "size": { + "type": "integer", + "x-display-name": "Optional size in bytes for the ring-buffer", + "x-nullable": true }, - "ssl_min_ver": { - "type": "string", - "enum": [ - "SSLv3", - "TLSv1.0", - "TLSv1.1", - "TLSv1.2", - "TLSv1.3" - ] + "timeout_connect": { + "type": "integer", + "x-nullable": true }, - "ssl_reuse": { + "timeout_server": { + "type": "integer", + "x-nullable": true + } + }, + "additionalProperties": false + }, + "rings": { + "description": "HAProxy rings array", + "type": "array", + "title": "Rings", + "items": { + "$ref": "#/definitions/ring" + } + }, + "runtime_server": { + "description": "Runtime transient server properties", + "type": "object", + "title": "Runtime Server", + "properties": { + "address": { "type": "string", - "enum": [ - "enabled", - "disabled" - ] + "pattern": "^[^\\s]+$", + "x-nullable": false, + "readOnly": true }, - "stick": { + "admin_state": { "type": "string", "enum": [ - "enabled", - "disabled" + "ready", + "maint", + "drain" ] }, - "tcp_ut": { - "type": "integer" - }, - "tfo": { + "id": { "type": "string", - "enum": [ - "enabled", - "disabled" - ] + "readOnly": true }, - "tls_tickets": { + "name": { "type": "string", - "enum": [ - "enabled", - "disabled" - ], - "x-dependency": { - "ssl": { - "value": "enabled" - } - } - }, - "track": { - "type": "string" + "readOnly": true }, - "verify": { + "operational_state": { "type": "string", "enum": [ - "none", - "required" - ], - "x-dependency": { - "ssl": { - "value": "enabled" - } - } - }, - "verifyhost": { - "type": "string", - "x-dependency": { - "ssl": { - "value": "enabled" - }, - "verify": { - "value": "required" - } - } + "up", + "down", + "stopping" + ] }, - "weight": { + "port": { "type": "integer", - "x-nullable": true - }, - "ws": { - "type": "string", - "enum": [ - "auto", - "h1", - "h2" - ], - "x-display-name": "Relaying websocket stream protocol" + "maximum": 65535, + "minimum": 1, + "x-nullable": true, + "readOnly": true } }, - "additionalProperties": false, "example": { - "address": "10.1.1.1", - "check": "enabled", - "name": "www", - "port": 8080, - "weight": 80 + "address": "127.0.0.5", + "admin_state": "ready", + "operational_state": "up", + "port": 80, + "server_id": 1, + "server_name": "web_server" } }, - "server_switching_rule": { - "description": "HAProxy server switching rule configuration (corresponds to use-server directive)", + "runtime_servers": { + "description": "HAProxy runtime servers array", + "type": "array", + "title": "HAProxy Runtime Servers Array", + "items": { + "$ref": "#/definitions/runtime_server" + } + }, + "server": { + "description": "HAProxy backend server configuration", "type": "object", - "title": "Server Switching Rule", + "title": "Server", "required": [ - "index", - "target_server" + "name", + "address" + ], + "allOf": [ + { + "$ref": "#/definitions/server_params" + } ], "properties": { - "cond": { - "type": "string", - "enum": [ - "if", - "unless" - ], - "x-display-name": "Condition" - }, - "cond_test": { + "address": { "type": "string", - "x-dependency": { - "cond": { - "required": true - } - }, - "x-display-name": "Condition Test", - "x-dynamic-enum": { - "freeFormat": true, - "operation": "getACLs", - "property": "acl_name" - } + "pattern": "^[^\\s]+$", + "x-nullable": false }, - "index": { + "id": { "type": "integer", "x-nullable": true }, - "target_server": { + "name": { "type": "string", "pattern": "^[^\\s]+$", - "x-dynamic-enum": { - "operation": "getServers", - "property": "name" - }, "x-nullable": false + }, + "port": { + "type": "integer", + "maximum": 65535, + "minimum": 1, + "x-nullable": true } }, "additionalProperties": false, "example": { - "cond": "if", - "cond_test": "{ req_ssl_sni -i www.example.com }", - "index": 0, - "target_server": "www" - } - }, - "server_switching_rules": { - "description": "HAProxy backend server switching rules array (corresponds to use-server directives)", - "type": "array", - "title": "Server Switching Rules Array", - "items": { - "$ref": "#/definitions/server_switching_rule" + "address": "10.1.1.1", + "check": "enabled", + "name": "www", + "port": 8080, + "weight": 80 } }, - "server_template": { - "description": "Set a template to initialize servers with shared parameters.", + "server_params": { "type": "object", - "title": "Server template", - "required": [ - "prefix", - "num_or_range", - "fqdn" - ], "properties": { "agent-addr": { "type": "string", @@ -55839,20 +53651,12 @@ func init() { "disabled" ] }, - "fqdn": { - "type": "string", - "x-nullable": false - }, "health_check_port": { "type": "integer", "maximum": 65535, "minimum": 1, "x-nullable": true }, - "id": { - "type": "integer", - "x-nullable": true - }, "init-addr": { "type": "string", "pattern": "^[^\\s]+$", @@ -55947,10 +53751,6 @@ func init() { } } }, - "num_or_range": { - "type": "string", - "x-nullable": false - }, "observe": { "type": "string", "enum": [ @@ -55996,17 +53796,6 @@ func init() { "type": "integer", "x-nullable": true }, - "port": { - "type": "integer", - "maximum": 65535, - "minimum": 1, - "x-nullable": true - }, - "prefix": { - "type": "string", - "pattern": "^[^\\s]+$", - "x-nullable": false - }, "proto": { "type": "string", "pattern": "^[^\\s]+$" @@ -56237,6 +54026,107 @@ func init() { ], "x-display-name": "Relaying websocket stream protocol" } + } + }, + "server_switching_rule": { + "description": "HAProxy server switching rule configuration (corresponds to use-server directive)", + "type": "object", + "title": "Server Switching Rule", + "required": [ + "index", + "target_server" + ], + "properties": { + "cond": { + "type": "string", + "enum": [ + "if", + "unless" + ], + "x-display-name": "Condition" + }, + "cond_test": { + "type": "string", + "x-dependency": { + "cond": { + "required": true + } + }, + "x-display-name": "Condition Test", + "x-dynamic-enum": { + "freeFormat": true, + "operation": "getACLs", + "property": "acl_name" + } + }, + "index": { + "type": "integer", + "x-nullable": true + }, + "target_server": { + "type": "string", + "pattern": "^[^\\s]+$", + "x-dynamic-enum": { + "operation": "getServers", + "property": "name" + }, + "x-nullable": false + } + }, + "additionalProperties": false, + "example": { + "cond": "if", + "cond_test": "{ req_ssl_sni -i www.example.com }", + "index": 0, + "target_server": "www" + } + }, + "server_switching_rules": { + "description": "HAProxy backend server switching rules array (corresponds to use-server directives)", + "type": "array", + "title": "Server Switching Rules Array", + "items": { + "$ref": "#/definitions/server_switching_rule" + } + }, + "server_template": { + "description": "Set a template to initialize servers with shared parameters.", + "type": "object", + "title": "Server template", + "required": [ + "prefix", + "num_or_range", + "fqdn" + ], + "allOf": [ + { + "$ref": "#/definitions/server_params" + } + ], + "properties": { + "fqdn": { + "type": "string", + "x-nullable": false + }, + "id": { + "type": "integer", + "x-nullable": true + }, + "num_or_range": { + "type": "string", + "x-nullable": false + }, + "port": { + "type": "integer", + "maximum": 65535, + "minimum": 1, + "x-nullable": true + }, + "prefix": { + "type": "string", + "pattern": "^[^\\s]+$", + "x-nullable": false + } }, "additionalProperties": false, "example": { diff --git a/go.mod b/go.mod index 9ff5070c..a92b51eb 100644 --- a/go.mod +++ b/go.mod @@ -22,7 +22,7 @@ require ( github.com/go-openapi/validate v0.22.0 github.com/google/renameio v1.0.1 github.com/google/uuid v1.3.0 - github.com/haproxytech/client-native/v4 v4.0.0 + github.com/haproxytech/client-native/v4 v4.0.1-0.20220719093029-6a53cf3b5fdb github.com/haproxytech/config-parser/v4 v4.0.0-rc4.0.20220718074928-6aefcc433cd6 github.com/hashicorp/consul/api v1.6.0 github.com/hashicorp/hcl v1.0.0 diff --git a/go.sum b/go.sum index 7ba2a3ea..8aa087bb 100644 --- a/go.sum +++ b/go.sum @@ -135,8 +135,8 @@ github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+ github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= -github.com/haproxytech/client-native/v4 v4.0.0 h1:4xwQJVWskXPgOEiy6sOstyVLRCGECo2N8XB+Bc5k5hQ= -github.com/haproxytech/client-native/v4 v4.0.0/go.mod h1:GS5a2VM6kz+IMN52h0VIW7u5udpuSlkzqv+NTyBQMfo= +github.com/haproxytech/client-native/v4 v4.0.1-0.20220719093029-6a53cf3b5fdb h1:QFm+cSh83FK0BtcF/gEKYC0OAx11voePdqgYq9gcZj4= +github.com/haproxytech/client-native/v4 v4.0.1-0.20220719093029-6a53cf3b5fdb/go.mod h1:GS5a2VM6kz+IMN52h0VIW7u5udpuSlkzqv+NTyBQMfo= github.com/haproxytech/config-parser/v4 v4.0.0-rc4.0.20220718074928-6aefcc433cd6 h1:N8ldJE09Lb7auNjUF54W+rBdbWgE8fx1RLovV9hpDl8= github.com/haproxytech/config-parser/v4 v4.0.0-rc4.0.20220718074928-6aefcc433cd6/go.mod h1:uFxx/LldtaUvGnUu8/smTgj5ukzs07C5rI1vx3RCTTk= github.com/haproxytech/go-logger v1.1.0 h1:HgGtYaI1ApkvbQdsm7f9AzQQoxTB7w37criTflh7IQE=