Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CheCluster CR should not be created in openshift-operators namespace #21399

Closed
Tracked by #21395 ...
l0rd opened this issue May 13, 2022 · 8 comments
Closed
Tracked by #21395 ...

CheCluster CR should not be created in openshift-operators namespace #21399

l0rd opened this issue May 13, 2022 · 8 comments
Labels
area/che-operator Issues and PRs related to Eclipse Che Kubernetes Operator area/chectl Issues related to chectl, the CLI of Che kind/enhancement A feature request - must adhere to the feature request template. severity/P1 Has a major impact to usage or development of the system.

Comments

@l0rd
Copy link
Contributor

l0rd commented May 13, 2022

Is your enhancement related to a problem? Please describe

Che operands are deployed in openshift-operators namespace. That namespace, as it's name suggests, is dedicated to operators and not to operands. We should not deploy postgres, database, registries, server, dashboard etc...there.

Describe the solution you'd like

CheCluster CR should be created in eclipse-che namespace as soon as the operator is deployed.

That also means that an admin doesn't have to manually create a CheCluster after Che operator subcription: it's automatically created (1 step installation instead of 2 steps installation).

Additional information

OpenShift GitOps operator does that: it creates the openshift-gitops namespace if it doesn't exist and
Red Hat product OpenShift Dev Spaces default CheCluster namespace should be openshift-devspaces.

@l0rd l0rd added kind/enhancement A feature request - must adhere to the feature request template. severity/P1 Has a major impact to usage or development of the system. area/chectl Issues related to chectl, the CLI of Che area/che-operator Issues and PRs related to Eclipse Che Kubernetes Operator labels May 13, 2022
@l0rd l0rd changed the title CheCluster should not be created in openshift-operators namespace CheCluster CR should not be created in openshift-operators namespace May 13, 2022
@tolusha tolusha mentioned this issue May 13, 2022
49 tasks
@ibuziuk
Copy link
Member

ibuziuk commented May 13, 2022

Red Hat product OpenShift Dev Spaces default CheCluster namespace should be openshift-devspaces

probably we should reconsider the openshift- prefix since it will be impossible to use such namespaces on OSD - (^kube-.|^openshift.|^default$|^redhat-.*)"

@l0rd
Copy link
Contributor Author

l0rd commented May 13, 2022

Red Hat product OpenShift Dev Spaces default CheCluster namespace should be openshift-devspaces

probably we should reconsider the openshift- prefix since it will be impossible to use such namespaces on OSD - (^kube-.|^openshift.|^default$|^redhat-.*)"

Yes, I would do what other openshift prefixed products do with their operands (pipelines, service mesh, serverless, gitops, sbo etc...)

@l0rd
Copy link
Contributor Author

l0rd commented May 18, 2022

A couple of comments:

  1. By default chectl creates the CheCluster CR in eclipse-che, not openshift-operators (dsc should NOT deploy to openshift-operators).

  2. OpenShift Pipelines operator automatically creates an ArgoCD Custom Resource in openshift-gitops namespace. So 1) the default is an openshift- prefixed namespace 2) the CR is automatically created in one step (whereas Che requires admins to do that in 2 steps). This should be the example to follow.

cc @dmytro-ndp @nickboldt @Kasturi1820 @RickJWagner

@l0rd
Copy link
Contributor Author

l0rd commented May 23, 2022

We have checked with @ibuziuk and, when deployed on OSD, OpenShift GitOps creates a openshift- prefixed namespace. So that's what Che/DevSpaces should do too.

@l0rd
Copy link
Contributor Author

l0rd commented May 23, 2022

Downstream issue

@tolusha tolusha mentioned this issue Jun 3, 2022
64 tasks
@tolusha
Copy link
Contributor

tolusha commented Jun 8, 2022

@l0rd
I have some concerns about CheCluster creation by the operator. I do believe it will lead having 2 CR (the first one created by the operator, another one - created by user via OpenShift UI)

So, I'm thinking of a slightly different approach. Let's keep the current behavior but, If user creates CheCluster CR in openshift-operators namespace, then operator moves it to a right place (creates namespace if needed).

WDYT ?

@l0rd
Copy link
Contributor Author

l0rd commented Jun 8, 2022

This is a good point @tolusha.

I would not move a CR created by a user. It would be hard to follow what's going on.

This is how it works for OpenShift Gitops:

  1. Click install in OperatorHub

image

2. Select the "Channel" and the "Update approval"

image

3. A completion message appears

image

4. An ArgoCD instance has been created automatically in namespace `openshift-gitops`

image

5. Users can still click on "View Operator" and create a new "ArgoCD" instance
image image

For me that's easier than what we currently have. But I will review it with @RickJWagner and @Kasturi1820 .

Two ways to make it even better are:

  1. Print Che URL in the completion message at step 3
  2. Provide an error message if a user tries to create a second CheCluster in the OpenShift cluster similar to this one:

image

@l0rd
Copy link
Contributor Author

l0rd commented Jun 9, 2022

After discussions I think that there is value in having a 2 steps installations. Keeping things like we currently have allow to split tasks:

  • OpenShift admin creates the subscription
  • Che admin create the CRD

And it doesn't seem like an issue that some "distracted users" would not change the namespace and create the CR in openshift-operators: this is unlikely in real-world production clusters.

Closing this issue.

@l0rd l0rd closed this as completed Jun 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/che-operator Issues and PRs related to Eclipse Che Kubernetes Operator area/chectl Issues related to chectl, the CLI of Che kind/enhancement A feature request - must adhere to the feature request template. severity/P1 Has a major impact to usage or development of the system.
Projects
None yet
Development

No branches or pull requests

3 participants