Update to 2024-04-11 00:02

This commit is contained in:
Daniel Berteaud 2024-04-11 00:02:52 +02:00
parent 1b645c62cc
commit be44446a95
2 changed files with 44 additions and 0 deletions

View File

@ -117,6 +117,16 @@ consul_base_conf:
limits: {}
# http_max_conns_per_client: 200
# raft_logstore:
# backend: wal
# disable_log_cache: true
# boltdb:
# no_freelist_sync: true
# wal:
# segment_size_mb: 64
# raft_snapshot_interval: 1m
# raft_snapshot_threshold: 16384
consul_extra_conf: {}
consul_host_conf: {}
consul_conf: "{{ consul_base_conf | combine(consul_extra_conf, recursive=True) | combine(consul_host_conf, recursive=True) }}"

View File

@ -41,6 +41,40 @@ performance {
}
{% endif %}
{% if consul_conf.raft_logstore is defined %}
raft_logstore {
{% for key in ['backend'] %}
{% if consul_conf.raft_logstore[key] is defined %}
{{ key }} = "{{ consul_conf.raft_logstore[key] }}"
{% endif %}
{% endfor %}
{% if consul_conf.raft_logstore.disable_log_cache is defined %}
disable_log_cache = {{ consul_conf.raft_logstore.disable_log_cache | ternary('true', 'false') }}
{% endif %}
{% if consul_conf.raft_logstore.boltdb is defined and consul_conf.raft_logstore.boltdb.no_freelist_sync is defined %}
boltdb {
no_freelist_sync = {{ consul_conf.raft_logstore.boltdb.no_freelist_sync | ternary('true', 'false') }}
}
{% endif %}
{% if consul_conf.raft_logstore.wal is defined and consul_conf.raft_logstore.wal.segment_size_mb is defined %}
wal {
segment_size_mb = {{ consul_conf.raft_logstore.wal.segment_size_mb }}
}
{% endif %}
}
{% endif %}
{% for key in ['raft_protocol', 'raft_snapshot_interval'] %}
{% if consul_conf[key] is defined %}
{{ key }} = "{{ consul_conf[key] }}"
{% endif %}
{% endfor %}
{% for key in ['raft_snapshot_threshold', 'raft_trailing_logs'] %}
{% if consul_conf.raft_logstore[key] is defined %}
{{ key }} = {{ consul_conf.raft_logstore[key] }}
{% endif %}
{% endfor %}
{% if consul_conf.encrypt is defined %}
encrypt = "{{ consul_conf.encrypt }}"
{% endif %}