@@ -62,11 +62,25 @@ insecure-entitlements = [ "network.host", "security.insecure" ]
62
62
# Whether run subprocesses in main pid namespace or not, this is useful for
63
63
# running rootless buildkit inside a container.
64
64
noProcessSandbox = false
65
+
66
+ # gc enables/disables garbage collection
65
67
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
+
70
84
# alternate OCI worker binary name(example 'crun'), by default either
71
85
# buildkit-runc or runc binary is used
72
86
binary = " "
@@ -83,26 +97,51 @@ insecure-entitlements = [ "network.host", "security.insecure" ]
83
97
"foo" = " bar"
84
98
85
99
[[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
+
90
113
# keepDuration can be an integer number of seconds (e.g. 172800), or a
91
114
# string duration (e.g. "48h")
92
115
keepDuration = " 48h"
93
116
filters = [ " type==source.local" , " type==exec.cachemount" , " type==source.git.checkout" ]
94
117
[[worker .oci .gcpolicy ]]
95
118
all = true
96
- keepBytes = 1024000000
119
+ reservedSpace = 1024000000
97
120
98
121
[worker .containerd ]
99
122
address = " /run/containerd/containerd.sock"
100
123
enabled = true
101
124
platforms = [ " linux/amd64" , " linux/arm64" ]
102
125
namespace = " buildkit"
126
+
127
+ # gc enables/disables garbage collection
103
128
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
+
106
145
# maintain a pool of reusable CNI network namespaces to amortize the overhead
107
146
# of allocating and releasing the namespaces
108
147
cniPoolSize = 16
@@ -119,12 +158,12 @@ insecure-entitlements = [ "network.host", "security.insecure" ]
119
158
options = { BinaryName = " runc" }
120
159
121
160
[[worker .containerd .gcpolicy ]]
122
- keepBytes = 512000000
161
+ reservedSpace = 512000000
123
162
keepDuration = 172800
124
163
filters = [ " type==source.local" , " type==exec.cachemount" , " type==source.git.checkout" ]
125
164
[[worker .containerd .gcpolicy ]]
126
165
all = true
127
- keepBytes = 1024000000
166
+ reservedSpace = 1024000000
128
167
129
168
# registry configures a new Docker register used for cache import or output.
130
169
[registry ."docker .io" ]
0 commit comments