Skip to content

Commit 0d05d2a

Browse files
authored
Merge pull request #84633 from aravipra/OSDOCS-12183-rework
[WIP] OSDOCS-12183-rework: rework of changes in delete Kustomize manifest resources
2 parents c1e18be + 72723a9 commit 0d05d2a

9 files changed

+40
-24
lines changed

_topic_maps/_topic_map_ms.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ Distros: microshift
195195
Topics:
196196
- Name: Using Kustomize to deploy applications
197197
File: microshift-applications
198-
- Name: Deleting resource manifests
198+
- Name: Deleting or updating Kustomize manifest resources
199199
File: microshift-deleting-resource-manifests
200200
- Name: Embedding applications on RHEL for Edge
201201
File: microshift-embedded-apps-on-rhel-edge

microshift_running_apps/microshift-applications.adoc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,8 @@ include::modules/microshift-manifests-overview.adoc[leveloffset=+1]
1212

1313
include::modules/microshift-manifests-override-paths.adoc[leveloffset=+1]
1414

15+
[role="_additional-resources"]
16+
.Additional resources
17+
* xref:../microshift_running_apps/microshift-deleting-resource-manifests.adoc#microshift-deleting-resource-manifests[Deleting or updating Kustomize manifest resources]
18+
1519
include::modules/microshift-applying-manifests-example.adoc[leveloffset=+1]
Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,38 @@
11
:_mod-docs-content-type: ASSEMBLY
22
[id="microshift-deleting-resource-manifests"]
3-
= Deleting resource manifests
3+
= Deleting or updating Kustomize manifest resources
44
include::_attributes/attributes-microshift.adoc[]
55
:context: microshift-deleting-resource-manifests
66

77
toc::[]
88

9-
{microshift-short} supports the deletion of resource manifests in the following situations:
9+
{microshift-short} supports the deletion of manifest resources in the following situations:
1010

1111
* Manifest removal: Manifests can be removed when you need to completely remove a resource from the cluster.
1212
* Manifest upgrade: During an application upgrade, some resources might need to be removed while others are retained to preserve data.
1313
14-
When creating new manifests, you can use resource manifest deletion to remove or update old objects, ensuring there are no conflicts or issues.
14+
When creating new manifests, you can use manifest resource deletion to remove or update old objects, ensuring there are no conflicts or issues.
1515

1616
[IMPORTANT]
1717
====
18-
Manifest files placed in the `delete` subdirectories are not automatically removed and require manual deletion.
18+
Manifest files placed in the `delete` subdirectories are not automatically removed and require manual deletion. Only the resources listed in the manifest files placed in the delete subdirectories are deleted.
1919
====
2020

2121
include::modules/microshift-manifests-deletion-overview.adoc[leveloffset=+1]
2222

2323
[id="microshift-examples-of-usecase_{context}"]
24-
== Use cases for resource manifest deletion
24+
== Use cases for manifest resource deletion
2525

26-
The following explains the use case in which the resource manifest deletion is used.
26+
The following sections explain the use case in which the manifest resource deletion is used.
2727

2828
include::modules/microshift-manifests-removal-scenario-rpm.adoc[leveloffset=+2]
2929

3030
include::modules/microshift-manifests-removal-scenario-ostree.adoc[leveloffset=+2]
3131

3232
include::modules/microshift-manifests-upgrade-scenario-rpm.adoc[leveloffset=+2]
3333

34-
include::modules/microshift-manifests-upgrade-scenario-ostree.adoc[leveloffset=+2]
34+
include::modules/microshift-manifests-upgrade-scenario-ostree.adoc[leveloffset=+2]
35+
36+
[role="_additional-resources"]
37+
== Additional resources
38+
* xref:../microshift_running_apps/microshift-applications.adoc#applications-with-microshift[Using Kustomize manifests to deploy applications]

modules/microshift-manifests-deletion-overview.adoc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88

99
By default, {microshift-short} searches for deletion manifests in the `delete` subdirectories within the manifests path. When a user places a manifest in these subdirectories, {microshift-short} removes the manifests when the system is started. Read through the following to understand how manifests deletion works in {microshift-short}.
1010

11-
. Each time the system starts, before applying the manifests, {microshift-short} scans the following `delete` subdirectories within the configured manifests directory to identify the Kustomize manifests that need to be deleted:
11+
. Each time the system starts, before applying the manifests, {microshift-short} scans the following `delete` subdirectories within the configured manifests directory to identify the manifests that need to be deleted:
1212

13-
* /usr/lib/microshift/manifests/delete
14-
* /usr/lib/microshift/manifests.d/delete/*
15-
* /etc/microshift/manifests/delete
16-
* /etc/microshift/manifests.d/delete/*
13+
* `/usr/lib/microshift/manifests/delete`
14+
* `/usr/lib/microshift/manifests.d/delete/*`
15+
* `/etc/microshift/manifests/delete`
16+
* `/etc/microshift/manifests.d/delete/*`
1717
18-
. {microshift-short} deletes the resources defined in the Kustomize manifests found in the `delete` directories by running the equivalent of the `kubectl delete --ignore-not-found -k` command.
18+
. {microshift-short} deletes the resources defined in the manifests found in the `delete` directories by running the equivalent of the `kubectl delete --ignore-not-found -k` command.

modules/microshift-manifests-overview.adoc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ The `kustomize` configuration management tool is integrated with {microshift-sho
1313
* Using a manifest copy with an overlay keeps the original configuration file for your application intact, while enabling you to deploy iterations and customizations of your applications efficiently.
1414
* You can then deploy the application in your {microshift-short} cluster with an `oc` command.
1515
16+
[NOTE]
17+
====
18+
At each system start, {microshift-short} deletes the manifests found in the `delete` subdirectories and then applies the manifest files found in the manifest directories to the cluster.
19+
====
20+
1621
[id="how-microshift-uses-manifests"]
1722
== How {microshift-short} uses manifests
1823
At every start, {microshift-short} searches the following manifest directories for Kustomize manifest files:

modules/microshift-manifests-removal-scenario-ostree.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
[id="microshift-manifests-removal-scenario-ostree_{context}"]
77
= Removing manifests for OSTree systems
88

9-
Use the following procedure to completely delete the resource defined in the Kustomize manifests.
9+
Use the following procedure to completely delete the resource defined in the manifests.
1010

1111
[IMPORTANT]
1212
====
13-
For OSTree installation, the `delete` subdirectories are read only.
13+
For OSTree installation, the `delete` subdirectories are read-only.
1414
====
1515

1616
.Procedure

modules/microshift-manifests-removal-scenario-rpm.adoc

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
[id="microshift-manifests-removal-scenario-rpm_{context}"]
77
= Removing manifests for RPM systems
88

9-
Use the following procedure in the data removal scenario for RPM systems to completely delete the resource defined in the Kustomize manifests.
9+
Use the following procedure in the data removal scenario for RPM systems to completely delete the resource defined in the manifests.
1010

1111
.Procedure
1212

@@ -15,16 +15,19 @@ Use the following procedure in the data removal scenario for RPM systems to comp
1515
+
1616
[source,terminal]
1717
----
18-
$ sudo mkdir -p _<path_of_delete_directory>_ <1>
18+
$ sudo mkdir -p <path_of_delete_directory> <1>
1919
----
20-
<1> Replace `_<path_of_delete_directory>_` with the path of the delete subdirectory, for example, `/etc/microshift/manifests.d/delete`, `/etc/microshift/manifests/delete/`, `/usr/lib/microshift/manifests.d/delete` or `/usr/lib/microshift/manifests/delete`.
20+
<1> Replace `_<path_of_delete_directory>_` with one of the following valid directory paths: `/etc/microshift/manifests.d/delete`, `/etc/microshift/manifests/delete/`, `/usr/lib/microshift/manifests.d/delete`, or `/usr/lib/microshift/manifests/delete`.
2121
. Move the manifest file into one of the `delete` subdirectories under the configured manifests directory by running the following command:
2222
+
2323
[source,terminal]
2424
----
25-
$ [sudo] mv _<path_of_manifests>_ _<path_of_delete_directory>_ <1>
25+
$ [sudo] mv <path_of_manifests> <path_of_delete_directory>
2626
----
27-
<1> Replace `_<path_of_manifests>_` with the path of the manifest to be deleted, for example, `/etc/microshift/manifests.d/010-SOME-MANIFEST`. Replace `_<path_of_delete_directory>_` with the path of the delete subdirectory, for example, `/etc/microshift/manifests.d/delete`, `/etc/microshift/manifests/delete`, `/usr/lib/microshift/manifests.d/delete` or `/usr/lib/microshift/manifests/delete`.
27+
+
28+
where:
29+
`_<path_of_manifests>_`:: Specifies the path of the manifest to be deleted, for example `/etc/microshift/manifests.d/010-SOME-MANIFEST`.
30+
`_<path_of_delete_directory>_`:: Specifies one of the following valid directory paths: `/etc/microshift/manifests.d/delete`, `/etc/microshift/manifests/delete`, `/usr/lib/microshift/manifests.d/delete` or `/usr/lib/microshift/manifests/delete`.
2831
. Restart {microshift-short} by running the following command:
2932
+
3033
[source,terminal]

modules/microshift-manifests-upgrade-scenario-ostree.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ Use the following procedure to remove some resources while retaining others to p
1010

1111
[IMPORTANT]
1212
====
13-
For OSTree systems, the `delete` subdirectories are read only.
13+
For OSTree systems, the `delete` subdirectories are read-only.
1414
====
1515

1616
.Procedure
1717

1818
. Identify the manifest that needs updating.
19-
. Create a new manifest to apply in the manifest path. See link:https://docs.redhat.com/en/documentation/red_hat_build_of_microshift/{ocp-version}/html/running_applications/applications-with-microshift#microshift-applying-manifests-example_applications-microshift[Using manifests example] to create new manifests using the example.
19+
. Create a new manifest to apply in the manifest directories. See link:https://docs.redhat.com/en/documentation/red_hat_build_of_microshift/{ocp-version}/html/running_applications/applications-with-microshift#microshift-applying-manifests-example_applications-microshift[Using manifests example] to create new manifests using the example.
2020
. Create a new manifest for resource deletion to be placed in the `delete` subdirectories.
2121
. Use the procedure in "Removing manifests for OSTree systems" to remove the manifests.

modules/microshift-manifests-upgrade-scenario-rpm.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ Use the following procedure to remove some resources while retaining others to p
1111
.Procedure
1212

1313
. Identify the manifest that requires updating.
14-
. Create new manifests to be applied in the manifest path.
14+
. Create new manifests to be applied in the manifest directories.
1515
. Create new manifests for resource deletion. It is not necessary to include the `spec` in these manifests. See link:https://docs.redhat.com/en/documentation/red_hat_build_of_microshift/{ocp-version}/html/running_applications/applications-with-microshift#microshift-applying-manifests-example_applications-microshift[Using manifests example] to create new manifests using the example.
1616
. Use the procedure in "Removing manifests for RPM systems" to create `delete` subdirectories and place the manifests created for resource deletion in this path.

0 commit comments

Comments
 (0)