Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OSDOCS#5179:Retroactive default SC assignment #55649

Merged
merged 1 commit into from
Apr 14, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
50 changes: 50 additions & 0 deletions modules/persistent-storage-csi-sc-multiple-none.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
// Module included in the following assemblies:
//
// * storage/container_storage_interface/persistent-storage-csi-sc-manage.adoc
//
:_content-type: PROCEDURE
[id="persistent-storage-csi-sc-multiple-none_{context}"]
= Absent or multiple default storage classes

lpettyjo marked this conversation as resolved.
Show resolved Hide resolved
== Multiple default storage classes
Multiple default storage classes can occur if you mark a non-default storage class as default and do not unset the existing default storage class, or you create a default storage class when a default storage class is already present. With multiple default storage classes present, any persistent volume claim (PVC) requesting the default storage class (`pvc.spec.storageClassName`=nil) gets the most recently created default storage class, regardless of the default status of that storage class, and the administrator receives an alert in the alerts dashboard that there are multiple default storage classes, `MultipleDefaultStorageClasses`.

lpettyjo marked this conversation as resolved.
Show resolved Hide resolved
== Absent default storage class
There are two possible scenarios where PVCs can attempt to use a non-existent default storage class:
lpettyjo marked this conversation as resolved.
Show resolved Hide resolved

* An administrator removes the default storage class or marks it as non-default, and then a user creates a PVC requesting the default storage class.

* During installation, the installer creates a PVC requesting the default storage class, which has not yet been created.

In the preceding scenarios, the PVCs remain in pending state indefinitely.

{product-title} provides a feature to retroactively assign the default storage class to PVCs, so that they do not remain in the pending state. With this feature enabled, PVCs requesting the default storage class that are created when no default storage classes exists, remain in the pending state until a default storage class is created, or one of the existing storage classes is declared the default. As soon as the default storage class is created or declared, the PVC gets the new default storage class.

:FeatureName: Retroactive default storage class assignment
include::snippets/technology-preview.adoc[leveloffset=+1]

=== Procedure

lpettyjo marked this conversation as resolved.
Show resolved Hide resolved
To enable retroactive default storage class assignment:

. Enable feature gates (see _Nodes_ → _Working with clusters_ → _Enabling features using feature gates_).
+
[IMPORTANT]
====
After turning on Technology Preview features using feature gates, they cannot be turned off. As a result, cluster upgrades are prevented.
====
+
The following configuration example enables retroactive default storage class assignment, and all other Technology Preview features:
+
[source, yaml]
----
apiVersion: config.openshift.io/v1
kind: FeatureGate
metadata:
name: cluster
spec:
featureSet: TechPreviewNoUpgrade <1>
...
----
<1> Enables retroactive default storage class assignment.