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

Support CustomResourceDefinition for Kubernetes component in Devfiles #14843

Closed
apupier opened this issue Oct 10, 2019 · 10 comments
Closed

Support CustomResourceDefinition for Kubernetes component in Devfiles #14843

apupier opened this issue Oct 10, 2019 · 10 comments
Labels
kind/enhancement A feature request - must adhere to the feature request template. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. severity/P1 Has a major impact to usage or development of the system.

Comments

@apupier
Copy link
Contributor

apupier commented Oct 10, 2019

Is your enhancement related to a problem? Please describe.

I would like to provide a Camel K instance in the workspace through the devfile. Unfortunately, it requires CustomResourceDefinition which is not supported.

If for instance you add this component in the devfile:

 - type: kubernetes
    alias: camel-k
    reference: >-
      https://raw.githubusercontent.com/apache/camel-k/master/deploy/crd-integration-platform.yaml

there is this error:
Error: Failed to start the workspace: "Found unknown object type in recipe -- name: 'integrationplatforms.camel.apache.org', kind: 'CustomResourceDefinition'

Based on this code, the CustomResourceDefinition is not handled:

https://github.com/eclipse/che/blob/1907b041c137dd45f8b9ae20a4a4ba3231438054/infrastructures/kubernetes/src/main/java/org/eclipse/che/workspace/infrastructure/kubernetes/environment/KubernetesEnvironmentFactory.java#L107-L127

Describe the solution you'd like

Be able to reference CustomResourceDefinition yaml file and have it deployed.

Describe alternatives you've considered

alternative is to ask user to deploy by hand.

Additional context

required to go to last iteration of Camel K stack in Che #14831

@apupier apupier added the kind/enhancement A feature request - must adhere to the feature request template. label Oct 10, 2019
@che-bot che-bot added the status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. label Oct 10, 2019
@tsmaeder tsmaeder added severity/P1 Has a major impact to usage or development of the system. team/platform and removed status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. labels Oct 10, 2019
@tsmaeder
Copy link
Contributor

Not sure about the prio, but handling crd's sounds important.

@skabashnyuk skabashnyuk added this to the Backlog - Platform milestone Oct 29, 2019
@sleshchenko
Copy link
Member

I'm not sure but I assume that only cluster admin is able to register CRD on the cluster, if it's true - then we are not able to allow CRD in Devfile (CR yes, but not CRDs) since typically Che User may have admin rights for some k8s namespaces but not cluster-admin rights.

@davidfestal Could you share your knowledge in this area, can we somehow create CRD with namespace admin rights (not cluster rights)?

@davidfestal
Copy link
Contributor

I think we should precise the real use-case for this need.
A CRD is a clusterwide resource as @sleshchenko said. And typically it would be installed either with cluster admin rights, or through OLM that would install it from the CSV + OLM package.

I don't think it is expected to be installed by a runtime component such as a workspace.

@apupier Can you precise a bit your use-case ?

@davidfestal
Copy link
Contributor

OTOH if you would like to add a Camel custom resource of kind IntegrationPlatform, that's another story, and could probably be allowed in the Che server. But that would still require that the IntegrationPlatform is known in the cluster. So using such a worspace would make sense only if previously you installed the CamelK operator from the OperatorHub.

@apupier
Copy link
Contributor Author

apupier commented Oct 31, 2019

@apupier Can you precise a bit your use-case ?

my use case:

  • create a workspace from a devfile
  • have a Camel K runtime available from this workspace for development purpose.

I created a brief for the higher level use case: https://docs.google.com/document/d/1EUefd78aJLD8FlQlyvv3cszRzr5AR-ymJ6JfsCOjd1s/edit?usp=sharing

@davidfestal
Copy link
Contributor

So I assume it's more about creating a Custom Resource than creating a Custom Resource Definition.

@apupier
Copy link
Contributor Author

apupier commented Nov 22, 2019

So I assume it's more about creating a Custom Resource than creating a Custom Resource Definition.

I don't think so.
From what I understand, on th setup of Camel K instance, you need to install several Custom Resource Definition.
The custom resource are created when we are deploying a Camel K integration, which means when I'm in my workspace and developing an integration.

In the devfile, what we want is to provide the Camel K instance so that users can deploy a Camel K integration during development inside the workspace.

@davidfestal
Copy link
Contributor

From what I understand, on th setup of Camel K instance, you need to install several Custom Resource Definition.

Could you provide a concrete example ?

@apupier
Copy link
Contributor Author

apupier commented Nov 22, 2019

From what I understand, on th setup of Camel K instance, you need to install several Custom Resource Definition.

Could you provide a concrete example ?

not sure which example you are looking for, but let's try :-)

to install Camel K, you need to call the Kamel cli "kamel install". https://github.com/apache/camel-k#installation
it ends up with several custom resource definitions created:

  • builds
  • camelcatalogs
  • integrationkits
  • integrationplatforms
  • integrations
    Screenshot from 2019-11-22 10-22-01

@che-bot
Copy link
Contributor

che-bot commented May 20, 2020

Issues go stale after 180 days of inactivity. lifecycle/stale issues rot after an additional 7 days of inactivity and eventually close.

Mark the issue as fresh with /remove-lifecycle stale in a new comment.

If this issue is safe to close now please do so.

Moderators: Add lifecycle/frozen label to avoid stale mode.

@che-bot che-bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label May 20, 2020
@che-bot che-bot closed this as completed May 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement A feature request - must adhere to the feature request template. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. severity/P1 Has a major impact to usage or development of the system.
Projects
None yet
Development

No branches or pull requests

6 participants