You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+17-61Lines changed: 17 additions & 61 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,68 +26,32 @@ Open the IDE:<br/>
26
26
27
27
## Example
28
28
29
-
Here is a sample DevWorkspace to provision a Cloud Development Environment for the project
30
-
[github.com/l0rd/outyet](https://github.com/l0rd/outyet) with Visual Studio Code as editor and
29
+
Here is a sample `DevWorkspace` to provision a Cloud Development Environment for the project
30
+
[github.com/l0rd/outyet](https://github.com/l0rd/outyet) with Visual Studio Code as the editor and
31
31
`quay.io/devfile/universal-developer-image:ubi8-latest` as the development tooling container image.<br/>
32
32
33
-
The **template section of a DevWorkspace** is actually [a Devfile](https://devfile.io/docs/2.3.0/what-is-a-devfile): the
34
-
`spec.template` schema matches the [Devfile schema](https://devfile.io/docs/2.3.0/devfile-schema).
35
-
36
-
**Contributions** are extra components that are added on top of the template. Contributions are used to inject editors
37
-
such as Visual Studio Code and JetBrains.
38
-
39
33

40
34
41
-
## Configuration
42
-
43
-
### Global configuration for the DevWorkspace Operator
35
+
#### DevWorkspace Template
44
36
45
-
The DevWorkspace Operator installs the DevWorkspaceOperatorConfig custom resource (short name: `dwoc`). To configure global behavior of the DevWorkspace Operator, create a DevWorkspaceOperatorConfig named `devworkspace-operator-config` in the same namespace where the operator is deployed:
46
-
```yaml
47
-
apiVersion: controller.devfile.io/v1alpha1
48
-
kind: DevWorkspaceOperatorConfig
49
-
metadata:
50
-
name: devworkspace-operator-config
51
-
namespace: $OPERATOR_INSTALL_NAMESPACE
52
-
config:
53
-
# Configuration fields
54
-
```
55
-
56
-
To apply a configuration to specific workspaces instead of globally, an existing DevWorkspaceOperatorConfig can be referenced in a DevWorkspace's attributes:
57
-
```yaml
58
-
apiVersion: workspace.devfile.io/v1alpha2
59
-
kind: DevWorkspace
60
-
metadata:
61
-
name: my-devworkspace
62
-
spec:
63
-
template:
64
-
attributes:
65
-
controller.devfile.io/devworkspace-config:
66
-
name: <name of DevWorkspaceOperatorConfig CR>
67
-
namespace: <namespace of DevWorkspaceOperatorConfig CR>
68
-
```
69
-
Configuration specified as above will be merged into the default global configuration, overriding any values present.
37
+
The Template section of a `DevWorkspace` is actually [a Devfile](https://devfile.io/docs/2.3.0/what-is-a-devfile): the
38
+
`spec.template` schema matches the [Devfile schema](https://devfile.io/docs/2.3.0/devfile-schema). :warning: A few
DevWorkspaces can be further configured through DevWorkspace attributes and Kubernetes labels/annotations. For a list of all options available, see [additional documentation](docs/additional-configuration.adoc).
51
+
#### Additional configuration
76
52
77
-
### Restricted Access
78
-
79
-
The `controller.devfile.io/restricted-access` annotation specifies that a DevWorkspace needs additional access control (in addition to RBAC). When a DevWorkspace is created with the `controller.devfile.io/restricted-access` annotation set to `true`, the webhook server will guarantee
80
-
- Only the DevWorkspace Operator ServiceAccount or DevWorkspace creator can modify important fields in the DevWorkspace
81
-
- Only the DevWorkspace creator can create `pods/exec` into devworkspace-related containers.
82
-
83
-
This annotation should be used when a DevWorkspace is expected to contain sensitive information that should be protect above the protection provided by standard RBAC rules (e.g. if the DevWorkspace will store the user's OpenShift token in-memory).
84
-
85
-
Example:
86
-
```yaml
87
-
metadata:
88
-
annotations:
89
-
controller.devfile.io/restricted-access: true
90
-
```
53
+
DevWorkspaces can be further configured through DevWorkspace `attributes`, `labels` and `annotations`. For a list of all
54
+
options available, see [additional documentation](docs/additional-configuration.adoc).
91
55
92
56
## Deploying DevWorkspace Operator
93
57
@@ -250,14 +214,6 @@ make generate_all # second commit
250
214
```
251
215
Example of the devfile API update [PR](https://github.com/devfile/devworkspace-operator/pull/797)
252
216
253
-
### Controller configuration
254
-
255
-
Controller behavior can be configured using the `DevWorkspaceOperatorConfig` custom resource (`dwoc` for short). To configure the controller, create a `DevWorkspaceOperatorConfig` named `devworkspace-operator-config` in the same namespace as the controller. If using the Makefile to deploy the DevWorkspaceOperator, a pre-filled config is created automatically (see `deploy/default-config.yaml`).
256
-
257
-
Configuration settings in the `DevWorkspaceOperatorConfig` override default values found in [pkg/config](https://github.com/devfile/devworkspace-operator/tree/main/pkg/config). The only required configuration setting is `.routing.clusterHostSuffix`, which is required when running on Kubernetes.
258
-
259
-
To see documentation on configuration settings, including default values, use `kubectl explain` or `oc explain` -- e.g. `kubectl explain dwoc.config.routing.clusterHostSuffix`
260
-
261
217
### Remove controller from your K8s/OS Cluster
262
218
To uninstall the controller and associated CRDs, use the Makefile uninstall rule:
Copy file name to clipboardExpand all lines: docs/additional-configuration.adoc
-22Lines changed: 0 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -363,25 +363,3 @@ spec:
363
363
----
364
364
365
365
For documentation on Runtime Classes, see https://kubernetes.io/docs/concepts/containers/runtime-class/
366
-
367
-
## Configuring the Webhook deployment
368
-
The `devworkspace-webhook-server` deployment can be configured in the global DevWorkspaceOperatorConfig (DWOC). The configuration options include: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#replicas[replicas], https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/[pod tolerations] and https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#nodeselector[nodeSelector].
369
-
370
-
These configuration options exist in the **global** DWOC's `config.webhook` field:
371
-
[source,yaml]
372
-
----
373
-
apiVersion: controller.devfile.io/v1alpha1
374
-
kind: DevWorkspaceOperatorConfig
375
-
metadata:
376
-
name: devworkspace-operator-config
377
-
namespace: $OPERATOR_INSTALL_NAMESPACE
378
-
config:
379
-
webhook:
380
-
nodeSelector: <string,string>
381
-
tolerations: <[]tolerations>
382
-
replicas: <int32>
383
-
----
384
-
**Note:** In order for the `devworkspace-webhook-server` configuration options to take effect:
385
-
386
-
- You must place them in the https://github.com/devfile/devworkspace-operator?tab=readme-ov-file#global-configuration-for-the-devworkspace-operator[global DWOC], which has the name `devworkspace-operator-config` and exists in the namespace where the DevWorkspaceOperator is installed. If it does not already exist on the cluster, you must create it.
387
-
- You'll need to terminate the `devworkspace-controller-manager` pod so that the replicaset can recreate it. The new pod will update the `devworkspace-webhook-server` deployment.
**The only required configuration setting is `.routing.clusterHostSuffix`, which is required when running on
13
+
Kubernetes.**
14
+
15
+
Configuration settings in the `DevWorkspaceOperatorConfig` override default values found in [pkg/config](https://github.com/devfile/devworkspace-operator/tree/main/pkg/config).
16
+
17
+
### Global configuration for the DevWorkspace Operator
18
+
19
+
To configure global behavior of the DevWorkspace Operator, create a `DevWorkspaceOperatorConfig` named
20
+
`devworkspace-operator-config` in the same namespace where the operator is deployed:
21
+
```yaml
22
+
apiVersion: controller.devfile.io/v1alpha1
23
+
kind: DevWorkspaceOperatorConfig
24
+
metadata:
25
+
name: devworkspace-operator-config
26
+
namespace: $OPERATOR_INSTALL_NAMESPACE
27
+
config:
28
+
# Configuration fields
29
+
```
30
+
31
+
### DevWorkspace specific configuration
32
+
33
+
To apply a configuration to a specific `DevWorkspace` instead of globally, an existing `DevWorkspaceOperatorConfig` can
34
+
be referenced in a `DevWorkspace`'s attributes:
35
+
```yaml
36
+
apiVersion: workspace.devfile.io/v1alpha2
37
+
kind: DevWorkspace
38
+
metadata:
39
+
name: my-devworkspace
40
+
spec:
41
+
template:
42
+
attributes:
43
+
controller.devfile.io/devworkspace-config:
44
+
name: <name of DevWorkspaceOperatorConfig CR>
45
+
namespace: <namespace of DevWorkspaceOperatorConfig CR>
46
+
```
47
+
Configuration specified as above will be merged into the default global configuration, overriding any values present.
48
+
49
+
## Configuring the Webhook deployment
50
+
The `devworkspace-webhook-server` deployment can be configured in the global `DevWorkspaceOperatorConfig`.
0 commit comments