Skip to content

Commit 312198e

Browse files
AObuchowamisevsk
authored andcommitted
Document per-workspace external DWOC configuration
Signed-off-by: Andrew Obuchowicz <[email protected]>
1 parent 5bccfb0 commit 312198e

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

docs/additional-configuration.adoc

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,33 @@ Note: As for automatically mounting secrets, it is necessary to apply the `contr
156156
157157
This will mount a file `/tmp/.git-credentials/credentials` in all workspace containers, and construct a git config to use this file as a credentials store. The mount path specified by the `controller.devfile.io/mount-path` annotation can by omitted, in which case `/` is used (mounting a file `/credentials`).
158158
159+
## Setting an alternate configuration for a workspace
160+
It is possible to configure a workspace to use an alternate DevWorkspaceOperatorConfig.
161+
In order to do so, the alternate DevWorkspaceOperatorConfig must exist on the cluster, and the `controller.devfile.io/devworkspace-config` workspace attribute must be set.
162+
The `controller.devfile.io/devworkspace-config` attribute takes two string fields: `name` and `namespace`.
163+
164+
* `name`: the `metadata.name` of the alternate DevWorkspaceOperatorConfig.
165+
* `namespace`: the `metadata.namespace` of the alternate DevWorkspaceOperatorConfig.
166+
167+
[source,yaml]
168+
----
169+
kind: DevWorkspace
170+
apiVersion: workspace.devfile.io/v1alpha2
171+
metadata:
172+
name: my-workspace
173+
spec:
174+
template:
175+
attributes:
176+
controller.devfile.io/devworkspace-config:
177+
name: <string>
178+
namespace: <string>
179+
----
180+
181+
*Note:* the alternate DevWorkspaceOperatorConfig will be
182+
merged with the default DevWorkspaceOperatorConfig, overriding
183+
fields in the default configuration. Fields unset in the overridden
184+
configuration will use the global values.
185+
159186
## Debugging a failing workspace
160187
Normally, when a workspace fails to start, the deployment will be scaled down and the workspace will be stopped in a `Failed` state. This can make it difficult to debug misconfiguration errors, so the annotation `controller.devfile.io/debug-start: "true"` can be applied to DevWorkspaces to leave resources for failed workspaces on the cluster. This allows viewing logs from workspace containers.
161188

0 commit comments

Comments
 (0)