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
2 changes: 1 addition & 1 deletion modules/administration-guide/nav.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
*** xref:configuring-workspace-target-namespace.adoc[]
*** xref:provisioning-namespaces-in-advance.adoc[]
*** xref:configuring-a-user-namespace.adoc[]
*** xref:configuring-direct-namespace-creation-on-openshift.adoc[]
*** xref:configuring-kubernetes-namespace-creation-on-openshift.adoc[]
** xref:configuring-server-components.adoc[]
*** xref:mounting-a-secret-as-a-file-or-an-environment-variable-into-a-container.adoc[]
*** xref:advanced-configuration-options-for-the-che-server-component.adoc[]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ In reverse, if a {kubernetes} resource is modified in a user namespace,

[WARNING]
====
Applying or modifying a `Secret` or `ConfigMap` with the `controller.devfile.io/mount-to-devworkspace: 'true'` label restarts all running workspaces in the {namespace}. Ensure that users save their work before you apply these changes.
Applying or modifying a `Secret` or `ConfigMap` with the `controller.devfile.io/mount-to-devworkspace: 'true'` label restarts all running workspaces in the {namespace}.

To mount the `Secret` or `ConfigMap` only at workspace start and prevent automatic restarts, add the `controller.devfile.io/mount-on-start: 'true'` annotation.
====

.Procedure
Expand All @@ -44,21 +46,23 @@ data:
====
To enhance the configurability, you can customize the `ConfigMap` by adding additional labels and annotations.
+
Add the following labels if you do not want the ConfigMap to be mounted automatically:
Add the annotation below if you want the ConfigMap to be retained in a user {namespace}
after being deleted from {prod-namespace} namespace:
+
[source,yaml,subs="+attributes,+quotes"]
----
controller.devfile.io/watch-configmap: "false"
controller.devfile.io/mount-to-devworkspace: "false"
che.eclipse.org/sync-retain-on-delete: "true"
----
+
Add the annotation below if you want the ConfigMap to be retained in a user {namespace}
after being deleted from {prod-namespace} namespace:
Add the following annotation to prevent workspace restarts when the ConfigMap is created:
+
[source,yaml,subs="+attributes,+quotes"]
----
che.eclipse.org/sync-retain-on-delete: "true"
controller.devfile.io/mount-on-start: "true"
----
+
With this annotation, the ConfigMap is mounted only at workspace start.
+
For example, to mount a default SSH configuration into every workspace, you must create a ConfigMap:
+
====
Expand Down Expand Up @@ -104,22 +108,23 @@ stringData:
====
To enhance the configurability, you can customize the `Secret` by adding additional labels and annotations.
+
Add the labels if you do not want the Secret to be mounted automatically:
Add the annotation below if you want the Secret to be retained in a user {namespace}
after being deleted from {prod-namespace} namespace:
+
[source,yaml,subs="+attributes,+quotes"]
----
controller.devfile.io/watch-secret: "false"
controller.devfile.io/mount-to-devworkspace: "false"
che.eclipse.org/sync-retain-on-delete: "true"
----
+
Add the annotation below if you want the Secret to be retained in a user {namespace}
after being deleted from {prod-namespace} namespace:
Add the following annotation to prevent workspace restarts when the Secret is created:
+
[source,yaml,subs="+attributes,+quotes"]
----
che.eclipse.org/sync-retain-on-delete: "true"
controller.devfile.io/mount-on-start: "true"
----
+
With this annotation, the Secret is mounted only at workspace start.
+
See the link:https://github.com/devfile/devworkspace-operator/blob/main/docs/additional-configuration.adoc#automatically-mounting-volumes-configmaps-and-secrets[mounting volumes, configmaps, and secrets]
for other possible labels and annotations.

Expand Down Expand Up @@ -151,6 +156,15 @@ Add the annotation below if you want the `PersistentVolumeClaim` to be deleted i
che.eclipse.org/sync-retain-on-delete: "false"
----
+
Add the following annotation to prevent workspace restarts when the `PersistentVolumeClaim` is created:
+
[source,yaml,subs="+attributes,+quotes"]
----
controller.devfile.io/mount-on-start: "true"
----
+
With this annotation, the `PersistentVolumeClaim` is mounted only at workspace start.
+
See the link:https://github.com/devfile/devworkspace-operator/blob/main/docs/additional-configuration.adoc#automatically-mounting-volumes-configmaps-and-secrets[mounting volumes, configmaps, and secrets]
for other possible labels and annotations.
+
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
:navtitle: Configuring direct namespace creation on OpenShift
:page-aliases:

[id="configuring-direct-namespace-creation-on-openshift"]
= Configuring direct namespace creation on OpenShift
[id="configuring-kubernetes-namespace-creation-on-openshift"]
= Configuring {kubernetes} namespace creation on OpenShift

By default, on {ocp} clusters, {prod-short} uses the ProjectRequest API to create projects. This triggers cluster-specific link:https://docs.openshift.com/container-platform/latest/applications/projects/configuring-project-creation.html[Project Templates], which can apply additional resources or policies.

Expand All @@ -17,7 +17,7 @@ On {ocp}, you can bypass Project Templates and create standard {kubernetes} Name

.Procedure

. Set the `createNamespaceDirectly` field to `true`:
. Set the `createKubernetesNamespaces` field to `true`:
+
[source,shell,subs="+quotes,+attributes,+macros"]
----
Expand All @@ -28,7 +28,7 @@ On {ocp}, you can bypass Project Templates and create standard {kubernetes} Name
"spec": {
"devEnvironments": {
"defaultNamespace": {
"createNamespaceDirectly": true
"createKubernetesNamespaces": true
}
}
}
Expand Down
Loading