From 0944967e5d92f732a22c645e440a2f41a43fbaaa Mon Sep 17 00:00:00 2001 From: Anatolii Bazko Date: Wed, 6 May 2026 12:26:05 +0200 Subject: [PATCH] Fixup doc (#3088) Signed-off-by: Anatolii Bazko --- modules/administration-guide/nav.adoc | 2 +- .../pages/configuring-a-user-namespace.adoc | 40 +++++++++++++------ ...etes-namespace-creation-on-openshift.adoc} | 8 ++-- 3 files changed, 32 insertions(+), 18 deletions(-) rename modules/administration-guide/pages/{configuring-direct-namespace-creation-on-openshift.adoc => configuring-kubernetes-namespace-creation-on-openshift.adoc} (88%) diff --git a/modules/administration-guide/nav.adoc b/modules/administration-guide/nav.adoc index 536596fc4a..e26825866c 100644 --- a/modules/administration-guide/nav.adoc +++ b/modules/administration-guide/nav.adoc @@ -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[] diff --git a/modules/administration-guide/pages/configuring-a-user-namespace.adoc b/modules/administration-guide/pages/configuring-a-user-namespace.adoc index 0051879dc2..d39dcb1b87 100644 --- a/modules/administration-guide/pages/configuring-a-user-namespace.adoc +++ b/modules/administration-guide/pages/configuring-a-user-namespace.adoc @@ -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 @@ -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: + ==== @@ -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. @@ -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. + diff --git a/modules/administration-guide/pages/configuring-direct-namespace-creation-on-openshift.adoc b/modules/administration-guide/pages/configuring-kubernetes-namespace-creation-on-openshift.adoc similarity index 88% rename from modules/administration-guide/pages/configuring-direct-namespace-creation-on-openshift.adoc rename to modules/administration-guide/pages/configuring-kubernetes-namespace-creation-on-openshift.adoc index 4515cbeb6a..f43b975cea 100644 --- a/modules/administration-guide/pages/configuring-direct-namespace-creation-on-openshift.adoc +++ b/modules/administration-guide/pages/configuring-kubernetes-namespace-creation-on-openshift.adoc @@ -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. @@ -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"] ---- @@ -28,7 +28,7 @@ On {ocp}, you can bypass Project Templates and create standard {kubernetes} Name "spec": { "devEnvironments": { "defaultNamespace": { - "createNamespaceDirectly": true + "createKubernetesNamespaces": true } } }