# {{ cephadm_managed }}
[gateway]
name = {{ name }}
group = {{ spec.group }}
addr = {{ addr }}
port = {{ spec.port }}
enable_auth = {{ spec.enable_auth }}
state_update_notify = {{ spec.state_update_notify }}
state_update_interval_sec = {{ spec.state_update_interval_sec }}
break_update_interval_sec = {{ spec.break_update_interval_sec }}
enable_spdk_discovery_controller = {{ spec.enable_spdk_discovery_controller }}
encryption_key = /encryption.key
rebalance_period_sec = {{ spec.rebalance_period_sec }}
max_gws_in_grp = {{ spec.max_gws_in_grp }}
max_ns_to_change_lb_grp = {{ spec.max_ns_to_change_lb_grp }}
enable_prometheus_exporter = {{ spec.enable_prometheus_exporter }}
prometheus_exporter_ssl = False
prometheus_port = {{ spec.prometheus_port }}
prometheus_stats_interval = {{ spec.prometheus_stats_interval }}
prometheus_startup_delay = {{ spec.prometheus_startup_delay }}
prometheus_connection_list_cache_expiration = {{ spec.prometheus_connection_list_cache_expiration }}
verify_nqns = {{ spec.verify_nqns }}
verify_keys = {{ spec.verify_keys }}
verify_listener_ip = {{ spec.verify_listener_ip }}
# This is a development flag, do not change it
abort_on_errors = {{ spec.abort_on_errors }}
# This is a development flag, do not change it
abort_on_update_error = {{ spec.abort_on_update_error }}
# This is a development flag, do not change it
omap_file_ignore_unlock_errors = {{ spec.omap_file_ignore_unlock_errors }}
# This is a development flag, do not change it
omap_file_lock_on_read = {{ spec.omap_file_lock_on_read }}
omap_file_lock_duration = {{ spec.omap_file_lock_duration }}
omap_file_lock_retries = {{ spec.omap_file_lock_retries }}
omap_file_lock_retry_sleep_interval = {{ spec.omap_file_lock_retry_sleep_interval }}
omap_file_update_reloads = {{ spec.omap_file_update_reloads }}
allowed_consecutive_spdk_ping_failures = {{ spec.allowed_consecutive_spdk_ping_failures }}
spdk_ping_interval_in_seconds = {{ spec.spdk_ping_interval_in_seconds }}
ping_spdk_under_lock = {{ spec.ping_spdk_under_lock }}
enable_monitor_client = {{ spec.enable_monitor_client }}
max_hosts_per_namespace = {{ spec.max_hosts_per_namespace }}
max_namespaces_with_netmask = {{ spec.max_namespaces_with_netmask }}
max_subsystems = {{ spec.max_subsystems }}
max_hosts = {{ spec.max_hosts }}
max_namespaces = {{ spec.max_namespaces }}
max_namespaces_per_subsystem = {{ spec.max_namespaces_per_subsystem }}
max_hosts_per_subsystem = {{ spec.max_hosts_per_subsystem }}
subsystem_cache_expiration = {{ spec.subsystem_cache_expiration }}
force_tls = {{ spec.force_tls }}
# This is a development flag, do not change it
max_message_length_in_mb = {{ spec.max_message_length_in_mb }}

[gateway-logs]
log_level = {{ spec.log_level }}
log_files_enabled = {{ spec.log_files_enabled }}
log_files_rotation_enabled = {{ spec.log_files_rotation_enabled }}
verbose_log_messages = {{ spec.verbose_log_messages }}
max_log_file_size_in_mb = {{ spec.max_log_file_size_in_mb }}
max_log_files_count = {{ spec.max_log_files_count }}
max_log_directory_backups = {{ spec.max_log_directory_backups }}
log_directory = {{ spec.log_directory }}

[discovery]
addr = {{ discovery_addr }}
port = {{ spec.discovery_port }}
# This is a development flag, do not change it
abort_on_errors = {{ spec.abort_discovery_on_errors }}
bind_retries_limit = {{ spec.discovery_bind_retries_limit }}
bind_sleep_interval = {{ spec.discovery_bind_sleep_interval }}

[ceph]
pool = {{ spec.pool }}
config_file = /etc/ceph/ceph.conf
id = {{ rados_id }}

[mtls]
server_key = /server.key
client_key = /client.key
server_cert = /server.cert
client_cert = /client.cert
root_ca_cert = /root.ca.cert

[spdk]
tgt_path = {{ spec.tgt_path }}
rpc_socket_dir = {{ spec.rpc_socket_dir }}
rpc_socket_name = {{ spec.rpc_socket_name }}
timeout = {{ spec.spdk_timeout }}
{% if spec.bdevs_per_cluster %}
bdevs_per_cluster = {{ spec.bdevs_per_cluster }}
{% endif %}
{% if spec.flat_bdevs_per_cluster %}
flat_bdevs_per_cluster = {{ spec.flat_bdevs_per_cluster }}
{% endif %}
{% if spec.cluster_connections %}
cluster_connections = {{ spec.cluster_connections }}
{% endif %}
{% if spec.spdk_log_level %}
log_level = {{ spec.spdk_log_level }}
{% endif %}
{% if spec.spdk_protocol_log_level %}
protocol_log_level = {{ spec.spdk_protocol_log_level }}
{% endif %}
{% if spec.spdk_log_file_dir %}
log_file_dir = {{ spec.spdk_log_file_dir }}
{% endif %}
conn_retries = {{ spec.conn_retries }}
{% if spec.spdk_mem_size %}
mem_size = {{ spec.spdk_mem_size }}
{% else %}
{% if spec.spdk_huge_pages %}
spdk_huge_pages = {{ spec.spdk_huge_pages }}
{% endif %}
{% endif %}
transports = {{ spec.transports }}
{% if transport_tcp_options %}
transport_tcp_options = {{ transport_tcp_options }}
{% endif %}
enable_dsa_acceleration = {{ spec.enable_dsa_acceleration }}
{% if spec.tgt_cmd_extra_args %}
tgt_cmd_extra_args = {{ spec.tgt_cmd_extra_args }}
{% endif %}
{% if iobuf_options %}
iobuf_options = {{ iobuf_options }}
{% endif %}
qos_timeslice_in_usecs = {{ spec.qos_timeslice_in_usecs }}
notifications_interval = {{ spec.notifications_interval }}

[monitor]
timeout = {{ spec.monitor_timeout }}
{% if spec.monitor_client_log_file_dir %}
log_file_dir = {{ spec.monitor_client_log_file_dir }}
{% endif %}

