Skip to content

Commit

Permalink
chore: update pod/container overrides docs
Browse files Browse the repository at this point in the history
Signed-off-by: David Kwon <[email protected]>
  • Loading branch information
dkwon17 committed Jan 24, 2024
1 parent 3f17630 commit 29515cb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Binary file added docs/.DS_Store
Binary file not shown.
8 changes: 6 additions & 2 deletions docs/additional-configuration.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,9 @@ spec:
securityContext:
runAsUser: 1234
----
Note that the pod-overrides field does not allow configuring `containers`, `initContainers`, and `volumes`. In order to configure these elements, use existing DevWorkspace fields (container components, volume components)
Note that the pod-overrides field does not allow configuring `containers` and `initContainers`. In order to configure these elements, use the existing DevWorkspace `spec.template.components` field.
Note that extra precaution should be taken when overriding the `volumes` field. The DevWorkspace operator defines pod volumes by default for config files, metadata, and credentials. To avoid unexpected behaviour, these default volumes should not be overridden.
In the case that the `pod-overrides` attribute is defined multiple times in a DevWorkspace, each override will be applied in sequence (with later overrides potentially rewriting previous ones) in the following order:
Expand All @@ -325,7 +327,9 @@ spec:
attributes:
container-overrides: {"resources":{"limits":{"nvidia.com/gpu":"1"}}}
----
Note that the container-overrides field does not allow configuring fields that are available through the regular DevWorkspace API. In particular, workspaces will fail to start if the container-overrides attribute attempts to override `name`, `image`, `command`, `args`, `ports`, `volumeMounts`, or `env`.
Note that the container-overrides field does not allow configuring most fields that are available through the regular DevWorkspace API. In particular, workspaces will fail to start if the container-overrides attribute attempts to override `name`, `image`, `command`, `args`, `ports`, or `env`.
Note that extra precaution should be taken when overriding the `volumeMounts` field. The DevWorkspace operator defines volumeMounts by default for config files, metadata, and credentials. To avoid unexpected behaviour, these default volumeMounts should not be overridden.
## Debugging a failing workspace
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.
Expand Down

0 comments on commit 29515cb

Please sign in to comment.