From 31b112fcaaac6df39e80304c0032dfd1c6ea7a77 Mon Sep 17 00:00:00 2001 From: Anatolii Bazko Date: Wed, 7 Aug 2024 16:41:25 +0200 Subject: [PATCH] chore: Get rid of registry deployment component (#2909) * chore: Get rid of registry deployment component Signed-off-by: Anatolii Bazko --- README.md | 3 --- src/api/types/che-cluster.ts | 5 ----- src/tasks/che-tasks.ts | 18 ------------------ src/tasks/common-tasks.ts | 4 ---- .../installers/eclipse-che/eclipse-che.ts | 3 --- .../resources/minikube-checluster-patch.yaml | 8 -------- test/e2e/util.ts | 3 --- yarn.lock | 4 ++-- 8 files changed, 2 insertions(+), 46 deletions(-) diff --git a/README.md b/README.md index 992e96feb..8ea8d23d2 100644 --- a/README.md +++ b/README.md @@ -86,9 +86,6 @@ running command... $ chectl server:stop running command... -$ chectl workspace:start --devfile -running command... - $ chectl --help [COMMAND] USAGE $ chectl COMMAND diff --git a/src/api/types/che-cluster.ts b/src/api/types/che-cluster.ts index 5a43cd0c0..f2fbffce6 100644 --- a/src/api/types/che-cluster.ts +++ b/src/api/types/che-cluster.ts @@ -55,11 +55,6 @@ interface CheClusterPluginRegistryComponent { openVSXURL?: string } -interface CheClusterDevfileRegistryComponent { - disableInternalRegistry?: boolean -} - export interface CheClusterComponents { pluginRegistry?: CheClusterPluginRegistryComponent - devfileRegistry?: CheClusterDevfileRegistryComponent } diff --git a/src/tasks/che-tasks.ts b/src/tasks/che-tasks.ts index b29e5d5a4..21a348f34 100644 --- a/src/tasks/che-tasks.ts +++ b/src/tasks/che-tasks.ts @@ -35,10 +35,6 @@ export namespace CheTasks { const cheCluster = await kubeHelper.getCheCluster(flags[CHE_NAMESPACE_FLAG]) if (cheCluster) { - if (!cheCluster.spec?.components?.devfileRegistry?.disableInternalRegistry) { - tasks.add(PodTasks.getPodStartTasks(EclipseChe.DEVFILE_REGISTRY, EclipseChe.DEVFILE_REGISTRY_SELECTOR, flags[CHE_NAMESPACE_FLAG])) - } - if (!cheCluster.spec?.components?.pluginRegistry?.disableInternalRegistry) { tasks.add(PodTasks.getPodStartTasks(EclipseChe.PLUGIN_REGISTRY, EclipseChe.PLUGIN_REGISTRY_SELECTOR, flags[CHE_NAMESPACE_FLAG])) } @@ -67,10 +63,6 @@ export namespace CheTasks { tasks.add(PodTasks.getPodDeletedTask(EclipseChe.DASHBOARD, EclipseChe.DASHBOARD_SELECTOR, flags[CHE_NAMESPACE_FLAG])) tasks.add(PodTasks.getPodDeletedTask(EclipseChe.CHE_SERVER, EclipseChe.CHE_SERVER_SELECTOR, flags[CHE_NAMESPACE_FLAG])) - if (!cheCluster?.spec?.components?.devfileRegistry?.disableInternalRegistry) { - tasks.add(PodTasks.getPodDeletedTask(EclipseChe.DEVFILE_REGISTRY, EclipseChe.DEVFILE_REGISTRY_SELECTOR, flags[CHE_NAMESPACE_FLAG])) - } - if (!cheCluster?.spec?.components?.pluginRegistry?.disableInternalRegistry) { tasks.add(PodTasks.getPodDeletedTask(EclipseChe.PLUGIN_REGISTRY, EclipseChe.PLUGIN_REGISTRY_SELECTOR, flags[CHE_NAMESPACE_FLAG])) } @@ -96,10 +88,6 @@ export namespace CheTasks { tasks.add(PodTasks.getScaleDeploymentTask(EclipseChe.PLUGIN_REGISTRY, EclipseChe.PLUGIN_REGISTRY_DEPLOYMENT_NAME, 0, flags[CHE_NAMESPACE_FLAG])) } - if (!cheCluster?.spec?.components?.devfileRegistry?.disableInternalRegistry) { - tasks.add(PodTasks.getScaleDeploymentTask(EclipseChe.DEVFILE_REGISTRY, EclipseChe.DEVFILE_REGISTRY_DEPLOYMENT_NAME, 0, flags[CHE_NAMESPACE_FLAG])) - } - return tasks }, } @@ -115,11 +103,6 @@ export namespace CheTasks { const tasks = newListr() if (cheCluster) { - if (!cheCluster.spec?.components?.devfileRegistry?.disableInternalRegistry) { - tasks.add(PodTasks.getScaleDeploymentTask(EclipseChe.DEVFILE_REGISTRY, EclipseChe.DEVFILE_REGISTRY_DEPLOYMENT_NAME, 1, flags[CHE_NAMESPACE_FLAG])) - tasks.add(PodTasks.getPodStartTasks(EclipseChe.DEVFILE_REGISTRY, EclipseChe.DEVFILE_REGISTRY_SELECTOR, flags[CHE_NAMESPACE_FLAG])) - } - if (!cheCluster.spec?.components?.pluginRegistry?.disableInternalRegistry) { tasks.add(PodTasks.getScaleDeploymentTask(EclipseChe.PLUGIN_REGISTRY, EclipseChe.PLUGIN_REGISTRY_DEPLOYMENT_NAME, 1, flags[CHE_NAMESPACE_FLAG])) tasks.add(PodTasks.getPodStartTasks(EclipseChe.PLUGIN_REGISTRY, EclipseChe.PLUGIN_REGISTRY_SELECTOR, flags[CHE_NAMESPACE_FLAG])) @@ -172,7 +155,6 @@ export namespace CheTasks { await Che.readPodLog(ctx[EclipseCheContext.OPERATOR_NAMESPACE], EclipseChe.CHE_OPERATOR_SELECTOR, ctx[CliContext.CLI_COMMAND_LOGS_DIR], follow) await Che.readPodLog(flags[CHE_NAMESPACE_FLAG], EclipseChe.CHE_SERVER_SELECTOR, ctx[CliContext.CLI_COMMAND_LOGS_DIR], follow) await Che.readPodLog(flags[CHE_NAMESPACE_FLAG], EclipseChe.PLUGIN_REGISTRY_SELECTOR, ctx[CliContext.CLI_COMMAND_LOGS_DIR], follow) - await Che.readPodLog(flags[CHE_NAMESPACE_FLAG], EclipseChe.DEVFILE_REGISTRY_SELECTOR, ctx[CliContext.CLI_COMMAND_LOGS_DIR], follow) await Che.readPodLog(flags[CHE_NAMESPACE_FLAG], EclipseChe.DASHBOARD_SELECTOR, ctx[CliContext.CLI_COMMAND_LOGS_DIR], follow) await Che.readPodLog(flags[CHE_NAMESPACE_FLAG], EclipseChe.GATEWAY_SELECTOR, ctx[CliContext.CLI_COMMAND_LOGS_DIR], follow) await Che.readNamespaceEvents(flags[CHE_NAMESPACE_FLAG], ctx[CliContext.CLI_COMMAND_LOGS_DIR], follow) diff --git a/src/tasks/common-tasks.ts b/src/tasks/common-tasks.ts index 81e295a56..1ac985bad 100644 --- a/src/tasks/common-tasks.ts +++ b/src/tasks/common-tasks.ts @@ -229,10 +229,6 @@ export namespace CommonTasks { messages.push(`Plug-in Registry : ${addTrailingSlash(cheConfigMap.data.CHE_WORKSPACE_PLUGIN__REGISTRY__URL)}`) } - if (cheConfigMap.data.CHE_WORKSPACE_DEVFILE__REGISTRY__URL) { - messages.push(`Devfile Registry : ${addTrailingSlash(cheConfigMap.data.CHE_WORKSPACE_DEVFILE__REGISTRY__URL)}`) - } - messages.push(OUTPUT_SEPARATOR) if (flags[PLATFORM_FLAG] === 'minikube') { diff --git a/src/tasks/installers/eclipse-che/eclipse-che.ts b/src/tasks/installers/eclipse-che/eclipse-che.ts index f459a17a2..299f6fb1f 100644 --- a/src/tasks/installers/eclipse-che/eclipse-che.ts +++ b/src/tasks/installers/eclipse-che/eclipse-che.ts @@ -66,7 +66,6 @@ export namespace EclipseChe { export const CHE_SERVER = `${PRODUCT_NAME} Server` export const DASHBOARD = 'Dashboard' export const GATEWAY = 'Gateway' - export const DEVFILE_REGISTRY = 'Devfile Registry' export const PLUGIN_REGISTRY = 'Plugin Registry' export const CHE_OPERATOR = `${PRODUCT_NAME} Operator` @@ -75,7 +74,6 @@ export namespace EclipseChe { export const CHE_SERVER_DEPLOYMENT_NAME = `${CHE_FLAVOR}` export const DASHBOARD_DEPLOYMENT_NAME = `${CHE_FLAVOR}-dashboard` export const GATEWAY_DEPLOYMENT_NAME = 'che-gateway' - export const DEVFILE_REGISTRY_DEPLOYMENT_NAME = 'devfile-registry' export const PLUGIN_REGISTRY_DEPLOYMENT_NAME = 'plugin-registry' // Selectors @@ -84,7 +82,6 @@ export namespace EclipseChe { export const CHE_SERVER_SELECTOR = `app.kubernetes.io/name=${CHE_FLAVOR},app.kubernetes.io/component=${CHE_FLAVOR}` export const DASHBOARD_SELECTOR = `app.kubernetes.io/name=${CHE_FLAVOR},app.kubernetes.io/component=${CHE_FLAVOR}-dashboard` - export const DEVFILE_REGISTRY_SELECTOR = `app.kubernetes.io/name=${CHE_FLAVOR},app.kubernetes.io/component=devfile-registry` export const PLUGIN_REGISTRY_SELECTOR = `app.kubernetes.io/name=${CHE_FLAVOR},app.kubernetes.io/component=plugin-registry` export const GATEWAY_SELECTOR = `app.kubernetes.io/name=${CHE_FLAVOR},app.kubernetes.io/component=che-gateway` } diff --git a/test/e2e/resources/minikube-checluster-patch.yaml b/test/e2e/resources/minikube-checluster-patch.yaml index 99a48edee..e92961d72 100644 --- a/test/e2e/resources/minikube-checluster-patch.yaml +++ b/test/e2e/resources/minikube-checluster-patch.yaml @@ -21,14 +21,6 @@ spec: cpu: '50m' limits: cpu: '50m' - devfileRegistry: - deployment: - containers: - - resources: - request: - cpu: '50m' - limits: - cpu: '50m' cheServer: deployment: containers: diff --git a/test/e2e/util.ts b/test/e2e/util.ts index 91c564275..d4b3f85f6 100644 --- a/test/e2e/util.ts +++ b/test/e2e/util.ts @@ -25,12 +25,9 @@ export const OWNER = 'che-incubator' export class E2eHelper { private readonly octokit: Octokit protected kubeHelper: KubeClient - protected devfileName: string constructor() { this.kubeHelper = KubeClient.getInstance() - // generate-name from https://raw.githubusercontent.com/eclipse/che-devfile-registry/master/devfiles/quarkus/devfile.yaml - this.devfileName = 'quarkus-' this.octokit = new Octokit({ baseUrl: 'https://api.github.com', userAgent: 'chectl', diff --git a/yarn.lock b/yarn.lock index 7ad728e1e..4c063794b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3683,7 +3683,7 @@ detect-newline@^3.0.0: "devworkspace-operator@https://github.com/devfile/devworkspace-operator#main": version "0.0.0" - resolved "https://github.com/devfile/devworkspace-operator#b49427cecf4ba036a7587be4e7319b4dfec42dcf" + resolved "https://github.com/devfile/devworkspace-operator#e176ec0a85ddff8752a58b9b8a4d48072964dd64" dezalgo@^1.0.0: version "1.0.4" @@ -3744,7 +3744,7 @@ ecc-jsbn@~0.1.1: "eclipse-che-operator@https://github.com/eclipse-che/che-operator#main": version "0.0.0" - resolved "https://github.com/eclipse-che/che-operator#9954335646e7043632cdb992f6c155888f0cee2c" + resolved "https://github.com/eclipse-che/che-operator#26833104ec96fed459c2777f357bc919a9f0d4a1" editorconfig@^0.15.0: version "0.15.3"