controller stanza
The controller
stanza configures Boundary controller-specific parameters.
name
- Specifies a unique name of this controller within the Boundary cluster. This value can be a direct name string, can refer to a file on disk (file://) from which an name will be read; or an env var (env://) from which the name will be read.description
- Specifies a friendly description of this controller. This value can be a direct description string, can refer to a file on disk (file://) from which a description will be read; or an env var (env://) from which the description will be read.database
- Configuration block with two valid parameters for connecting to Postgres:url
- Configures the URL for connecting to Postgres. If your Postgres server has TLS disabled, Boundary will not be able to connect by default. To run Boundary without a TLS connection to Postgres (not recommended for production usage), add thesslmode=disable
parameter to your connection string, such asurl = "postgresql://postgres:boundary@192.168.1.1:5432/boundary?sslmode=disable"
This value can refer to a file on disk (file://) from which a URL will be read; an env var (env://) from which the URL will be read; or a direct database URL (postgres://). Since 0.10.5, this value is re-read onSIGHUP
to support rotation of the database credential.migration_url
- Can be used to specify a different URL for migrations, as that usually requires higher privileges. This value can refer to a file on disk (file://) from which a URL will be read; an env var (env://) from which the URL will be read; or a direct database URL (postgres://).max_open_connections
- Can be used to control the maximum number of connections that can be opened by the controller. The minimum number of connections required is 5. Setting this value to 0 will allow the controller to open as many connections as needed. This value can be a string or an integer representing the max number of connections, or a string that can refer to a file on disk (file://) from which the number of connections will be read, or an env var (env://) from which the number of connections will be read.max_idle_connections
- Can be used to control the maximum number of idle connections in the idle connection pool. Ifmax_open_connections
is greater than 0 but less thanmax_idle_connections
, thenmax_idle_connections
will be reduced to match themax_open_connections
limit. Setting this value to 0 will mean that no idle connections are retained. If not set or set to less than 0, the default sql.DB setting will be used. This value can be a string or an integer representing the max number of connections, or a string that can refer to a file on disk (file://) from which the number of connections will be read, or an env var (env://) from which the number of connections will be read.max_idle_time
- Can be used to control the maximum amount of time a connection may be idle. Setting this value to 0 will mean that connections are not closed due to a connections idle time. If not set or set to less than 0, the default sql.DB setting will be used. This value can be a string representing the duration, or a string that can refer to a file on disk (file://) from which the duration will be read, or an env var (env://) from which the duration will be read. Valid time units are anything specified by Golang's ParseDuration() method.
public_cluster_addr
- Specifies the public host or IP address (and optionally port) at which the controller can be reached by workers. This will be used by workers after initial connection to controllers via the worker'sinitial_upstreams
block. This defaults to the address of the listener marked forcluster
purpose. This is especially useful for cloud environments that do not bind a publicly accessible IP to a NIC on the host directly, such as an Amazon EIP. This value can be a direct address string, can refer to a file on disk (file://) from which an address will be read; an env var (env://) from which the address will be read; or a go-sockaddr template.auth_token_time_to_live
- Maximum time to live (TTL) for all auth tokens globally (pertains to all tokens from all auth methods). Valid time units are anything specified by Golang's ParseDuration() method. Default is 7 days.auth_token_time_to_stale
- Maximum time of inactivity for all auth tokens globally (pertains to all tokens from all auth methods). Valid time units are anything specified by Golang's ParseDuration() method. Default is 1 day.scheduler
- The configuration block that specifies the job scheduler behavior on the controller.job_run_interval
- The interval at which the scheduler will call the database to check if there are any jobs that need to run. Default is 1 minute.monitor_interval
- The interval at which the scheduler will check and interrupt any defuncted jobs that were running on another scheduler. A job is considered defuncted if it has not reported a status to the database for 5 minutes. Once a job is interrupted it will be run immediate on the first controller available. Default is 30 seconds.
graceful_shutdown_wait_duration
- Amount of time Boundary will wait before initiating the shutdown procedure, after receiving a shutdown signal. In this state, Boundary still processes requests as normal but replies with503 Service Unavailable
to any health requests. This is designed to allow an operator to configure load-balancers to preemptively stop new traffic to a Boundary instance that is going away. Valid time units are anything specified by Go's ParseDuration() method. Only used when anops
listener is set and the Controller is present. Default is 0 seconds.
Signals
The SIGHUP
signal causes a controller to reload its configuration file to pick up any updates to the database url
value. Any other updated values are ignored.
The SIGTERM
and SIGINT
signals initiate a graceful shutdown on a controller. A graceful shutdown closes listeners and servers before shutting down the controller.
KMS configuration
The controller requires two KMS stanzas for root
and worker-auth
purposes:
And optionally, a KMS stanza for recovery purpose:
And optionally, a KMS stanza for configuration encryption purpose:
Boundary supports many kinds of KMS integrations. For a complete guide to all available KMS types, see our KMS documentation.
Complete configuration example