Skip to content

Commit

Permalink
chore: Get rid of registry deployment component (#2909)
Browse files Browse the repository at this point in the history
* chore: Get rid of registry deployment component

Signed-off-by: Anatolii Bazko <[email protected]>
  • Loading branch information
tolusha committed Aug 7, 2024
1 parent ccd0e70 commit 31b112f
Show file tree
Hide file tree
Showing 8 changed files with 2 additions and 46 deletions.
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,6 @@ running command...
$ chectl server:stop
running command...

$ chectl workspace:start --devfile
running command...

$ chectl --help [COMMAND]
USAGE
$ chectl COMMAND
Expand Down
5 changes: 0 additions & 5 deletions src/api/types/che-cluster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,6 @@ interface CheClusterPluginRegistryComponent {
openVSXURL?: string
}

interface CheClusterDevfileRegistryComponent {
disableInternalRegistry?: boolean
}

export interface CheClusterComponents {
pluginRegistry?: CheClusterPluginRegistryComponent
devfileRegistry?: CheClusterDevfileRegistryComponent
}
18 changes: 0 additions & 18 deletions src/tasks/che-tasks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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]))
}
Expand Down Expand Up @@ -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]))
}
Expand All @@ -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
},
}
Expand All @@ -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]))
Expand Down Expand Up @@ -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)
Expand Down
4 changes: 0 additions & 4 deletions src/tasks/common-tasks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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') {
Expand Down
3 changes: 0 additions & 3 deletions src/tasks/installers/eclipse-che/eclipse-che.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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`

Expand All @@ -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
Expand All @@ -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`
}
8 changes: 0 additions & 8 deletions test/e2e/resources/minikube-checluster-patch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,6 @@ spec:
cpu: '50m'
limits:
cpu: '50m'
devfileRegistry:
deployment:
containers:
- resources:
request:
cpu: '50m'
limits:
cpu: '50m'
cheServer:
deployment:
containers:
Expand Down
3 changes: 0 additions & 3 deletions test/e2e/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
4 changes: 2 additions & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit 31b112f

Please sign in to comment.