Skip to content

Commit

Permalink
procedures: document PVC size configuration
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Obuchowicz <[email protected]>
  • Loading branch information
AObuchow committed Aug 28, 2023
1 parent f0d428b commit 16c7139
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 34 deletions.
56 changes: 56 additions & 0 deletions modules/administration-guide/pages/configuring-storage-sizes.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
:_content-type: PROCEDURE
:description: Configuring storage sizes
:keywords: administration guide, configuring, {prod-id-short}, storage sizes, PVC size, pvc
:navtitle: Configuring storage sizes
:page-aliases: installation-guide:configuring-storage-sizes.adoc

[id="configuring-storage-sizes"]
= Configuring storage sizes

You can configure the persistent volume claim (PVC) size when using the `per-user` or `per-workspace` storage strategies. You must specify the PVC sizes in the `CheCluster` Custom Resource in the format of a link:https://kubernetes.io/docs/reference/kubernetes-api/common-definitions/quantity/[{kubernetes} resource quantity]. For more details on the available storage strategies, see xref:configuring-the-storage-strategy.adoc[].

Default persistent volume claim sizes:

* {empty}
+
[source,yaml]
----
per-user: 10Gi
----

* {empty}
+
[source,yaml]
----
per-workspace: 5Gi
----


.Procedure

. Set the appropriate `claimSize` field for the desired storage strategy in the Che Cluster Custom Resource.

[NOTE]
====
* You can set this field at installation. See xref:using-chectl-to-configure-the-checluster-custom-resource-during-installation.adoc[].
* You can update this field on the command line. See xref:using-the-cli-to-configure-the-checluster-custom-resource.adoc[].
====

[source,yaml,subs="+quotes,+attributes"]
----
spec:
devEnvironments:
storage:
pvc:
pvcStrategy: '__<strategy_name>__' <1>
perUserStrategyPvcConfig: <2>
claimSize: __<resource_quantity>__ <3>
perWorkspaceStrategyPvcConfig: <2>
claimSize: __<resource_quantity>__ <3>
----
<1> Select the storage strategy: `per-user` or `per-workspace` or `ephemeral`. Note: the `ephemeral` storage strategy does not use persistent storage, therefore you cannot configure its storage size or other PVC-related attributes.
<2> Specify a claim size on the next line or omit the next line to set the default claim size value. The specified claim size is only used when you select this storage strategy.
<3> The claim size must be specified as a link:https://kubernetes.io/docs/reference/kubernetes-api/common-definitions/quantity/[{kubernetes} resource quantity]. The available quantity units include: `Ei`, `Pi`, `Ti`, `Gi`, `Mi` and `Ki`.
Original file line number Diff line number Diff line change
Expand Up @@ -39,37 +39,3 @@ spec:
pvcStrategy: 'per-user' <1>
----
<1> The available storage strategies are `per-user`, `per-workspace` and `ephemeral`.


[id="configuring-{prod-id-short}-workspace-pvc-size"]
== Configuring the storage size

The persistent volume claim (PVC) size can be configured when using the `per-user` or `per-workspace` storage strategies. PVC sizes in the Che Cluster Custom Resource must be specified in the format of a https://kubernetes.io/docs/reference/kubernetes-api/common-definitions/quantity/[{kubernetes} resource quantity].

.Default persistent volume claim sizes:

* `per-user`: `10Gi`
* `per-workspace`: `5Gi`

.Procedure

Use CheCluster Custom Resource definition to define the persistent volume claim size for the desired storage strategy:

Set the appropriate `claimSize` field for the desired storage strategy in the Che Cluster Custom Resource. To set this field prior to installing {prod-short}, see xref:using-chectl-to-configure-the-checluster-custom-resource-during-installation.adoc[], otherwise consult xref:using-the-cli-to-configure-the-checluster-custom-resource.adoc[].

[source,yaml,subs="+quotes,+attributes"]
----
spec:
devEnvironments:
storage:
pvc:
# the claimSize field that will be used depends on the selected pvcStrategy
# in this example, a persistent volume claim size of 15Gi will be used as the selected pvcStrategy is 'per-user'
pvcStrategy: 'per-user'
perUserStrategyPvcConfig:
# keep blank unless you need to use a non default persistent volume claim size
claimSize: 15Gi
perWorkspaceStrategyPvcConfig:
# keep blank unless you need to use a non default persistent volume claim size
claimSize: 2Gi
----

0 comments on commit 16c7139

Please sign in to comment.