Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions roles/ocp4_workload_devspaces/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ ocp4_workload_devspaces_namespace: openshift-devspaces
ocp4_workload_devspaces_max_number_of_workspaces: 2
ocp4_workload_devspaces_max_number_of_running_workspaces: 1

# Optional storage strategy: per-user, per-workspace, or ephemeral.
# Leave empty to retain the operator default or existing cluster configuration.
# Independent per-workspace volumes support concurrent workspaces on RWO storage.
ocp4_workload_devspaces_pvc_strategy: ""

ocp4_workload_devspaces_setup_devworkspaces: false
ocp4_workload_devspaces_devworkspace_devfile: >-
http://devspaces-dashboard.openshift-devspaces.svc.cluster.local:8080/dashboard/api/editors/devfile?che-editor=che-incubator/che-code/latest
Expand Down
25 changes: 25 additions & 0 deletions roles/ocp4_workload_devspaces/readme.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,28 @@
== Role overview

This role installs Red Hat OpenShift Dev Spaces into an OpenShift Cluster.

== Concurrent workspaces and storage

The role defaults to two saved workspaces and one running workspace. Storage is
left unspecified, preserving the existing configuration or the Dev Spaces
operator's `per-user` default. To run two workspaces at the same time with independent
persistent volumes, set:

[source,yaml]
----
ocp4_workload_devspaces_max_number_of_workspaces: 2
ocp4_workload_devspaces_max_number_of_running_workspaces: 2
ocp4_workload_devspaces_pvc_strategy: per-workspace
----

`ocp4_workload_devspaces_pvc_strategy` accepts an empty string (the default),
`per-user`, `per-workspace`, or `ephemeral`. With ReadWriteOnce volumes,
concurrent workspaces sharing a per-user
volume can encounter attachment failures when scheduled on different nodes.
Use `per-workspace` to give each workspace its own persistent volume. `ephemeral`
storage does not preserve local changes when a workspace stops.

The storage default applies to newly created workspaces. Changing it does not
migrate existing workspace files or PVCs; back up local work before recreating
an existing workspace with a different storage strategy.
4 changes: 4 additions & 0 deletions roles/ocp4_workload_devspaces/templates/checluster.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,7 @@ spec:
secondsOfInactivityBeforeIdling: -1
maxNumberOfWorkspacesPerUser: {{ ocp4_workload_devspaces_max_number_of_workspaces }}
maxNumberOfRunningWorkspacesPerUser: {{ ocp4_workload_devspaces_max_number_of_running_workspaces }}
{% if ocp4_workload_devspaces_pvc_strategy | length > 0 %}
storage:
pvcStrategy: {{ ocp4_workload_devspaces_pvc_strategy }}
{% endif %}
Loading