diff --git a/src/main/pages/che-7/end-user-guide/assembly_making-a-workspace-portable-using-a-devfile.adoc b/src/main/pages/che-7/end-user-guide/assembly_making-a-workspace-portable-using-a-devfile.adoc index e4576c011e..b317efbdd9 100644 --- a/src/main/pages/che-7/end-user-guide/assembly_making-a-workspace-portable-using-a-devfile.adoc +++ b/src/main/pages/che-7/end-user-guide/assembly_making-a-workspace-portable-using-a-devfile.adoc @@ -21,7 +21,7 @@ include::con_what-is-a-devfile.adoc[leveloffset=+1] include::con_a-minimal-devfile.adoc[leveloffset=+1] -include::con_generate-name-of-a-workspace.adoc[leveloffset=+1] +include::proc_generating-workspace-names.adoc[leveloffset=+1] include::proc_writing-a-devfile-for-your-project.adoc[leveloffset=+1] diff --git a/src/main/pages/che-7/end-user-guide/con_a-minimal-devfile.adoc b/src/main/pages/che-7/end-user-guide/con_a-minimal-devfile.adoc index ab593a8bba..a7042c492e 100644 --- a/src/main/pages/che-7/end-user-guide/con_a-minimal-devfile.adoc +++ b/src/main/pages/che-7/end-user-guide/con_a-minimal-devfile.adoc @@ -26,5 +26,5 @@ For a complete devfile example, see link:https://github.com/eclipse/che/blob/mas [NOTE] .`name` or `generateName` must be defined ==== -Both `name` and `generateName` are optional parameters, but at least one of them must be defined, see link:#generate-name-of-a-workspace_making-a-workspace-portable-using-a-devfile[Generate name of a workspace]. +Both `name` and `generateName` are optional parameters, but at least one of them must be defined. See xref:#generating-workspace-names_{context}[]. ==== diff --git a/src/main/pages/che-7/end-user-guide/con_generate-name-of-a-workspace.adoc b/src/main/pages/che-7/end-user-guide/con_generate-name-of-a-workspace.adoc deleted file mode 100644 index 3701b90c00..0000000000 --- a/src/main/pages/che-7/end-user-guide/con_generate-name-of-a-workspace.adoc +++ /dev/null @@ -1,37 +0,0 @@ -// generate-name-of-a-workspace - -[id="generate-name-of-a-workspace_{context}"] -= Generate name of a workspace - -To partially generate name of the workspace, set the `generateName`. - -[source,yaml] ----- -apiVersion: 1.0.0 -metadata: - generateName: che- ----- - -The workspace name will be in format `YYYYY` (e.g. `che-2y7kp`). - -There name rules are applied when creating a workspace: - -* When `name` is defined, it is used as a workspace name - `` -* When only `generateName` is defined, it is used as a base for generated name - `YYYYY` - -[NOTE] -==== -`Y` is random `[a-z0-9]` character -==== - -= Name of a workspace when creating a workspace with Factory - -When creating namespace with factory from devfile, the name is always partially generated by these rules: - -* When `generateName` is defined, it is used as a base for generated name - `YYYYY`. -* When only `name` is defined, it is used as base for generated name - `YYYYY`. - -[NOTE] -==== -`Y` is random `[a-z0-9]` character -==== diff --git a/src/main/pages/che-7/end-user-guide/proc_generating-workspace-names.adoc b/src/main/pages/che-7/end-user-guide/proc_generating-workspace-names.adoc new file mode 100644 index 0000000000..7cefa596d2 --- /dev/null +++ b/src/main/pages/che-7/end-user-guide/proc_generating-workspace-names.adoc @@ -0,0 +1,25 @@ +// generate-name-of-a-workspace + +[id="generating-workspace-names_{context}"] += Generating workspace names + +To specify a prefix for automatically generated workspace names, set the `generateName` parameter in the `devfile.yaml` file: + +[source,yaml] +---- +apiVersion: 1.0.0 +metadata: + generateName: che- +---- + +The workspace name will be in the `YYYYY` format (for example, `che-2y7kp`). `Y` is random `[a-z0-9]` character. + +The following naming rules apply when creating workspaces: + +* When `name` is defined, it is used as the workspace name: `` +* When only `generateName` is defined, it is used as the base of the generated name: `YYYYY` + +[NOTE] +==== +For workspaces created using a factory, defining `name` or `generateName` has the same effect. The defined value is used as the name prefix: `YYYYY` or `YYYYY`. +====