diff --git a/.wordlist-md b/.wordlist-md index 6a30c431..cc5bfad3 100644 --- a/.wordlist-md +++ b/.wordlist-md @@ -105,6 +105,7 @@ approver argocd argoproj arn +autoscaling aws canada ceph diff --git a/devspaces b/devspaces new file mode 120000 index 00000000..e9b8c07a --- /dev/null +++ b/devspaces @@ -0,0 +1 @@ +openshift-dev-spaces \ No newline at end of file diff --git a/devspaces/instance/base/checluster.yaml b/devspaces/instance/base/checluster.yaml deleted file mode 100644 index e5ef05a9..00000000 --- a/devspaces/instance/base/checluster.yaml +++ /dev/null @@ -1,63 +0,0 @@ -apiVersion: org.eclipse.che/v2 -kind: CheCluster -metadata: - annotations: - argocd.argoproj.io/sync-wave: "5" - name: devspaces -spec: - components: - cheServer: - debug: false - logLevel: INFO - extraProperties: - CHE_SYSTEM_ADMIN__NAME: 'opentlc-mgr' - dashboard: - headerMessage: - show: false - text: >- - It's time to get your Dev on! - # database: - # credentialsSecretName: postgres-credentials - # externalDb: false - # postgresDb: devspaces - # # BUG: can not change postgresHostNamae - # postgresHostName: postgres - # postgresPort: '5432' - # pvc: - # claimSize: 1Gi - devfileRegistry: - # deployment: - # containers: - # - name: devfile-registry - # # image: quay.io/eclipse/che-devfile-registry:next - # image: registry.redhat.io/devspaces/devfileregistry-rhel8:latest - externalDevfileRegistries: - - url: https://eclipse-che.github.io/che-devfile-registry/main - metrics: - enable: true - # pluginRegistry: - # openVSXURL: "https://open-vsx.org" - # openVSXURL: "https://marketplace.visualstudio.com" - containerRegistry: {} - devEnvironments: - startTimeoutSeconds: 180 - secondsOfRunBeforeIdling: -1 - maxNumberOfRunningWorkspacesPerUser: 2 - maxNumberOfWorkspacesPerUser: -1 - containerBuildConfiguration: - openShiftSecurityContextConstraint: container-build - disableContainerBuildCapabilities: true - defaultEditor: che-incubator/che-code/latest - # defaultComponents: - # - container: - # sourceMapping: /projects - # image: registry.redhat.io/devspaces/udi-rhel8:latest - # name: universal-developer-image - defaultNamespace: - autoProvision: true - template: workspace- - secondsOfInactivityBeforeIdling: 1800 - storage: - pvcStrategy: per-user - gitServices: {} - networking: {} diff --git a/devspaces/instance/base/kustomization.yaml b/devspaces/instance/base/kustomization.yaml deleted file mode 100644 index 178fdc23..00000000 --- a/devspaces/instance/base/kustomization.yaml +++ /dev/null @@ -1,12 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization - -commonLabels: - component: devspaces - -namespace: devspaces - -resources: - - checluster.yaml - - devworkspace-config.yaml - - namespace.yaml diff --git a/devspaces/instance/base/namespace.yaml b/devspaces/instance/base/namespace.yaml deleted file mode 100644 index 2283637e..00000000 --- a/devspaces/instance/base/namespace.yaml +++ /dev/null @@ -1,7 +0,0 @@ -apiVersion: v1 -kind: Namespace -metadata: - name: devspaces - annotations: - openshift.io/display-name: "DevSpaces Infra" - argocd.argoproj.io/sync-wave: "0" diff --git a/devspaces/instance/overlays/default/README.md b/devspaces/instance/overlays/default/README.md deleted file mode 100644 index 635e9907..00000000 --- a/devspaces/instance/overlays/default/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Dev Spaces - -[OpenShift Dev Spaces Docs](https://access.redhat.com/documentation/en-us/red_hat_openshift_dev_spaces) diff --git a/devspaces/instance/overlays/default/kustomization.yaml b/devspaces/instance/overlays/default/kustomization.yaml deleted file mode 100644 index 774a422d..00000000 --- a/devspaces/instance/overlays/default/kustomization.yaml +++ /dev/null @@ -1,5 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization - -resources: - - ../../base diff --git a/devspaces/instance/overlays/timeout-12m/kustomization.yaml b/devspaces/instance/overlays/timeout-12m/kustomization.yaml deleted file mode 100644 index 134e8cb0..00000000 --- a/devspaces/instance/overlays/timeout-12m/kustomization.yaml +++ /dev/null @@ -1,24 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization - -namespace: devspaces - -resources: - - ../../base - -patches: - - target: - group: org.eclipse.che - kind: CheCluster - name: devspaces - patch: |- - - op: replace - path: /spec/components/dashboard/headerMessage/show - value: true - - op: replace - path: /spec/components/dashboard/headerMessage/text - value: | - Please be patient... GPUs may take up to 12 min to be available! - - op: replace - path: /spec/devEnvironments/startTimeoutSeconds - value: 720 diff --git a/devspaces/operator/base/kustomization.yaml b/devspaces/operator/base/kustomization.yaml deleted file mode 100644 index 00078e0a..00000000 --- a/devspaces/operator/base/kustomization.yaml +++ /dev/null @@ -1,5 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization - -resources: - - subscription.yaml diff --git a/devspaces/operator/base/subscription.yaml b/devspaces/operator/base/subscription.yaml deleted file mode 100644 index df917cb0..00000000 --- a/devspaces/operator/base/subscription.yaml +++ /dev/null @@ -1,11 +0,0 @@ -apiVersion: operators.coreos.com/v1alpha1 -kind: Subscription -metadata: - name: devspaces - namespace: openshift-operators -spec: - channel: patch-me-see-overlays-dir - installPlanApproval: Automatic - name: devspaces - source: redhat-operators - sourceNamespace: openshift-marketplace diff --git a/devspaces/operator/overlays/stable/kustomization.yaml b/devspaces/operator/overlays/stable/kustomization.yaml deleted file mode 100644 index ed4044a7..00000000 --- a/devspaces/operator/overlays/stable/kustomization.yaml +++ /dev/null @@ -1,11 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization - -resources: - - ../../base - -patches: - - target: - kind: Subscription - name: devspaces - path: patch-channel.yaml diff --git a/devspaces/operator/overlays/stable/patch-channel.yaml b/devspaces/operator/overlays/stable/patch-channel.yaml deleted file mode 100644 index 6642eb17..00000000 --- a/devspaces/operator/overlays/stable/patch-channel.yaml +++ /dev/null @@ -1,3 +0,0 @@ -- op: replace - path: /spec/channel - value: stable diff --git a/devspaces/INFO.md b/openshift-dev-spaces/INFO.md similarity index 100% rename from devspaces/INFO.md rename to openshift-dev-spaces/INFO.md diff --git a/devspaces/README.md b/openshift-dev-spaces/README.md similarity index 72% rename from devspaces/README.md rename to openshift-dev-spaces/README.md index 195c410a..d60af1f8 100644 --- a/devspaces/README.md +++ b/openshift-dev-spaces/README.md @@ -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/ +oc apply -k openshift-dev-spaces/operator/overlays/ ``` Or, without cloning: ``` -oc apply -k https://github.com/redhat-cop/gitops-catalog/devspaces/operator/overlays/ +oc apply -k https://github.com/redhat-cop/gitops-catalog/openshift-dev-spaces/operator/overlays/ ``` As part of a different overlay in your own GitOps repo: @@ -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/?ref=main + - https://github.com/redhat-cop/gitops-catalog/openshift-dev-spaces/operator/overlays/?ref=main ``` diff --git a/devspaces/aggregate/overlays/default/kustomization.yaml b/openshift-dev-spaces/aggregate/overlays/allow-autoscaling/kustomization.yaml similarity index 80% rename from devspaces/aggregate/overlays/default/kustomization.yaml rename to openshift-dev-spaces/aggregate/overlays/allow-autoscaling/kustomization.yaml index 1fabfb08..62661d96 100644 --- a/devspaces/aggregate/overlays/default/kustomization.yaml +++ b/openshift-dev-spaces/aggregate/overlays/allow-autoscaling/kustomization.yaml @@ -5,5 +5,5 @@ commonAnnotations: argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true resources: - - ../../../instance/overlays/timeout-12m - ../../../operator/overlays/stable + - ../../../instance/overlays/allow-autoscaling diff --git a/openshift-dev-spaces/instance/base/checluster.yaml b/openshift-dev-spaces/instance/base/checluster.yaml index 64204f3f..e7448d84 100644 --- a/openshift-dev-spaces/instance/base/checluster.yaml +++ b/openshift-dev-spaces/instance/base/checluster.yaml @@ -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: -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: -devspaces + secondsOfInactivityBeforeIdling: 1800 + storage: + pvcStrategy: per-user + gitServices: {} + networking: + auth: + gateway: + kubeRbacProxy: + logLevel: 0 + oAuthProxy: + cookieExpireSeconds: 86400 + traefik: + logLevel: INFO diff --git a/openshift-dev-spaces/instance/base/kustomization.yaml b/openshift-dev-spaces/instance/base/kustomization.yaml index 9a28f865..ad66382b 100644 --- a/openshift-dev-spaces/instance/base/kustomization.yaml +++ b/openshift-dev-spaces/instance/base/kustomization.yaml @@ -6,3 +6,4 @@ namespace: openshift-devspaces resources: - checluster.yaml - namespace.yaml + - network-policy.yaml diff --git a/devspaces/instance/base/network-policy.yaml b/openshift-dev-spaces/instance/base/network-policy.yaml similarity index 100% rename from devspaces/instance/base/network-policy.yaml rename to openshift-dev-spaces/instance/base/network-policy.yaml diff --git a/openshift-dev-spaces/instance/components/allow-autoscaling/README.md b/openshift-dev-spaces/instance/components/allow-autoscaling/README.md new file mode 100644 index 00000000..9628a607 --- /dev/null +++ b/openshift-dev-spaces/instance/components/allow-autoscaling/README.md @@ -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 +``` \ No newline at end of file diff --git a/devspaces/instance/base/devworkspace-config.yaml b/openshift-dev-spaces/instance/components/allow-autoscaling/devworkspace-config.yaml similarity index 100% rename from devspaces/instance/base/devworkspace-config.yaml rename to openshift-dev-spaces/instance/components/allow-autoscaling/devworkspace-config.yaml diff --git a/openshift-dev-spaces/instance/components/allow-autoscaling/kustomization.yaml b/openshift-dev-spaces/instance/components/allow-autoscaling/kustomization.yaml new file mode 100644 index 00000000..6a1a7310 --- /dev/null +++ b/openshift-dev-spaces/instance/components/allow-autoscaling/kustomization.yaml @@ -0,0 +1,10 @@ +apiVersion: kustomize.config.k8s.io/v1alpha1 +kind: Component + +resources: + - devworkspace-config.yaml + +patches: + - path: patch-checluster.yaml + target: + kind: CheCluster diff --git a/openshift-dev-spaces/instance/components/allow-autoscaling/patch-checluster.yaml b/openshift-dev-spaces/instance/components/allow-autoscaling/patch-checluster.yaml new file mode 100644 index 00000000..90f979bd --- /dev/null +++ b/openshift-dev-spaces/instance/components/allow-autoscaling/patch-checluster.yaml @@ -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 diff --git a/openshift-dev-spaces/instance/components/low-idle/README.md b/openshift-dev-spaces/instance/components/low-idle/README.md new file mode 100644 index 00000000..c74bff87 --- /dev/null +++ b/openshift-dev-spaces/instance/components/low-idle/README.md @@ -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 +``` \ No newline at end of file diff --git a/devspaces/aggregate/overlays/low-idle/kustomization.yaml b/openshift-dev-spaces/instance/components/low-idle/kustomization.yaml similarity index 57% rename from devspaces/aggregate/overlays/low-idle/kustomization.yaml rename to openshift-dev-spaces/instance/components/low-idle/kustomization.yaml index 0076e3aa..6c75afeb 100644 --- a/devspaces/aggregate/overlays/low-idle/kustomization.yaml +++ b/openshift-dev-spaces/instance/components/low-idle/kustomization.yaml @@ -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: diff --git a/openshift-dev-spaces/instance/overlays/allow-autoscaling/kustomization.yaml b/openshift-dev-spaces/instance/overlays/allow-autoscaling/kustomization.yaml new file mode 100644 index 00000000..2c80bec4 --- /dev/null +++ b/openshift-dev-spaces/instance/overlays/allow-autoscaling/kustomization.yaml @@ -0,0 +1,11 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +namespace: openshift-devspaces + +resources: + - ../../base + +components: + - ../../components/allow-autoscaling + - ../../components/low-idle