You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The primary configuration for the Data Plane API is managed through a YAML file. This file allows you to set various parameters that control the behavior of the API and its interaction with HAProxy.
Top-Level Configuration Options
Option
Type
Required
Description
config_version
integer
No
Configuration version
name
string
No
Name
Structure
The configuration file is structured into several sections, each corresponding to a different aspect of the Data Plane API's functionality. Here's a breakdown of the main sections and their options:
dataplaneapi Configuration Options
Option
Type
Required
Description
write_timeout
string
No
Specifies the write timeout for API requests
graceful_timeout
string
No
Sets the graceful shutdown timeout
show_system_info
boolean
No
Enables or disables the display of system information on the info endpoint
max_header_size
string
No
Defines the maximum header size for API requests
socket_path
string
No
Specifies the path to the API's Unix socket
debug_socket_path
string
No
Defines the path for the debugging command socket
host
string
No
Sets the host address for the API
port
integer
No
Defines the port number for the API
listen_limit
integer
No
Sets the maximum number of connections the API can handle
disable_inotify
boolean
No
Disables the inotify watcher for the configuration file
Maximum duration to wait for the haproxy runtime socket to be ready
delayed_start_tick
string
No
Duration between checks for the haproxy runtime socket to be ready
haproxy.reload Configuration Options
Option
Type
Required
Description
reload_delay
integer
No
Minimum delay between two reloads (in s)
reload_cmd
string
No
Reload command
restart_cmd
string
No
Restart command
status_cmd
string
No
Status command
service_name
string
No
Name of the HAProxy service
reload_retention
integer
No
Reload retention in days
reload_strategy
string
No
Either systemd, s6 or custom
validate_cmd
string
No
Executes a custom command to perform the HAProxy configuration check
log_targets Configuration Options
This section contains settings related to log targets.
log_targets: (array of objects, optional) - List of log targets.
The log_targets option allows you to define multiple destinations for log messages. Each element in the log_targets array is an object that defines a specific log target. Each log target object can have the following properties:
Option
Type
Required
Description
log_to
string
Yes
Type of log target: 'file', 'syslog', or 'stdout'
log_format
string
No
Log format for this target: 'text', 'json', or 'apache_common'. Default is 'text'
log_level
string
No
Log level: 'trace', 'debug', 'info', 'warning', 'error', or 'critical'. Default is 'info'
log_file
string
No
If target is 'file', specifies the path to the log file
acl_format
string
No
Apache Common Log Format to format the access log entries, default:"%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\" %{us}T"
syslog_address
string
No
If target is 'syslog', specifies the syslog server address
syslog_protocol
string
No
If target is 'syslog', specifies the syslog protocol (e.g., 'udp', 'tcp')
Many of the configuration options available in the YAML file can be overridden by command-line arguments when starting the Data Plane API. This allows for flexibility in deployment and testing.
CLI Argument Precedence
When a configuration option is set both in the YAML file and via a command-line argument, the command-line argument takes precedence.
Common CLI Flags
-c, --config-file: Overrides the haproxy.config_file option.
-b, --haproxy-bin: Overrides the haproxy.haproxy_bin option.
-m, --master-runtime: Overrides the haproxy.master_runtime option.
-u, --userlist: Overrides the dataplaneapi.userlist.userlist option.
-d, --reload-delay: Overrides the haproxy.reload.reload_delay option.
-r, --reload-cmd: Overrides the haproxy.reload.reload_cmd option.
-s, --restart-cmd: Overrides the haproxy.reload.restart_cmd option.
-t, --transaction-dir: Overrides the dataplaneapi.transaction.transaction_dir option.
-n, --backups-number: Overrides the dataplaneapi.transaction.backups_number option.
-p, --maps-dir: Overrides the dataplaneapi.resources.maps_dir option.
-i, --show-system-info: Overrides the dataplaneapi.show_system_info option.
--disable-inotify: Overrides the dataplaneapi.disable_inotify option.
--pid-file: Overrides the dataplaneapi.pid_file option.
--debug-socket-path: Overrides the dataplaneapi.debug_socket_path option.
--uid: Overrides the dataplaneapi.uid option.
--gid: Overrides the dataplaneapi.gid option.
--userlist-file: Overrides the dataplaneapi.userlist.userlist_file option.
--status-cmd: Overrides the haproxy.reload.status_cmd option.
--service: Overrides the haproxy.reload.service_name option.
--reload-retention: Overrides the haproxy.reload.reload_retention option.
--reload-strategy: Overrides the haproxy.reload.reload_strategy option.
--validate-cmd: Overrides the haproxy.reload.validate_cmd option.
--backups-dir: Overrides the dataplaneapi.transaction.backups_dir option.
--max-open-transactions: Overrides the dataplaneapi.transaction.max_open_transactions option.
--ssl-certs-dir: Overrides the dataplaneapi.resources.ssl_certs_dir option.
--general-storage-dir: Overrides the dataplaneapi.resources.general_storage_dir option.
--dataplane-storage-dir: Overrides the dataplaneapi.resources.dataplane_storage_dir option.
--update-map-files: Overrides the dataplaneapi.resources.update_map_files option.
--update-map-files-period: Overrides the dataplaneapi.resources.update_map_files_period option.
--spoe-dir: Overrides the dataplaneapi.resources.spoe_dir option.
--spoe-transaction-dir: Overrides the dataplaneapi.resources.spoe_transaction_dir option.
--api-address: Overrides the dataplaneapi.advertised.api_address option.
--api-port: Overrides the dataplaneapi.advertised.api_port option.
--syslog-address: Overrides the log.syslog.syslog_address option.
--syslog-protocol: Overrides the log.syslog.syslog_protocol option.
--syslog-tag: Overrides the log.syslog.syslog_tag option.
--syslog-level: Overrides the log.syslog.syslog_level option.
--syslog-facility: Overrides the log.syslog.syslog_facility option.
--log-to: Overrides the log.log_to option.
--log-file: Overrides the log.log_file option.
--log-level: Overrides the log.log_level option.
--log-format: Overrides the log.log_format option.
--apache-common-log-format: Overrides the log.apache_common_log_format option.
--master-worker-mode: Overrides the haproxy.master_worker_mode option.
--delayed-start-max: Overrides the haproxy.delayed_start_max option.
--delayed-start-tick: Overrides the haproxy.delayed_start_tick option.