Skip to content

Commit

Permalink
Devspaces combine folders (#285)
Browse files Browse the repository at this point in the history
* move docs

* move configs into components

* update checluster to match default for new instance

* add combined overlay

* convert devspaces to symlink

* add autoscaling

* fix yaml lint errors

* add network policy
  • Loading branch information
strangiato authored May 2, 2024
1 parent c95087b commit e137200
Show file tree
Hide file tree
Showing 25 changed files with 112 additions and 199 deletions.
1 change: 1 addition & 0 deletions .wordlist-md
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ approver
argocd
argoproj
arn
autoscaling
aws
canada
ceph
Expand Down
1 change: 1 addition & 0 deletions devspaces
63 changes: 0 additions & 63 deletions devspaces/instance/base/checluster.yaml

This file was deleted.

12 changes: 0 additions & 12 deletions devspaces/instance/base/kustomization.yaml

This file was deleted.

7 changes: 0 additions & 7 deletions devspaces/instance/base/namespace.yaml

This file was deleted.

3 changes: 0 additions & 3 deletions devspaces/instance/overlays/default/README.md

This file was deleted.

5 changes: 0 additions & 5 deletions devspaces/instance/overlays/default/kustomization.yaml

This file was deleted.

24 changes: 0 additions & 24 deletions devspaces/instance/overlays/timeout-12m/kustomization.yaml

This file was deleted.

5 changes: 0 additions & 5 deletions devspaces/operator/base/kustomization.yaml

This file was deleted.

11 changes: 0 additions & 11 deletions devspaces/operator/base/subscription.yaml

This file was deleted.

11 changes: 0 additions & 11 deletions devspaces/operator/overlays/stable/kustomization.yaml

This file was deleted.

3 changes: 0 additions & 3 deletions devspaces/operator/overlays/stable/patch-channel.yaml

This file was deleted.

File renamed without changes.
6 changes: 3 additions & 3 deletions devspaces/README.md → openshift-dev-spaces/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ The current *overlays* available are for the following channels:
If you have cloned the `gitops-catalog` repository, you can install Red Hat OpenShift Dev Spaces based on the overlay of your choice by running from the root (`gitops-catalog`) directory.

```
oc apply -k devspaces/operator/overlays/<channel>
oc apply -k openshift-dev-spaces/operator/overlays/<channel>
```

Or, without cloning:

```
oc apply -k https://github.com/redhat-cop/gitops-catalog/devspaces/operator/overlays/<channel>
oc apply -k https://github.com/redhat-cop/gitops-catalog/openshift-dev-spaces/operator/overlays/<channel>
```

As part of a different overlay in your own GitOps repo:
Expand All @@ -28,5 +28,5 @@ As part of a different overlay in your own GitOps repo:
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- https://github.com/redhat-cop/gitops-catalog/devspaces/operator/overlays/<channel>?ref=main
- https://github.com/redhat-cop/gitops-catalog/openshift-dev-spaces/operator/overlays/<channel>?ref=main
```
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ commonAnnotations:
argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true

resources:
- ../../../instance/overlays/timeout-12m
- ../../../operator/overlays/stable
- ../../../instance/overlays/allow-autoscaling
77 changes: 32 additions & 45 deletions openshift-dev-spaces/instance/base/checluster.yaml
Original file line number Diff line number Diff line change
@@ -1,49 +1,36 @@
apiVersion: org.eclipse.che/v1
apiVersion: org.eclipse.che/v2
kind: CheCluster
metadata:
name: devspaces
namespace: openshift-devspaces
spec:
auth:
externalIdentityProvider: false
identityProviderContainerResources:
limits: {}
request: {}
identityProviderIngress: {}
identityProviderRoute: {}
updateAdminPassword: false
dashboard: {}
database:
chePostgresContainerResources:
limits: {}
request: {}
externalDb: false
devWorkspace:
enable: true
imagePuller:
enable: false
spec: {}
k8s: {}
metrics:
enable: true
server:
allowUserDefinedWorkspaceNamespaces: false
cheServerIngress: {}
cheServerRoute: {}
dashboardIngress: {}
dashboardRoute: {}
devfileRegistryIngress: {}
devfileRegistryRoute: {}
externalDevfileRegistry: false
externalPluginRegistry: false
gitSelfSignedCert: false
pluginRegistryIngress: {}
pluginRegistryRoute: {}
selfSignedCert: false
tlsSupport: false
useInternalClusterSVCNames: false
workspaceNamespaceDefault: <username>-devspaces
storage:
preCreateSubPaths: true
pvcClaimSize: 10Gi
pvcStrategy: common
components:
cheServer:
debug: false
logLevel: INFO
dashboard:
logLevel: ERROR
metrics:
enable: true
containerRegistry: {}
devEnvironments:
startTimeoutSeconds: 300
secondsOfRunBeforeIdling: -1
maxNumberOfWorkspacesPerUser: -1
containerBuildConfiguration:
openShiftSecurityContextConstraint: container-build
defaultNamespace:
autoProvision: true
template: <username>-devspaces
secondsOfInactivityBeforeIdling: 1800
storage:
pvcStrategy: per-user
gitServices: {}
networking:
auth:
gateway:
kubeRbacProxy:
logLevel: 0
oAuthProxy:
cookieExpireSeconds: 86400
traefik:
logLevel: INFO
1 change: 1 addition & 0 deletions openshift-dev-spaces/instance/base/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ namespace: openshift-devspaces
resources:
- checluster.yaml
- namespace.yaml
- network-policy.yaml
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# allow-autoscaling

## Purpose
This component is designed to extend the timeout period for requesting new DevSpaces environments to start. The 12 minute timeout can be leveraged with autoscaling nodes with GPUs.

## Usage

This component can be added to a base by adding the `components` section to your overlay `kustomization.yaml` file:

```
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ../../base
components:
- ../../components/allow-autoscaling
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: kustomize.config.k8s.io/v1alpha1
kind: Component

resources:
- devworkspace-config.yaml

patches:
- path: patch-checluster.yaml
target:
kind: CheCluster
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: org.eclipse.che/v2
kind: CheCluster
metadata:
name: devspaces
spec:
components:
dashboard:
headerMessage:
show: true
text: "Please be patient... GPUs may take up to 12 min to be available!"
devEnvironments:
StartTimeoutSeconds: 720
19 changes: 19 additions & 0 deletions openshift-dev-spaces/instance/components/low-idle/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# timeout-12m

## Purpose
This component is designed to modify the amount of time a DevSpaces environment can remain idle before it is automatically shut down.

## Usage

This component can be added to a base by adding the `components` section to your overlay `kustomization.yaml` file:

```
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ../../base
components:
- ../../components/low-idle
```
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

resources:
- ../../../instance/overlays/timeout-12m
- ../../../operator/overlays/stable
apiVersion: kustomize.config.k8s.io/v1alpha1
kind: Component

patches:
- target:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

namespace: openshift-devspaces

resources:
- ../../base

components:
- ../../components/allow-autoscaling
- ../../components/low-idle

0 comments on commit e137200

Please sign in to comment.