Skip to content

Commit 9656aa7

Browse files
feat: add rke2_etcd_snapshot_schedule
1 parent 9c8f5a7 commit 9656aa7

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

defaults/main.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,10 @@ rke2_etcd_snapshot_file:
207207
# Etcd snapshot location
208208
rke2_etcd_snapshot_destination_dir: "{{ rke2_data_path }}/server/db/snapshots"
209209

210+
# (Optional) Etcd snapshot schedule
211+
# The schedule is in cron format, e.g. "0 */12 * * *"
212+
# rke2_etcd_snapshot_schedule: "0 */12 * * *"
213+
210214
# Etcd snapshot s3 options
211215
# Set either all these values or `rke2_etcd_snapshot_file` and `rke2_etcd_snapshot_source_dir`
212216

meta/argument_specs.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,11 @@ argument_specs:
315315
default: "{{ rke2_data_path }}/server/db/snapshots"
316316
description: "Etcd snapshot location"
317317

318+
rke2_etcd_snapshot_schedule:
319+
type: str
320+
default: "0 */6 * * *"
321+
description: "Etcd snapshot schedule in cron format"
322+
318323
rke2_etcd_snapshot_s3_options:
319324
type: dict
320325
required: false

templates/config.yaml.j2

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ node-label:
4444
{% endfor %}
4545
{% endif %}
4646
snapshotter: {{ rke2_snapshotter }}
47+
{% if rke2_etcd_snapshot_schedule is defined %}
48+
etcd-snapshot-schedule-cron: "{{ rke2_etcd_snapshot_schedule }}"
49+
{% endif %}
4750
node-name: {{ rke2_node_name }}
4851
{% if ( disable_kube_proxy | bool ) %}
4952
disable-kube-proxy: true

0 commit comments

Comments
 (0)