1OC ADM PRUNE(1)                    June 2016                   OC ADM PRUNE(1)
2
3
4

NAME

6       oc adm prune builds - Remove old completed and failed builds
7
8
9

SYNOPSIS

11       oc adm prune builds [OPTIONS]
12
13
14

DESCRIPTION

16       Prune old completed and failed builds
17
18
19       By default, the prune operation performs a dry run making no changes to
20       internal registry. A --confirm flag is needed for changes to be  effec‐
21       tive.
22
23
24

OPTIONS

26       --confirm=false
27           If  true,  specify  that  build pruning should proceed. Defaults to
28       false, displaying what would be deleted but not actually deleting  any‐
29       thing.
30
31
32       --keep-complete=5
33           Per  BuildConfig, specify the number of builds whose status is com‐
34       plete that will be preserved.
35
36
37       --keep-failed=1
38           Per BuildConfig, specify the  number  of  builds  whose  status  is
39       failed, error, or cancelled that will be preserved.
40
41
42       --keep-younger-than=0
43           Specify the minimum age of a Build for it to be considered a candi‐
44       date for pruning.
45
46
47       --orphans=false
48           If true, prune all builds whose associated  BuildConfig  no  longer
49       exists and whose status is complete, failed, error, or cancelled.
50
51
52

OPTIONS INHERITED FROM PARENT COMMANDS

54       --allow_verification_with_non_compliant_keys=false
55           Allow  a  SignatureVerifier  to  use  keys  which  are  technically
56       non-compliant with RFC6962.
57
58
59       --alsologtostderr=false
60           log to standard error as well as files
61
62
63       --application_metrics_count_limit=100
64           Max number of application metrics to store (per container)
65
66
67       --as=""
68           Username to impersonate for the operation
69
70
71       --as-group=[]
72           Group to impersonate for the operation, this flag can  be  repeated
73       to specify multiple groups.
74
75
76       --azure-container-registry-config=""
77           Path  to the file containing Azure container registry configuration
78       information.
79
80
81       --boot_id_file="/proc/sys/kernel/random/boot_id"
82           Comma-separated list of files to check for boot-id. Use  the  first
83       one that exists.
84
85
86       --cache-dir="/builddir/.kube/http-cache"
87           Default HTTP cache directory
88
89
90       --certificate-authority=""
91           Path to a cert file for the certificate authority
92
93
94       --client-certificate=""
95           Path to a client certificate file for TLS
96
97
98       --client-key=""
99           Path to a client key file for TLS
100
101
102       --cloud-provider-gce-lb-src-cidrs=130.211.0.0/22,209.85.152.0/22,209.85.204.0/22,35.191.0.0/16
103           CIDRs opened in GCE firewall for LB traffic proxy  health checks
104
105
106       --cluster=""
107           The name of the kubeconfig cluster to use
108
109
110       --container_hints="/etc/cadvisor/container_hints.json"
111           location of the container hints file
112
113
114       --containerd="unix:///var/run/containerd.sock"
115           containerd endpoint
116
117
118       --context=""
119           The name of the kubeconfig context to use
120
121
122       --default-not-ready-toleration-seconds=300
123           Indicates   the   tolerationSeconds   of   the    toleration    for
124       notReady:NoExecute  that is added by default to every pod that does not
125       already have such a toleration.
126
127
128       --default-unreachable-toleration-seconds=300
129           Indicates the tolerationSeconds  of  the  toleration  for  unreach‐
130       able:NoExecute  that  is  added  by  default to every pod that does not
131       already have such a toleration.
132
133
134       --docker="unix:///var/run/docker.sock"
135           docker endpoint
136
137
138       --docker-tls=false
139           use TLS to connect to docker
140
141
142       --docker-tls-ca="ca.pem"
143           path to trusted CA
144
145
146       --docker-tls-cert="cert.pem"
147           path to client certificate
148
149
150       --docker-tls-key="key.pem"
151           path to private key
152
153
154       --docker_env_metadata_whitelist=""
155           a comma-separated list of environment variable keys that  needs  to
156       be collected for docker containers
157
158
159       --docker_only=false
160           Only report docker containers in addition to root stats
161
162
163       --docker_root="/var/lib/docker"
164           DEPRECATED:  docker  root is read from docker info (this is a fall‐
165       back, default: /var/lib/docker)
166
167
168       --enable_load_reader=false
169           Whether to enable cpu load reader
170
171
172       --event_storage_age_limit="default=24h"
173           Max length of time for which to store events (per type). Value is a
174       comma  separated  list  of  key  values, where the keys are event types
175       (e.g.: creation, oom) or "default" and the value is a duration. Default
176       is applied to all non-specified event types
177
178
179       --event_storage_event_limit="default=100000"
180           Max  number  of  events to store (per type). Value is a comma sepa‐
181       rated list of key values, where the keys are event  types  (e.g.:  cre‐
182       ation,  oom)  or  "default"  and  the  value  is an integer. Default is
183       applied to all non-specified event types
184
185
186       --global_housekeeping_interval=0
187           Interval between global housekeepings
188
189
190       --housekeeping_interval=0
191           Interval between container housekeepings
192
193
194       --insecure-skip-tls-verify=false
195           If true, the server's certificate will not be checked for validity.
196       This will make your HTTPS connections insecure
197
198
199       --kubeconfig=""
200           Path to the kubeconfig file to use for CLI requests.
201
202
203       --log-flush-frequency=0
204           Maximum number of seconds between log flushes
205
206
207       --log_backtrace_at=:0
208           when logging hits line file:N, emit a stack trace
209
210
211       --log_cadvisor_usage=false
212           Whether to log the usage of the cAdvisor container
213
214
215       --log_dir=""
216           If non-empty, write log files in this directory
217
218
219       --logtostderr=true
220           log to standard error instead of files
221
222
223       --machine_id_file="/etc/machine-id,/var/lib/dbus/machine-id"
224           Comma-separated  list  of  files  to  check for machine-id. Use the
225       first one that exists.
226
227
228       --match-server-version=false
229           Require server version to match client version
230
231
232       -n, --namespace=""
233           If present, the namespace scope for this CLI request
234
235
236       --request-timeout="0"
237           The length of time to wait before giving  up  on  a  single  server
238       request. Non-zero values should contain a corresponding time unit (e.g.
239       1s, 2m, 3h). A value of zero means don't timeout requests.
240
241
242       -s, --server=""
243           The address and port of the Kubernetes API server
244
245
246       --stderrthreshold=2
247           logs at or above this threshold go to stderr
248
249
250       --storage_driver_buffer_duration=0
251           Writes in the storage driver will be buffered  for  this  duration,
252       and committed to the non memory backends as a single transaction
253
254
255       --storage_driver_db="cadvisor"
256           database name
257
258
259       --storage_driver_host="localhost:8086"
260           database host:port
261
262
263       --storage_driver_password="root"
264           database password
265
266
267       --storage_driver_secure=false
268           use secure connection with database
269
270
271       --storage_driver_table="stats"
272           table name
273
274
275       --storage_driver_user="root"
276           database username
277
278
279       --token=""
280           Bearer token for authentication to the API server
281
282
283       --user=""
284           The name of the kubeconfig user to use
285
286
287       -v, --v=0
288           log level for V logs
289
290
291       --version=false
292           Print version information and quit
293
294
295       --vmodule=
296           comma-separated  list  of pattern=N settings for file-filtered log‐
297       ging
298
299
300

EXAMPLE

302                # Dry run deleting older completed and failed builds and also including
303                # all builds whose associated BuildConfig no longer exists
304                oc adm prune builds --orphans
305
306                # To actually perform the prune operation, the confirm flag must be appended
307                oc adm prune builds --orphans --confirm
308
309
310
311

SEE ALSO

313       oc-adm-prune(1),
314
315
316

HISTORY

318       June 2016, Ported from the Kubernetes man-doc generator
319
320
321
322Openshift                  Openshift CLI User Manuals          OC ADM PRUNE(1)
Impressum