Configure Activation retention
This content is for the v0.1 version. Switch to the latest version for up-to-date documentation.
Activation retention is applied by kix gc. Choose a minimum history, a
maximum history, and an age limit each time you run or schedule garbage
collection.
Use the default policy
Section titled “Use the default policy”The default invocation applies this policy to Superseded Activations:
- always keep the 10 newest records;
- never keep more than 50 records;
- beyond the newest 10, retire records older than 30 days.
Run garbage collection without retention flags to use those defaults:
❱ kix gc how-to-application Kix prints the records it plans to retire and asks for confirmation before it deletes them.
Set a retention policy
Section titled “Set a retention policy”Use --keep, --keep-max, and --keep-for together when your policy differs
from the defaults. This example always keeps the newest 20 records, retains no
more than 100, and retires older records after 90 days once they are outside
the protected newest 20:
❱ kix gc how-to-application --keep 20 --keep-max 100 --keep-for 90d The minimum wins if --keep-max is lower than --keep.
--keep-for accepts days, hours, minutes, or seconds, such as 30d, 12h,
45m, or 30s. A bare number means days.
Keep records by count only
Section titled “Keep records by count only”Disable the age rule with --keep-for off or --keep-for 0:
❱ kix gc how-to-application --keep 10 --keep-max 50 --keep-for off Kix then keeps between 10 and 50 of the newest Superseded records, regardless of age.
Schedule the same policy
Section titled “Schedule the same policy”Pass the complete policy in automation rather than relying on an operator’s shell defaults:
❱ kix gc how-to-application --keep 20 --keep-max 100 --keep-for 90d --yes --yes skips the destructive confirmation, so use it only after reviewing the
same policy and target cluster interactively.
Retired Activations no longer appear as rollback targets. The next deployment removes their hashes from the activation history stored on managed resources.