Skip to content

Segments

Armory writes its data to a series of files called segments.

This section describes configuration options available to tune a Backup’s behaviour when generating these files.

When a segment reaches a certain size, it is closed and a new segment is opened. The size of these segments can be configured with the .spec.segmentRolloverTriggers.size setting:

apiVersion: kannika.io/v1alpha
kind: Backup
metadata:
name: backup
spec:
sink: "sink"
source: "source"
segmentRolloverTriggers:
size: 10 MiB

Slow streams may not fill an entire segment for a long time, thus leaving old data uncommitted to persistent storage for a while.

You can force a Backup to perform a rollover after some duration if the max segment size has not yet been reached:

apiVersion: kannika.io/v1alpha
kind: Backup
metadata:
name: backup
spec:
sink: "sink"
source: "source"
segmentRolloverTriggers:
# Close a segment once it reaches 25MiB ...
size: 25 MiB
# ... or after 1h, whichever happens first.
timeoutSeconds: 3600