From d1c8c2f4a6c4a2fb98d900107ae50555e9a1821e Mon Sep 17 00:00:00 2001 From: Johannes Faltermeier Date: Fri, 24 Jan 2025 14:06:55 +0100 Subject: [PATCH] Adress Review Comments --- .github/workflows/e2e-tests.yml | 11 +++++------ node/e2e-tests/src/{constats.ts => constants.ts} | 0 node/e2e-tests/src/k8s.ts | 9 ++++++++- node/e2e-tests/src/tests/start.test.ts | 2 +- terraform/ci-configurations/e2e_tests.tf | 10 +++++----- terraform/ci-configurations/run-locally.md | 4 +++- 6 files changed, 22 insertions(+), 14 deletions(-) rename node/e2e-tests/src/{constats.ts => constants.ts} (100%) diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml index b06d0719..7102783f 100644 --- a/.github/workflows/e2e-tests.yml +++ b/.github/workflows/e2e-tests.yml @@ -53,7 +53,7 @@ jobs: path: "./theia-cloud-helm" - name: Setup Minikube - uses: manusa/actions-setup-minikube@92af4db914ab207f837251cd53eb7060e6477614 + uses: manusa/actions-setup-minikube@92af4db914ab207f837251cd53eb7060e6477614 # v2.11.0 with: minikube version: v1.33.1 kubernetes version: ${{ matrix.kubernetes }} @@ -62,7 +62,6 @@ jobs: - name: Enable Minikube Addons run: | - minikube addons enable dashboard minikube addons enable default-storageclass minikube addons enable ingress minikube addons enable metrics-server @@ -118,10 +117,10 @@ jobs: - name: Wait for Deployments to be Ready run: | kubectl wait --namespace ingress-nginx --for=condition=available deployment/ingress-nginx-controller --timeout=300s - kubectl wait --namespace theiacloud --for=condition=available deployment/conversion-webhook --timeout=300s - kubectl wait --namespace theiacloud --for=condition=available deployment/landing-page-deployment --timeout=300s - kubectl wait --namespace theiacloud --for=condition=available deployment/operator-deployment --timeout=300s - kubectl wait --namespace theiacloud --for=condition=available deployment/service-deployment --timeout=300s + kubectl wait --namespace theia-cloud --for=condition=available deployment/conversion-webhook --timeout=300s + kubectl wait --namespace theia-cloud --for=condition=available deployment/landing-page-deployment --timeout=300s + kubectl wait --namespace theia-cloud --for=condition=available deployment/operator-deployment --timeout=300s + kubectl wait --namespace theia-cloud --for=condition=available deployment/service-deployment --timeout=300s # URLs # service: servicex diff --git a/node/e2e-tests/src/constats.ts b/node/e2e-tests/src/constants.ts similarity index 100% rename from node/e2e-tests/src/constats.ts rename to node/e2e-tests/src/constants.ts diff --git a/node/e2e-tests/src/k8s.ts b/node/e2e-tests/src/k8s.ts index 20120eee..43723604 100644 --- a/node/e2e-tests/src/k8s.ts +++ b/node/e2e-tests/src/k8s.ts @@ -1,6 +1,13 @@ import { CustomObjectsApi, KubeConfig } from '@kubernetes/client-node'; -import { namespace, resourceGroup, sessionPlural, sessionVersion, workspacePlural, workspaceVersion } from './constats'; +import { + namespace, + resourceGroup, + sessionPlural, + sessionVersion, + workspacePlural, + workspaceVersion +} from './constants'; const kc = new KubeConfig(); kc.loadFromDefault(); diff --git a/node/e2e-tests/src/tests/start.test.ts b/node/e2e-tests/src/tests/start.test.ts index cc65c009..6f9a6e0d 100644 --- a/node/e2e-tests/src/tests/start.test.ts +++ b/node/e2e-tests/src/tests/start.test.ts @@ -1,6 +1,6 @@ import { expect, test } from '@playwright/test'; -import { namespace, resourceGroup, sessionPlural, sessionVersion } from '../constats'; +import { namespace, resourceGroup, sessionPlural, sessionVersion } from '../constants'; import { deleteAllSessions, deleteAllWorkspaces, k8sApi } from '../k8s'; test.describe('Start Session', () => { diff --git a/terraform/ci-configurations/e2e_tests.tf b/terraform/ci-configurations/e2e_tests.tf index 58c2cad4..73b49800 100644 --- a/terraform/ci-configurations/e2e_tests.tf +++ b/terraform/ci-configurations/e2e_tests.tf @@ -97,7 +97,7 @@ resource "helm_release" "theia-cloud-crds" { name = "theia-cloud-crds" chart = "../../../theia-cloud-helm/charts/theia-cloud-crds" - namespace = "theiacloud" + namespace = "theia-cloud" create_namespace = true set { @@ -111,7 +111,7 @@ resource "helm_release" "theia-cloud-base" { name = "theia-cloud-base" chart = "../../../theia-cloud-helm/charts/theia-cloud-base" - namespace = "theiacloud" + namespace = "theia-cloud" create_namespace = true set { @@ -125,7 +125,7 @@ resource "helm_release" "theia-cloud" { name = "theia-cloud" chart = "../../../theia-cloud-helm/charts/theia-cloud" - namespace = "theiacloud" + namespace = "theia-cloud" create_namespace = true values = [ @@ -165,7 +165,7 @@ resource "kubectl_manifest" "theia-cloud-monitor-theia" { kind: AppDefinition metadata: name: theia-cloud-monitor-theia - namespace: theiacloud + namespace: theia-cloud spec: name: theia-cloud-monitor-theia image: theiacloud/theia-cloud-activity-demo-theia:minikube-ci-e2e @@ -199,7 +199,7 @@ resource "kubectl_manifest" "theia-cloud-monitor-vscode" { kind: AppDefinition metadata: name: theia-cloud-monitor-vscode - namespace: theiacloud + namespace: theia-cloud spec: name: theia-cloud-monitor-vscode image: theiacloud/theia-cloud-activity-demo:minikube-ci-e2e diff --git a/terraform/ci-configurations/run-locally.md b/terraform/ci-configurations/run-locally.md index 776ac78d..adaf6b5f 100644 --- a/terraform/ci-configurations/run-locally.md +++ b/terraform/ci-configurations/run-locally.md @@ -16,7 +16,9 @@ kubectl -n ingress-nginx patch cm ingress-nginx-controller --patch '{"data":{"al kubectl -n ingress-nginx delete pod -l app.kubernetes.io/name=ingress-nginx ``` -Adapt your environment so that all docker images are built in minikube. Build all Theia Cloud docker images + Demos with tag `minikube-ci-e2e`, e.g. `theiacloud/theia-cloud-service:minikube-ci-e2e`. +Adapt your environment so that all docker images are built in minikube. +Build all Theia Cloud docker images + Demos with tag `minikube-ci-e2e`, e.g. `theiacloud/theia-cloud-service:minikube-ci-e2e`. +The build commands need to be executed from the root of the repository. ```sh eval $(minikube docker-env)