Commit Graph

18 Commits (634c6228bbf6db6b58ddacd3339daddd3ebda0f4)

Author SHA1 Message Date
Anatolii Bazko a4e19ead9d
chore: Update dev resources (#1774)
* chore: Update dev resources

Signed-off-by: Anatolii Bazko <abazko@redhat.com>
2023-11-02 15:16:31 +01:00
Angel Misevski 851f110311 Add documentation on why proxy configuration is disabled in DWO
Co-authored-by: Anatolii Bazko <abazko@redhat.com>
Signed-off-by: Angel Misevski <amisevsk@redhat.com>
2023-10-19 13:10:10 -04:00
Angel Misevski 387f676773 Disable DWO's workspace proxy handling when proxy configuration is detected
If we allow the DevWorkspace Operator to handle proxy settings for workspaces,
it will add proxy environment variables to workspace containers with the
values it detects on the cluster (or through its own
DevWorkspaceOperatorConfig)

Since these environment variables are defined in the deployment yaml,
their values override values for proxy environment variables defined by
the automount 'proxy-config' configmap.

To avoid this, we configure DWO to not set any proxy settings for
workspaces we manage.

Signed-off-by: Angel Misevski <amisevsk@redhat.com>
2023-10-19 13:10:10 -04:00
Anatolii Bazko 6cf8df2b86
feat: Allow to configure ImagePullPolicyt for a user workspace (#1747)
* fear: Allow to configure ImagePullPolicy for a user workspace

Signed-off-by: Anatolii Bazko <abazko@redhat.com>
2023-08-23 09:50:26 +02:00
Andrew O 1bd44bdb28
add pod & container security context Che Cluster Fields (#1729)
* feat: add Che Cluster CR fields for pod & container security context

Also modify devEnvironments.disableContainerBuildCapabilities field documentation
to mention it overrides devEnvironments.security.containerSecurityContext
when set to false.

Signed-off-by: Andrew Obuchowicz <aobuchow@redhat.com>

* feat: configure DWOC pod & container security context from Che Cluster CR

Signed-off-by: Andrew Obuchowicz <aobuchow@redhat.com>

* chore: Add tests for DWOC pod & security context configuration

Signed-off-by: Andrew Obuchowicz <aobuchow@redhat.com>

* chore: update dev resources for Che Cluster CR devEnvironments.security field

Also updates dev resources for devEnvironments.disableContainerBuildCapabilities
field documentation.

Signed-off-by: Andrew Obuchowicz <aobuchow@redhat.com>

* chore: split DevWorkspaceConfig tests into seperate functions

Signed-off-by: Andrew Obuchowicz <aobuchow@redhat.com>

* chore: clean up DevWorkspaceConfig container builds tests

Signed-off-by: Andrew Obuchowicz <aobuchow@redhat.com>

* chore: clean up unused error in DevWorkspaceOperatorConfig reconciler

Signed-off-by: Andrew Obuchowicz <aobuchow@redhat.com>

---------

Signed-off-by: Andrew Obuchowicz <aobuchow@redhat.com>
2023-08-10 16:54:52 +02:00
Andrew Obuchowicz 93691bb289 chore: add tests for configuring persistent workspace home directory config
Signed-off-by: Andrew Obuchowicz <aobuchow@redhat.com>
2023-07-27 15:35:10 +02:00
Andrew Obuchowicz 17ea193f27 feat: allow configuring persistent workspace home directory
Signed-off-by: Andrew Obuchowicz <aobuchow@redhat.com>
2023-07-27 15:35:10 +02:00
Angel Misevski d748431b2b [fix] Remove project clone config from DevWorkspace when unset
Removing the last field from a CheCluster's
devEnvironments.projectCloneContainer results in the change not being
propagated to the DevWorkspaceOperatorConfig.

Instead, if the CheCluster's field is unset, the
DevWorkspaceOperatorConfig's corresponding field should also be unset.

Signed-off-by: Angel Misevski <amisevsk@redhat.com>
2023-06-09 16:56:22 -04:00
Angel Misevski 02ce7749f0
Add fields for configuring project clone container to CheCluster CRD (#1687)
* Update devworkspace-operator dependency version to v0.21.0

Update devworkspace-operator dependency to v0.21.0 and update vendor dir

Signed-off-by: Angel Misevski <amisevsk@redhat.com>

* Add project clone container config field to CheCluster CR

Add field .spec.devEnvironments.projectCloneContainer to allow
configuring image, env, resources, and pull policy for the project clone
container.

This change reuses the existing Container struct for storing this
config, which means that

* The name field is ignored (it appears to be a discriminator for the
  Deployment struct's containers[] field
* Defaults are handled differently:
  * Default imagePullPolicy is the general pull policy for DWO, with
    default value "Always" (instead of depending on tag as documented)
  * Resource requirements set to "0" are interpreted as "do not set this
    field"

Signed-off-by: Angel Misevski <amisevsk@redhat.com>

* Add reconcile step that syncs CheCluster project clone to DevWorkspace

Sync the field CheCluster.devEnvironments.projectCloneConfig to the
DevWorkspaceOperatorConfig owned by the operator.

Update tests to cover new functionality.

Signed-off-by: Angel Misevski <amisevsk@redhat.com>

---------

Signed-off-by: Angel Misevski <amisevsk@redhat.com>
2023-05-31 09:58:50 +03:00
Andrew O a98d18233e
feat: configure workspace deployment strategy with CheCluster CR (#1666)
* feat: configure workspace deployment strategy with CheCluster CR

Signed-off-by: Andrew Obuchowicz <aobuchow@redhat.com>

* chore: add tests for configuring workspace deployment strategy

Signed-off-by: Andrew Obuchowicz <aobuchow@redhat.com>

* chore: update dev resources for devEnvironments.DeploymentStrategy

Signed-off-by: Andrew Obuchowicz <aobuchow@redhat.com>

---------

Signed-off-by: Andrew Obuchowicz <aobuchow@redhat.com>
2023-04-25 08:43:55 +03:00
Andrew O 5bd0cdc19a
feat: configure DWOC ServiceAccount tokens from devEnvironments.serviceAccountTokens (#1643)
* feat: configure DWOC ServiceAccount tokens from devEnvironments.serviceAccountTokens

Signed-off-by: Andrew Obuchowicz <aobuchow@redhat.com>
2023-04-17 16:49:09 +03:00
Anatolii Bazko c1ec947acd
feat: Move some defaults out of CheCluster to env variables (#1642)
* feat: Move some defaults out of CheCluster to env variables

Signed-off-by: Anatolii Bazko <abazko@redhat.com>
2023-03-29 09:09:46 +03:00
Angel Misevski 3d07ff759a
Set SCC allowPrivilegeEscalation to true when container build enabled (#1596)
* Set SCC allowPrivilegeEscalation to true when container build enabled

Running Podman inside a container in OpenShift requires the pod to have
allowPrivilegeEscalation: true in its security context.

* Fix tests

Signed-off-by: Angel Misevski <amisevsk@redhat.com>
2023-01-11 10:39:23 -05:00
Andrew O 571cd1e329
feat: configure workspace start timeout from Che Cluster CR (#1576)
* feat: configure workspace security context for container builds

Fix eclipse/che#21770

Signed-off-by: Andrew Obuchowicz <aobuchow@redhat.com>

* feat: add spec.devEnvironments.startTimeout to Che Cluster CR

Signed-off-by: Andrew Obuchowicz <aobuchow@redhat.com>

* chore: add tests for configuring DWO progressTimeout with Che Cluster CR

Signed-off-by: Andrew Obuchowicz <aobuchow@redhat.com>

* chore: update deployment, bundle, CSV and CRD

Signed-off-by: Andrew Obuchowicz <aobuchow@redhat.com>

* Update resources

Signed-off-by: Anatolii Bazko <abazko@redhat.com>

Signed-off-by: Andrew Obuchowicz <aobuchow@redhat.com>
Signed-off-by: Anatolii Bazko <abazko@redhat.com>
Co-authored-by: Anatolii Bazko <abazko@redhat.com>
2022-12-28 10:20:12 +02:00
David Kwon 4774568459
feat: spec.devEnvironments.podSchedulerName in CR (#1587)
* feat: spec.devEnvironments.podSchedulerName in CR

Signed-off-by: David Kwon <dakwon@redhat.com>
Co-authored-by: Anatolii Bazko <abazko@redhat.com>
2022-12-23 11:18:34 -05:00
Anatolii Bazko bd74906edc
feat: Support ephemeral pvc strategy (#1580)
* feat: Support ephemeral pvc strategy

Signed-off-by: Anatolii Bazko <abazko@redhat.com>
2022-12-21 09:24:19 +02:00
Anatolii Bazko 783d35046c
feat: Use a pre-created ServiceAccount for workspace Pods (#1569)
* feat: Use a pre-created ServiceAccount for workspace Pods

Signed-off-by: Anatolii Bazko <abazko@redhat.com>
2022-12-07 15:25:01 +02:00
Andrew O 75a31c3bb3
feat: configure DWOC from che-operator CR (#1494)
* feat: configure DWOC from che-operator CR

Currently, only the following fields from the checluster custom resource
are propagated to the DevWorkspace-Operator Configuration:

- `checluster.spec.devEnvironments.Storage.pvcStrategy`
- `checluster.spec.devEnvironments.Storage.perUserStrategyPvcConfig.ClaimSize`
- `checluster.spec.devEnvironments.Storage.perUserStrategyPvcConfig.StorageClass`
- `checluster.spec.devEnvironments.Storage.perWorkspaceStrategyPvcConfig.ClaimSize`
- `checluster.spec.devEnvironments.Storage.perWorkspaceStrategyPvcConfig.StorageClass`

Signed-off-by: Andrew Obuchowicz <aobuchow@redhat.com>

* Update CSV and autogenerated apiv2 deepcopy

Signed-off-by: Andrew Obuchowicz <aobuchow@redhat.com>

* Refactoring

Signed-off-by: Anatolii Bazko <abazko@redhat.com>

* make fmt

Signed-off-by: Anatolii Bazko <abazko@redhat.com>

Signed-off-by: Andrew Obuchowicz <aobuchow@redhat.com>
Signed-off-by: Anatolii Bazko <abazko@redhat.com>
Co-authored-by: Anatolii Bazko <abazko@redhat.com>
2022-09-02 19:50:35 +03:00