@@ -62,11 +62,25 @@ insecure-entitlements = [ "network.host", "security.insecure" ]
6262 # Whether run subprocesses in main pid namespace or not, this is useful for
6363 # running rootless buildkit inside a container.
6464 noProcessSandbox = false
65+
66+ # gc enables/disables garbage collection
6567 gc = true
66- # gckeepstorage can be an integer number of bytes (e.g. 512000000), a string
67- # with a unit (e.g. "512MB"), or a string percentage of the total disk
68- # space (e.g. "10%")
69- gckeepstorage = 9000
68+ # reservedSpace is the minimum amount of disk space guaranteed to be
69+ # retained by this buildkit worker - any usage below this threshold will not
70+ # be reclaimed during garbage collection.
71+ # all disk space parameters can be an integer number of bytes (e.g.
72+ # 512000000), a string with a unit (e.g. "512MB"), or a string percentage
73+ # of the total disk space (e.g. "10%")
74+ reservedSpace = " 30%"
75+ # maxUsedSpace is the maximum amount of disk space that may be used by
76+ # this buildkit worker - any usage above this threshold will be reclaimed
77+ # during garbage collection.
78+ maxUsedSpace = " 60%"
79+ # minFreeSpace is the target amount of free disk space that the garbage
80+ # collector will attempt to leave - however, it will never be bought below
81+ # reservedSpace.
82+ minFreeSpace = " 20GB"
83+
7084 # alternate OCI worker binary name(example 'crun'), by default either
7185 # buildkit-runc or runc binary is used
7286 binary = " "
@@ -83,26 +97,51 @@ insecure-entitlements = [ "network.host", "security.insecure" ]
8397 "foo" = " bar"
8498
8599 [[worker .oci .gcpolicy ]]
86- # keepBytes can be an integer number of bytes (e.g. 512000000), a string
87- # with a unit (e.g. "512MB"), or a string percentage of the total disk
88- # space (e.g. "10%")
89- keepBytes = " 512MB"
100+ # reservedSpace is the minimum amount of disk space guaranteed to be
101+ # retained by this policy - any usage below this threshold will not be
102+ # reclaimed during # garbage collection.
103+ reservedSpace = " 512MB"
104+ # maxUsedSpace is the maximum amount of disk space that may be used by this
105+ # policy - any usage above this threshold will be reclaimed during garbage
106+ # collection.
107+ maxUsedSpace = " 1GB"
108+ # minFreeSpace is the target amount of free disk space that the garbage
109+ # collector will attempt to leave - however, it will never be bought below
110+ # reservedSpace.
111+ minFreeSpace = " 10GB"
112+
90113 # keepDuration can be an integer number of seconds (e.g. 172800), or a
91114 # string duration (e.g. "48h")
92115 keepDuration = " 48h"
93116 filters = [ " type==source.local" , " type==exec.cachemount" , " type==source.git.checkout" ]
94117 [[worker .oci .gcpolicy ]]
95118 all = true
96- keepBytes = 1024000000
119+ reservedSpace = 1024000000
97120
98121[worker .containerd ]
99122 address = " /run/containerd/containerd.sock"
100123 enabled = true
101124 platforms = [ " linux/amd64" , " linux/arm64" ]
102125 namespace = " buildkit"
126+
127+ # gc enables/disables garbage collection
103128 gc = true
104- # gckeepstorage sets storage limit for default gc profile, in bytes.
105- gckeepstorage = 9000
129+ # reservedSpace is the minimum amount of disk space guaranteed to be
130+ # retained by this buildkit worker - any usage below this threshold will not
131+ # be reclaimed during garbage collection.
132+ # all disk space parameters can be an integer number of bytes (e.g.
133+ # 512000000), a string with a unit (e.g. "512MB"), or a string percentage
134+ # of the total disk space (e.g. "10%")
135+ reservedSpace = " 30%"
136+ # maxUsedSpace is the maximum amount of disk space that may be used by
137+ # this buildkit worker - any usage above this threshold will be reclaimed
138+ # during garbage collection.
139+ maxUsedSpace = " 60%"
140+ # minFreeSpace is the target amount of free disk space that the garbage
141+ # collector will attempt to leave - however, it will never be bought below
142+ # reservedSpace.
143+ minFreeSpace = " 20GB"
144+
106145 # maintain a pool of reusable CNI network namespaces to amortize the overhead
107146 # of allocating and releasing the namespaces
108147 cniPoolSize = 16
@@ -119,12 +158,12 @@ insecure-entitlements = [ "network.host", "security.insecure" ]
119158 options = { BinaryName = " runc" }
120159
121160 [[worker .containerd .gcpolicy ]]
122- keepBytes = 512000000
161+ reservedSpace = 512000000
123162 keepDuration = 172800
124163 filters = [ " type==source.local" , " type==exec.cachemount" , " type==source.git.checkout" ]
125164 [[worker .containerd .gcpolicy ]]
126165 all = true
127- keepBytes = 1024000000
166+ reservedSpace = 1024000000
128167
129168# registry configures a new Docker register used for cache import or output.
130169[registry ."docker .io" ]
0 commit comments