# sup.toml
# Used for passing configuration options to the Chef Habitat supervisor
# This file is controlled by the 'habitat' cookbook and should not be modified by hand -- local modifications may be overwritten.

### The listen address for the Gossip Gateway
<% if @listen_gossip %>
listen_gossip = "<%= @listen_gossip %>"
<% end %>

### Start the supervisor in local mode
# local_gossip_mode =

### The listen address for the HTTP Gateway
<% if @listen_http %>
listen_http = "<%= @listen_http %>"
<% end %>
### Disable the HTTP Gateway completely
# http_disable =

### The listen address for the Control Gateway
<% if @listen_ctl %>
listen_ctl = "<%= @listen_ctl %>"
<% end %>
### The organization the Supervisor and its services are part of
<% if @organization %>
organization = "<%= @organization %>"
<% end %>
### The listen address of one or more initial peers (IP[:PORT])
<% if @peer %>
peer =  <%= @peer %>
<% end %>
### Make this Supervisor a permanent peer
<% if @permanent_peer %>
permanent_peer = <%= @permanent_peer %>
<% end %>
### Watch this file for connecting to the ring
# peer_watch_file =

### Cache for creating and searching for encryption keys
# cache_key_path =

### The name of the ring used by the Supervisor when running with wire encryption
<% if @ring %>
ring = "<%= @ring %>"
<% end %>
### Use the package config from this path rather than the package itself
# config_from =

### Enable automatic updates for the Supervisor itself
<% if @auto_update %>
auto_update = <%= @auto_update %>
<% end %>
### The period of time in seconds between Supervisor update checks
# auto_update_period =

### The period of time in seconds between service update checks
# service_update_period =

### The private key for HTTP Gateway TLS encryption
###
### Read the private key from KEY_FILE. This should be an RSA private key or PKCS8-encoded private key in PEM format.
# key_file =

### The server certificates for HTTP Gateway TLS encryption
###
### Read server certificates from CERT_FILE. This should contain PEM-format certificates in the right order. The first certificate should certify KEY_FILE. The last should be a root CA.
# cert_file =

### The CA certificate for HTTP Gateway TLS encryption
###
### Read the CA certificate from CA_CERT_FILE. This should contain PEM-format certificate that can be used to validate client requests
# ca_cert_file =

### Load a Habitat package as part of the Supervisor startup
###
### The package can be specified by a package identifier (ex: core/redis) or filepath to a Habitat artifact (ex: /home/core-redis-3.0.7-21120102031201-x86_64-linux.hart).
# pkg_ident_or_artifact =

### Verbose output showing file and line/column numbers
# verbose =

### Turn ANSI color off
# no_color =

### Use structured JSON logging for the Supervisor
###
### This option also sets NO_COLOR.
# json_logging =

### The IPv4 address to use as the `sys.ip` template variable
###
### If this argument is not set, the supervisor tries to dynamically determine an IP address. If that fails, the supervisor defaults to using `127.0.0.1`.
# sys_ip_address =

### The name of the application for event stream purposes
###
### This will be attached to all events generated by this Supervisor.
<% if @event_stream_application %>
event_stream_application = "<%= @event_stream_application %>"
<% end %>
### The name of the environment for event stream purposes
###
### This will be attached to all events generated by this Supervisor.
<% if @event_stream_environment %>
event_stream_environment = "<%= @event_stream_environment %>"
<% end %>
### Event stream connection timeout before exiting the Supervisor
###
### Set to '0' to immediately start the Supervisor and continue running regardless of the initial connection status.
# event_stream_connect_timeout =

### The event stream connection url used to send events to Chef Automate
###
### This enables the event stream and requires EVENT_STREAM_APPLICATION, EVENT_STREAM_ENVIRONMENT, and EVENT_STREAM_TOKEN also be set.
<% if @event_stream_url %>
event_stream_url = "<%= @event_stream_url %>"
<% end %>
### The name of the site where this Supervisor is running for event stream purposes
<% if @event_stream_site %>
event_stream_site = "<%= @event_stream_site %>"
<% end %>
### The authentication token for connecting the event stream to Chef Automate
<% if @event_stream_token %>
event_stream_token = "<%= @event_stream_token %>"
<% end %>
### An arbitrary key-value pair to add to each event generated by this Supervisor
# event_meta = []

### The path to Chef Automate's event stream certificate used to establish a TLS connection
###
### The certificate should be in PEM format.
<% if @event_stream_server_certificate %>
event_stream_server_certificate = "<%= @event_stream_server_certificate %>"
<% end %>
### Automatically cleanup old packages
###
### The Supervisor will automatically cleanup old packages only keeping the KEEP_LATEST_PACKAGES latest packages. If this argument is not specified, no automatic package cleanup is performed.
<% if @keep_latest_packages %>
keep_latest_packages = "<%= @keep_latest_packages %>"
<% end %>
### Receive updates from the specified release channel
# channel =

### Specify an alternate Builder endpoint. If not specified, the value will be taken from the HAB_BLDR_URL environment variable if defined. (default: https://bldr.habitat.sh)
<% if @bldr_url %>
bldr_url = "<%= @bldr_url %>"
<% end %>
### The service group with shared config and topology
# group =

### Service topology
# topology =

### The update strategy
# strategy =

### The condition dictating when this service should update
###
### latest: Runs the latest package that can be found in the configured channel and local packages.
###
### track-channel: Always run what is at the head of a given channel. This enables service rollback where demoting a package from a channel will cause the package to rollback to an older version of the package. A ramification of enabling this condition is packages newer than the package at the head of the channel will be automatically uninstalled during a service rollback.
<% if @update_condition %>
update_condition = "<%= @update_condition %>"
<% end %>
### One or more service groups to bind to a configuration
# bind = []

### Governs how the presence or absence of binds affects service startup
###
### strict: blocks startup until all binds are present.
# binding_mode =

### The interval in seconds on which to run health checks
# health_check_interval =

### The delay in seconds after sending the shutdown signal to wait before killing the service process
###
### The default value can be set in the packages plan file.
# shutdown_timeout =
