Skip to content

Commit

Permalink
OSDOCS-12183: adding how to delete manifests
Browse files Browse the repository at this point in the history
  • Loading branch information
aravipra committed Oct 9, 2024
1 parent 8ebeb66 commit ed499bc
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 0 deletions.
2 changes: 2 additions & 0 deletions _topic_maps/_topic_map_ms.yml
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,8 @@ Distros: microshift
Topics:
- Name: Using Kustomize to deploy applications
File: microshift-applications
- Name: Deleting resource manifests
File: microshift-deleting-resource-manifests
- Name: Embedding applications on RHEL for Edge
File: microshift-embedded-apps-on-rhel-edge
- Name: Embedding applications for offline use
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
:_mod-docs-content-type: ASSEMBLY
[id="microshift-deleting-resource-manifests"]
= Deleting resource manifests
include::_attributes/attributes-microshift.adoc[]
:context: microshift-deleting-resource-manifests

toc::[]

{microshift-short} supports the deletion of resource manifests for the following use cases:

* Data removal - when you need to completely remove resource from the cluster.
* Upgrade - During an upgrade, some resources may need to be removed while retaining others to preserve data.
Resource manifest deletion helps to manage the cluster resources efficiently by removing outdated objects while preserving necessary data.

include::modules/microshift-manifests-deletion-overview.adoc[leveloffset=+1]
25 changes: 25 additions & 0 deletions modules/microshift-manifests-deletion-overview.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// Module included in the following assemblies:
//
// * microshift//running_applications/microshift-deleting-resource-manifests.adoc

:_mod-docs-content-type: PROCEDURE
[id="microshift-manifests-deletion-overview_{context}"]
= How manifest deletion works

How {microshift-short} automatically deletes the manifests is explained in the following procedure.

.Procedure

. At every start, before applying the manifests, {microshift-short} scans the following `delete` sub directories within the configured manifests directory to identify the Kustomize manifest files that need to be deleted:

* /usr/lib/microshift/manifests/delete
* /usr/lib/microshift/manifests.d/delete/*
* /etc/microshift/manifests/delete
* /etc/microshift/manifests.d/delete/*
. {microshift-short} then runs the following command to delete the resources defined in the kustomize manifest file found in the `delete` directories.
+
[source,terminal]
----
kubectl delete -k --ignore-not-found=true
----

0 comments on commit ed499bc

Please sign in to comment.