Skip to content

Commit cfe7eb7

Browse files
Update README.md
Updated default environment variables to match the correct values documented on ArtifactHub: https://artifacthub.io/packages/helm/codefresh-runner/cf-runtime#:~:text=CLEAN_PERIOD_SECONDS%3A%20%2721600,inodes%20usage%20INODES_USAGE_THRESHOLD
1 parent b6d324d commit cfe7eb7

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

cleaner/README.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,16 @@ To determine what to delete we will use information stored in /var/lib/docker/di
1515
CLEAN_PERIOD_BUILDS - we will launch clean if last clean was more than CLEAN_PERIOD_SECONDS seconds ago
1616
or there was more than CLEAN_PERIOD_BUILDS nuilds since last build
1717

18-
IMAGE_RETAIN_PERIOD - we will not delete images if they have events since `current_timestamp - IMAGE_RETAIN_PERIOD` (default 3d)
19-
VOLUMES_RETAIN_PERIOD - we will not delete volumes if they have events since `current_timestamp - IMAGE_RETAIN_PERIOD` (default 3d)
18+
IMAGE_RETAIN_PERIOD - we will not delete images if they have events since `current_timestamp - IMAGE_RETAIN_PERIOD` (default 4h)
19+
VOLUMES_RETAIN_PERIOD - we will not delete volumes if they have events since `current_timestamp - IMAGE_RETAIN_PERIOD` (default 4h)
2020

2121
####### defaults:
22-
CLEAN_PERIOD_SECONDS=${CLEAN_PERIOD_SECONDS:-21600} # 6 hours
23-
CLEAN_PERIOD_BUILDS=${CLEAN_PERIOD_BUILDS:-10}
24-
IMAGE_RETAIN_PERIOD=${IMAGE_RETAIN_PERIOD:-259200}
25-
VOLUMES_RETAIN_PERIOD=${VOLUMES_RETAIN_PERIOD:-259200}
22+
CLEAN_PERIOD_SECONDS: '21600' # launch clean if last clean was more than CLEAN_PERIOD_SECONDS seconds ago
23+
CLEAN_PERIOD_BUILDS: '5' # launch clean if last clean was more CLEAN_PERIOD_BUILDS builds since last build
24+
IMAGE_RETAIN_PERIOD: '14400' # do not delete docker images if they have events since current_timestamp - IMAGE_RETAIN_PERIOD
25+
VOLUMES_RETAIN_PERIOD: '14400' # do not delete docker volumes if they have events since current_timestamp - VOLUMES_RETAIN_PERIOD
26+
DISK_USAGE_THRESHOLD: '0.8' # launch clean based on current disk usage DISK_USAGE_THRESHOLD
27+
INODES_USAGE_THRESHOLD: '0.8' # launch clean based on current inodes usage INODES_USAGE_THRESHOLD
2628

2729
##### Logic:
2830
- save current docker events by `docker events --until 0s -f ${EVENT_FORMAT} > /var/lib/docker/dind-volume/events/$(date +%s)`

0 commit comments

Comments
 (0)