Skip to content

Commit d28a5c3

Browse files
authored
Merge pull request #57324 from ShaunaDiaz/OSDOCS-5442
OSDOCS-5442: add info on lvmd and ovn yaml files
2 parents f7fd3d8 + 3b337a4 commit d28a5c3

8 files changed

+82
-60
lines changed

microshift_storage/microshift-storage-plugin-overview.adoc

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,7 @@ toc::[]
1111
LVMS provisions new logical volume management (LVM) logical volumes (LVs) for container workloads with appropriately configured persistent volume claims (PVC). Each PVC references a storage class that represents an LVM Volume Group (VG) on the host node. LVs are only provisioned for scheduled pods.
1212

1313
include::modules/microshift-lvms-system-requirements.adoc[leveloffset=+1]
14-
1514
include::modules/microshift-lvms-deployment.adoc[leveloffset=+1]
16-
17-
include::modules/microshift-lvms-setting-path.adoc[leveloffset=+2]
18-
15+
include::modules/microshift-lvmd-yaml-creating.adoc[leveloffset=+1]
1916
include::modules/microshift-lvms-configuring.adoc[leveloffset=+1]
20-
21-
include::modules/microshift-using-lvms.adoc[leveloffset=+1]
17+
include::modules/microshift-lvms-using.adoc[leveloffset=+1]

modules/microshift-configuring-ovn.adoc

Lines changed: 32 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,30 @@
22
//
33
// * microshift_networking/microshift-networking.adoc
44

5-
:_content-type: CONCEPT
5+
:_content-type: PROCEDURE
66
[id="microshift-config-OVN-K_{context}"]
7-
= OVN-Kubernetes configuration options
7+
= Creating an OVN-Kubernetes configuration file
88

9-
An OVN-Kubernetes config file can be written to `/etc/microshift/ovn.yaml`. {product-title} uses default OVN-Kubernetes configuration values if an OVN-Kubernetes config file is not customized.
9+
{product-title} uses built-in default OVN-Kubernetes values if an OVN-Kubernetes configuration file is not created. You can write an OVN-Kubernetes configuration file to `/etc/microshift/ovn.yaml`. An example file is provided for your configuration.
10+
11+
.Procedure
12+
13+
. To create your `ovn.yaml` file, run the following command:
14+
+
15+
[source, yaml]
16+
----
17+
$ sudo cp /etc/microshift/ovn.yaml.default /etc/microshift/ovn.yaml
18+
----
19+
20+
. To list the contents of the configuration file you created, run the following command:
21+
+
22+
[source, yaml]
23+
----
24+
$ cat /etc/microshift/ovn.yaml.default
25+
----
26+
+
27+
.Example 'yaml' configuration file with default values
1028

11-
.Default `ovn.yaml` config values:
1229
[source,yaml]
1330
----
1431
ovsInit:
@@ -20,9 +37,9 @@ mtu: 1400
2037
<1> The default value is an empty string that means "not-specified." The CNI network plugin auto-detects to interface with the default route.
2138
<2> The default value is an empty string that means "disabled."
2239

23-
To customize your configuration, use the following table that lists the valid values you can use in your `ovn.yaml` config file:
24-
25-
.Supported optional OVN-Kubernetes configurations for {product-title}.
40+
. To customize your configuration, use the following table that lists the valid values you can use:
41+
+
42+
.Supported optional OVN-Kubernetes configurations for {product-title}
2643

2744
[cols="5",options="header"]
2845
|===
@@ -56,12 +73,18 @@ To customize your configuration, use the following table that lists the valid va
5673
|MTU value used for the pods
5774
|1300
5875
|===
76+
+
5977
[.small]
6078
--
6179
1. The OVS bridge is required. When `disableOVSInit` is true, OVS bridge `br-ex` must be configured manually.
80+
+
81+
[IMPORTANT]
82+
====
83+
If you change the `mtu` configuration value in the `ovn.yaml` file, you must restart the host that {product-title} is running on to apply the updated setting.
84+
====
6285
--
6386

64-
.Example `ovn.yaml` config file:
87+
.Example custom `ovn.yaml` configuration file
6588

6689
[source, yaml]
6790
----
@@ -74,10 +97,5 @@ mtu: 1300
7497

7598
[IMPORTANT]
7699
====
77-
When `disableOVSInit` is set to true in the `ovn.yaml` config file, the OVS bridge br-ex must be manually configured.
78-
====
79-
80-
[IMPORTANT]
81-
====
82-
If you change the `mtu` configuration value in the `ovn.yaml` file, you must restart the host that {product-title} is running on for the updated setting to apply.
100+
When `disableOVSInit` is set to true in the `ovn.yaml` config file, the `br-ex` OVS bridge must be manually configured.
83101
====
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * microshift_storage/microshift-storage-plugin-overview.adoc
4+
5+
:_content-type: PROCEDURE
6+
[id="microshift-lvmd-yaml-creating_{context}"]
7+
= Creating an LVMS configuration file
8+
9+
When {product-title} runs, it uses LVMS configuration from `/etc/microshift/lvmd.yaml`, if provided. You must place any configuration files that you create into the `/etc/microshift/` directory.
10+
11+
.Procedure
12+
13+
* To create the `lvmd.yaml` configuration file, run the following command:
14+
+
15+
[source, terminal]
16+
----
17+
$ sudo cp /etc/microshift/lvmd.yaml.default /etc/microshift/lvmd.yaml
18+
----

modules/microshift-lvms-configuring.adoc

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,15 @@
33
// * microshift_storage/microshift-storage-plugin-overview.adoc
44

55
:_content-type: CONCEPT
6-
[id="lvms-configuring_{context}"]
6+
[id="microshift-lvms-configuring_{context}"]
77
= Configuring the LVMS
88

9-
{product-title} supports passing through your LVM configuration and allows you to specify custom volume groups, thin volume provisioning parameters, and reserved unallocated volume group space. You can edit the LVMS configuration file at any time. You must restart {product-title} to deploy configuration changes after editing the file.
9+
{product-title} supports passing through your LVM configuration and allows you to specify custom volume groups, thin volume provisioning parameters, and reserved unallocated volume group space. You can edit the LVMS configuration file you created at any time. You must restart {product-title} to deploy configuration changes after editing the file.
1010

1111
The following `lvmd.yaml` example file shows a basic LVMS configuration:
1212

13-
.LVMS YAML configuration example
13+
.LVMS configuration example
14+
1415
[source,yaml]
1516
----
1617
socket-name: <1>
@@ -36,7 +37,7 @@ device-classes: <2>
3637
<2> `map[string]DeviceClass`. The `device-class` settings.
3738
<3> String. The name of the `device-class`.
3839
<4> String. The group where the `device-class` creates the logical volumes.
39-
<5> Unit64. Storage capacity in GiB to be left unallocated in the volume group. Defaults to `10`.
40+
<5> Unit64. Storage capacity in GiB to be left unallocated in the volume group. Defaults to `0`.
4041
<6> Boolean. Indicates that the `device-class` is used by default. Defaults to `false`.
4142
<7> Unit. The number of stripes in the logical volume.
4243
<8> String. The amount of data that is written to one device before moving to the next device.

modules/microshift-lvms-deployment.adoc

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,9 @@
33
// * microshift_storage/microshift-storage-plugin-overview.adoc
44

55
:_content-type: CONCEPT
6-
[id="lvms-deployment_{context}"]
7-
= LVMS Deployment
6+
[id="microshift-lvms-deployment_{context}"]
7+
= LVMS deployment
88

9-
LVMS is automatically deployed on to the cluster in the `openshift-storage` namespace after {product-title} boots.
10-
//Q: is this correct, or should it be `microshift-namespace`?
9+
LVMS is automatically deployed on to the cluster in the `openshift-storage` namespace after {product-title} starts.
1110

12-
LVMS uses `StorageCapacity` tracking to ensure that pods with an LVMS PVC are not scheduled if the requested storage is greater than the free storage of the volume group. For more information about `StorageCapacity` tracking, read link:https://kubernetes.io/docs/concepts/storage/storage-capacity/[Storage Capacity].
11+
LVMS uses `StorageCapacity` tracking to ensure that pods with an LVMS PVC are not scheduled if the requested storage is greater than the free storage of the volume group. For more information about `StorageCapacity` tracking, read link:https://kubernetes.io/docs/concepts/storage/storage-capacity/[Storage Capacity].

modules/microshift-lvms-setting-path.adoc

Lines changed: 0 additions & 17 deletions
This file was deleted.

modules/microshift-lvms-system-requirements.adoc

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,29 +3,30 @@
33
// * microshift_storage/microshift-storage-plugin-overview.adoc
44

55
:_content-type: CONCEPT
6-
[id="lvms-system-requirements_{context}"]
6+
[id="microshift-lvms-system-requirements_{context}"]
77
= LVMS system requirements
88

99
Using LVMS in {product-title} requires the following system specifications.
1010

1111
[id="lvms-volume-group-name_{context}"]
12-
== Volume Group Name
12+
== Volume group name
1313

14-
The default integration of LVMS selects the default volume group dynamically. If there are no volume groups on the {product-title} host, LVMS is disabled.
14+
The default integration of LVMS selects the default volume group (VG) dynamically. If there are no volume groups on the {product-title} host, LVMS is disabled.
1515

16-
If there is only one volume group on the {product-title} host, that volume group is used. If there are multiple volume groups, the group `microshift` is used. If the `microshift` group is not found, LVMS is disabled.
16+
If there is only one VG on the {product-title} host, that VG is used. If there are multiple volume groups, the group `microshift` is used. If the `microshift` group is not found, LVMS is disabled.
1717

18-
If you want to use a specific volume group, LVMS must be configured to select that volume group. You can change the default name of the volume group in the configuration file. For details, read the "Configuring the LVMS" section of this document.
18+
If you want to use a specific VG, LVMS must be configured to select that VG. You can change the default name of the VG in the configuration file. For details, read the "Configuring the LVMS" section of this document.
1919

20-
You can change the default name of the volume group in the configuration file. For details, read the "Configuring the LVMS" section of this document.
20+
You can change the default name of the VG in the configuration file. For details, read the "Configuring the LVMS" section of this document.
2121

22-
Prior to launching, the `lvmd.yaml` configuration file must specify an existing volume group on the node with sufficient capacity for workload storage. If the volume group does not exist, the node controller fails to start and enters a `CrashLoopBackoff` state.
22+
Prior to launching, the `lvmd.yaml` configuration file must specify an existing VG on the node with sufficient capacity for workload storage. If the VG does not exist, the node controller fails to start and enters a `CrashLoopBackoff` state.
2323

2424
[id="lvms-volume-size-increments_{context}"]
2525
== Volume size increments
2626

27-
The LVMS provisions storage in increments of 1 gigabyte (GB). Storage requests are rounded up to the nearest GB. When the capacity of a volume group is less than 1 GB, the `PersistentVolumeClaim` registers a `ProvisioningFailed` event, for example:
27+
The LVMS provisions storage in increments of 1 gigabyte (GB). Storage requests are rounded up to the nearest GB. When the capacity of a VG is less than 1 GB, the `PersistentVolumeClaim` registers a `ProvisioningFailed` event, for example:
2828

29+
.Example output
2930
[source,terminal]
3031
----
3132
Warning ProvisioningFailed 3s (x2 over 5s) topolvm.cybozu.com_topolvm-controller-858c78d96c-xttzp_0fa83aef-2070-4ae2-bcb9-163f818dcd9f failed to provision volume with

modules/microshift-using-lvms.adoc renamed to modules/microshift-lvms-using.adoc

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,15 @@
22
//
33
// * microshift_storage/microshift-storage-plugin-overview.adoc
44

5-
:_content-type: CONCEPT
6-
[id="using-lvms_{context}"]
5+
:_content-type: PROCEDURE
6+
[id="microshift-lvms-using_{context}"]
77
= Using the LVMS
88

9-
The LVMS `StorageClass` is deployed with a default `StorageClass`. Any `PersistentVolumeClaim` objects without a `.spec.storageClassName` defined automatically has a `PersistentVolume` provisioned from the default `StorageClass`.
10-
11-
Use the following procedure to provision and mount a logical volume to a pod.
9+
The LVMS `StorageClass` is deployed with a default `StorageClass`. Any `PersistentVolumeClaim` objects without a `.spec.storageClassName` defined automatically has a `PersistentVolume` provisioned from the default `StorageClass`. Use the following procedure to provision and mount a logical volume to a pod.
1210

1311
.Procedure
1412

15-
* Enter the following command to provision and mount a logical volume to a pod:
13+
* To provision and mount a logical volume to a pod, run the following command:
1614
+
1715
[source,terminal]
1816
----
@@ -41,6 +39,14 @@ spec:
4139
volumeMounts:
4240
- mountPath: /mnt
4341
name: my-volume
42+
securityContext:
43+
allowPrivilegeEscalation: false
44+
capabilities:
45+
drop:
46+
- ALL
47+
runAsNonRoot: true
48+
seccompProfile:
49+
type: RuntimeDefault
4450
volumes:
4551
- name: my-volume
4652
persistentVolumeClaim:

0 commit comments

Comments
 (0)