Skip to content

Commit 3b82cc8

Browse files
committed
OSDOCS-2892: Added TP --replica-sets flag
1 parent 4bb5f79 commit 3b82cc8

File tree

3 files changed

+48
-24
lines changed

3 files changed

+48
-24
lines changed

modules/pruning-builds.adoc

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
//
33
// * applications/pruning-objects.adoc
44

5+
:_content-type: PROCEDURE
56
[id="pruning-builds_{context}"]
67
= Pruning builds
78

@@ -12,7 +13,7 @@ To prune builds that are no longer required by the system due to age and status,
1213
$ oc adm prune builds [<options>]
1314
----
1415

15-
.Prune builds CLI configuration options
16+
.`oc adm prune builds` flags
1617
[cols="4,8",options="header"]
1718
|===
1819

@@ -25,25 +26,27 @@ $ oc adm prune builds [<options>]
2526
|Prune all builds whose build configuration no longer exists, status is complete, failed, error, or canceled.
2627

2728
.^|`--keep-complete=<N>`
28-
|Per build configuration, keep the last `N` builds whose status is complete (default `5`).
29+
|Per build configuration, keep the last `N` builds whose status is complete. The default is `5`.
2930

3031
.^|`--keep-failed=<N>`
31-
|Per build configuration, keep the last `N` builds whose status is failed, error, or canceled (default `1`).
32+
|Per build configuration, keep the last `N` builds whose status is failed, error, or canceled. The default is `1`.
3233

3334
.^|`--keep-younger-than=<duration>`
34-
|Do not prune any object that is younger than `<duration>` relative to the current time (default `60m`).
35+
|Do not prune any object that is younger than `<duration>` relative to the current time. The default is `60m`.
3536
|===
3637

37-
To see what a pruning operation would delete:
38+
.Procedure
3839

40+
. To see what a pruning operation would delete, run the following command:
41+
+
3942
[source,terminal]
4043
----
4144
$ oc adm prune builds --orphans --keep-complete=5 --keep-failed=1 \
4245
--keep-younger-than=60m
4346
----
4447

45-
To actually perform the prune operation:
46-
48+
. To actually perform the prune operation, add the `--confirm` flag:
49+
+
4750
[source,terminal]
4851
----
4952
$ oc adm prune builds --orphans --keep-complete=5 --keep-failed=1 \

modules/pruning-deployments.adoc

Lines changed: 31 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,48 +2,66 @@
22
//
33
// * applications/pruning-objects.adoc
44

5+
:_content-type: PROCEDURE
56
[id="pruning-deployments_{context}"]
6-
= Pruning DeploymentConfig objects
7+
= Pruning deployment resources
78

8-
To prune `DeploymentConfig` objects that are no longer required by the system due to age and status, administrators can run the following command:
9+
You can prune resources associated with deployments that are no longer required by the system, due to age and status.
10+
11+
The following command prunes replication controllers associated with `DeploymentConfig` objects:
912

1013
[source,terminal]
1114
----
1215
$ oc adm prune deployments [<options>]
1316
----
1417

15-
.Prune deployments CLI configuration options
16-
[cols="4,8",options="header"]
18+
[NOTE]
19+
====
20+
To also prune replica sets associated with `Deployment` objects, use the `--replica-sets` flag. This flag is currently a Technology Preview feature.
21+
====
22+
23+
.`oc adm prune deployments` flags
24+
[cols="4,8a",options="header"]
1725
|===
1826

1927
|Option |Description
2028

2129
.^|`--confirm`
2230
|Indicate that pruning should occur, instead of performing a dry-run.
2331

24-
.^|`--orphans`
25-
|Prune all deployments that no longer have a `DeploymentConfig` object, has status of `Complete` or `Failed`, and has a replica count of zero.
26-
2732
.^|`--keep-complete=<N>`
28-
|Per the `DeploymentConfig` object, keep the last `N` deployments that have a status of `Complete` and replica count of zero. (default `5`)
33+
|Per the `DeploymentConfig` object, keep the last `N` replication controllers that have a status of `Complete` and replica count of zero. The default is `5`.
2934

3035
.^|`--keep-failed=<N>`
31-
|Per the `DeploymentConfig` object, keep the last `N` deployments that have a status of `Failed` and replica count of zero. (default `1`)
36+
|Per the `DeploymentConfig` object, keep the last `N` replication controllers that have a status of `Failed` and replica count of zero. The default is `1`.
3237

3338
.^|`--keep-younger-than=<duration>`
34-
|Do not prune any object that is younger than `<duration>` relative to the current time. (default `60m`) Valid units of measurement include nanoseconds (`ns`), microseconds (`us`), milliseconds (`ms`), seconds (`s`), minutes (`m`), and hours (`h`).
39+
|Do not prune any replication controller that is younger than `<duration>` relative to the current time. Valid units of measurement include nanoseconds (`ns`), microseconds (`us`), milliseconds (`ms`), seconds (`s`), minutes (`m`), and hours (`h`). The default is `60m`.
40+
41+
.^|`--orphans`
42+
|Prune all replication controllers that no longer have a `DeploymentConfig` object, has status of `Complete` or `Failed`, and has a replica count of zero.
43+
44+
.^|`--replica-sets=true\|false`
45+
|If `true`, replica sets are included in the pruning process. The default is `false`.
46+
47+
[IMPORTANT]
48+
====
49+
This flag is a Technology Preview feature.
50+
====
3551
|===
3652

37-
To see what a pruning operation would delete:
53+
.Procedure
3854

55+
. To see what a pruning operation would delete, run the following command:
56+
+
3957
[source,terminal]
4058
----
4159
$ oc adm prune deployments --orphans --keep-complete=5 --keep-failed=1 \
4260
--keep-younger-than=60m
4361
----
4462

45-
To actually perform the prune operation:
46-
63+
. To actually perform the prune operation, add the `--confirm` flag:
64+
+
4765
[source,terminal]
4866
----
4967
$ oc adm prune deployments --orphans --keep-complete=5 --keep-failed=1 \

modules/pruning-groups.adoc

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
//
33
// * applications/pruning-objects.adoc
44

5+
:_content-type: PROCEDURE
56
[id="pruning-groups_{context}"]
67
= Pruning groups
78

@@ -14,7 +15,7 @@ $ oc adm prune groups \
1415
--sync-config=path/to/sync/config [<options>]
1516
----
1617

17-
.Prune groups CLI configuration options
18+
.`oc adm prune groups` flags
1819
[cols="4,8",options="header"]
1920
|===
2021

@@ -33,15 +34,17 @@ $ oc adm prune groups \
3334
|Path to the synchronization configuration file.
3435
|===
3536

36-
To see the groups that the prune command deletes:
37+
.Procedure
3738

39+
. To see the groups that the prune command deletes, run the following command:
40+
+
3841
[source,terminal]
3942
----
4043
$ oc adm prune groups --sync-config=ldap-sync-config.yaml
4144
----
4245

43-
To perform the prune operation:
44-
46+
. To perform the prune operation, add the `--confirm` flag:
47+
+
4548
[source,terminal]
4649
----
4750
$ oc adm prune groups --sync-config=ldap-sync-config.yaml --confirm

0 commit comments

Comments
 (0)