Skip to content

Commit 593cf2f

Browse files
authored
Merge pull request #80823 from aravipra/OSDOCS-11169
OSDOCS-11169: making CSI optional for microshift
2 parents 9539ef1 + 38cd759 commit 593cf2f

8 files changed

+234
-0
lines changed

_topic_maps/_topic_map_ms.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,8 @@ Topics:
121121
File: microshift-greenboot-checking-status
122122
- Name: Configuring audit logging policies
123123
File: microshift-audit-logs-config
124+
- Name: Disabling LVMS CSI provider and CSI snapshot
125+
File: microshift-disable-lvms-csi-provider-csi-snapshot
124126
- Name: Configuring low latency
125127
Dir: microshift_low_latency
126128
Topics:
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
:_mod-docs-content-type: ASSEMBLY
2+
[id="microshift-disable-lvms-csi-provider-csi-snapshot"]
3+
= Disabling LVMS CSI provider and CSI snapshot
4+
include::_attributes/attributes-microshift.adoc[]
5+
:context: microshift-disable-lvms-csi-provider-csi-snapshot
6+
7+
toc::[]
8+
9+
You can configure {microshift-short} to disable the built-in logical volume manager storage (LVMS) Container Storage Interface (CSI) provider or the CSI snapshot capabilities to reduce the use of runtime resources such as RAM, CPU, and storage.
10+
11+
include::modules/microshift-disabling-lvms-csi-snapshot.adoc[leveloffset=+1]
12+
13+
include::modules/microshift-disabling-lvms-csi-driver.adoc[leveloffset=+1]

microshift_storage/microshift-storage-plugin-overview.adoc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,16 @@ LVMS provisions new LVM logical volumes for container workloads with appropriate
1313

1414
include::modules/microshift-lvms-system-requirements.adoc[leveloffset=+1]
1515

16+
include::modules/microshift-disabling-uninstalling-lvms-csi-snapshot.adoc[leveloffset=+1]
17+
18+
include::modules/microshift-disabling-lvms-csi-snapshot.adoc[leveloffset=+1]
19+
20+
include::modules/microshift-disabling-lvms-csi-driver.adoc[leveloffset=+1]
21+
22+
include::modules/microshift-uninstalling-lvms-csi-snapshot.adoc[leveloffset=+1]
23+
24+
include::modules/microshift-uninstalling-lvms-csi-driver.adoc[leveloffset=+1]
25+
1626
include::modules/microshift-lvms-deployment.adoc[leveloffset=+1]
1727

1828
//OCP module with edits
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * microshift_storage/microshift-storage-plugin-overview.adoc
4+
// * microshift_configuring/microshift-disable-lvms-csi-provider-csi-snapshot.adoc
5+
6+
:_mod-docs-content-type: PROCEDURE
7+
[id="microshift-disabling-lvms-csi-driver_{context}"]
8+
= Disabling deployments that run the CSI driver implementations
9+
10+
Use the following procedure to disable installation of the CSI implementation pods.
11+
12+
[IMPORTANT]
13+
====
14+
This procedure is for users who are defining the configuration file before installing and running {microshift-short}. If {microshift-short} is already started then CSI driver implementation will be running. Users must manually remove it by following the uninstallation instructions.
15+
====
16+
17+
[NOTE]
18+
====
19+
{microshift-short} will not delete CSI driver implementation pods. You must configure {microshift-short} to disable installation of the CSI driver implementation pods during the startup process.
20+
====
21+
22+
.Procedure
23+
24+
. Disable installation of the CSI driver by entering the `driver` value under the `storage` section of the {microshift-short} configuration file in `/etc/microshift/config.yaml`:
25+
+
26+
[source,yaml]
27+
----
28+
# ...
29+
storage
30+
driver:
31+
- "none" <1>
32+
# ...
33+
----
34+
<1> Valid values are `none` or `lvms`.
35+
+
36+
[NOTE]
37+
====
38+
By default, the `driver` value is empty or null and LVMS is deployed.
39+
====
40+
41+
. Start {microshift-short} after the `driver` field is specified with a supported value in the `/etc/microshift/config.yaml` file by running the following command:
42+
+
43+
[source,terminal]
44+
----
45+
$ sudo systemctl enable --now microshift
46+
----
47+
+
48+
[NOTE]
49+
====
50+
{microshift-short} does not redeploy the disabled components after a restart operation.
51+
====
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * microshift_storage/microshift-storage-plugin-overview.adoc
4+
// * microshift_configuring/microshift-disable-lvms-csi-provider-csi-snapshot.adoc
5+
6+
:_mod-docs-content-type: PROCEDURE
7+
[id="microshift-disabling-lvms-csi-snapshot_{context}"]
8+
= Disabling deployments that run CSI snapshot implementations
9+
10+
Use the following procedure to disable installation of the CSI implementation pods.
11+
12+
[IMPORTANT]
13+
====
14+
This procedure is for users who are defining the configuration file before installing and running {microshift-short}. If {microshift-short} is already started then CSI snapshot implementation will be running. Users must manually remove it by following the uninstallation instructions.
15+
====
16+
17+
[NOTE]
18+
====
19+
{microshift-short} will not delete CSI snapshot implementation pods. You must configure {microshift-short} to disable installation of the CSI snapshot implementation pods during the startup process.
20+
====
21+
22+
.Procedure
23+
24+
. Disable installation of the CSI snapshot controller by entering the `optionalCsiComponents` value under the `storage` section of the {microshift-short} configuration file in `/etc/microshift/config.yaml`:
25+
+
26+
[source,yaml]
27+
----
28+
# ...
29+
storage: {} <1>
30+
# ...
31+
----
32+
<1> Accepted values are:
33+
* Not defining `optionalCsiComponents`.
34+
* Specifying `optionalCsiComponents` field with an empty value (`[]`) or a single empty string element (`[""]`).
35+
* Specifying `optionalCsiComponents` with one of the accepted values which are `snapshot-controller`, `snapshot-webhook`, or `none`. `none` is mutually exclusive with all other values.
36+
+
37+
[NOTE]
38+
====
39+
If the `optionalCsiComponents` value is empty or null, {microshift-short} defaults to deploying snapshot-controller and snapshot-webhook.
40+
====
41+
42+
. After the `optionalCsiComponents` field is specified with a supported value in the `config.yaml`, start {microshift-short} by running the following command:
43+
+
44+
[source,terminal]
45+
----
46+
$ sudo systemctl start microshift
47+
----
48+
+
49+
[NOTE]
50+
====
51+
{microshift-short} does not redeploy the disabled components after a restart.
52+
====
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * microshift_storage/microshift-storage-plugin-overview.adoc
4+
5+
:_mod-docs-content-type: CONCEPT
6+
[id="microshift-disabling-uninstalling-lvms-csi-snapshot_{context}"]
7+
= Disabling and uninstalling LVMS CSI provider and CSI snapshot deployments
8+
9+
You can reduce the use of runtime resources such as RAM, CPU, and storage by removing or disabling the following storage components:
10+
11+
* You can configure {microshift-short} to disable the built-in logical volume manager storage (LVMS) Container Storage Interface (CSI) provider.
12+
* You can configure {microshift-short} to disable the Container Storage Interface (CSI) snapshot capabilities.
13+
* You can uninstall the installed CSI implementations using `oc` commands.
14+
15+
[IMPORTANT]
16+
====
17+
Automated uninstallation is not supported as this can cause orphaning of the provisioned volumes. Without the LVMS CSI driver, the cluster does not have knowledge of the underlying storage interface and cannot perform provisioning and deprovisioning or mounting and unmounting operations.
18+
====
19+
20+
[NOTE]
21+
====
22+
You can configure {microshift-short} to disable CSI provider and CSI snapshot only before installing and running {microshift-short}.After {microshift-short} is installed and running, you must update the configuration file and uninstall the components.
23+
====
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * microshift_storage/microshift-storage-plugin-overview.adoc
4+
5+
:_mod-docs-content-type: PROCEDURE
6+
[id="microshift-uninstalling-lvms-csi-driver_{context}"]
7+
= Uninstalling the CSI driver implementation
8+
9+
To uninstall the installed CSI driver implementation, use the following procedure.
10+
11+
.Prerequisites
12+
13+
* {microshift-short} is installed and running.
14+
* The CSI driver implementation is deployed on the MicroShift cluster.
15+
16+
.Procedure
17+
18+
. Delete the `lvmclusters` object by running the following command:
19+
+
20+
[source,terminal]
21+
----
22+
$ oc delete -n openshift-storage lvmclusters.lvm.topolvm.io/lvms
23+
----
24+
+
25+
.Example output
26+
[source,terminal]
27+
----
28+
lvmcluster.lvm.topolvm.io "lvms" deleted
29+
----
30+
. Delete the `lvms-operator` by running the following command:
31+
+
32+
[source,terminal]
33+
----
34+
$ oc delete -n openshift-storage deployment.apps/lvms-operator
35+
----
36+
+
37+
.Example output
38+
[source,terminal]
39+
----
40+
deployment.apps "lvms-operator" deleted
41+
----
42+
. Delete the `topolvm-provisioner` `StorageClass` by running the following command:
43+
+
44+
[source,terminal]
45+
----
46+
$ oc delete storageclasses.storage.k8s.io/topolvm-provisioner
47+
----
48+
+
49+
.Example output
50+
[source,terminal]
51+
----
52+
storageclass.storage.k8s.io "topolvm-provisioner" deleted
53+
----
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * microshift_storage/microshift-storage-plugin-overview.adoc
4+
5+
:_mod-docs-content-type: PROCEDURE
6+
[id="microshift-uninstalling-lvms-csi-snapshot_{context}"]
7+
= Uninstalling the CSI snapshot implementation
8+
9+
To uninstall the installed CSI snapshot implementation, use the following procedure.
10+
11+
.Prerequisites
12+
13+
* {microshift-short} is installed and running.
14+
* The CSI snapshot implementation is deployed on the MicroShift cluster.
15+
16+
.Procedure
17+
18+
. Uninstall the CSI snapshot implementation by running the following command:
19+
+
20+
[source,terminal]
21+
----
22+
$ oc delete -n kube-system deployment.apps/snapshot-controller deployment.apps/snapshot-webhook
23+
----
24+
+
25+
.Example output
26+
[source,terminal]
27+
----
28+
deployment.apps "snapshot-controller" deleted
29+
deployment.apps "snapshot-webhook" deleted
30+
----

0 commit comments

Comments
 (0)