-
Notifications
You must be signed in to change notification settings - Fork 244
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 Kubernetes Devfile component #4159
Comments
In order for this to work, we first need to add support for Devfile can specify kubernetes component like this: components:
- name: my-mongo
kubernetes:
inlined: >
apiVersion: v1
kind: Pod
metadata:
name: nginx
labels:
name: nginx
spec:
containers:
- name: nginx
image: nginx
ports:
- containerPort: 80 or components:
- name: my-mongo
kubernetes:
inlined: >
apiVersion: mongodb.com/v1
kind: MongoDB
metadata:
name: my-replica-set
namespace: tkral-test
spec:
credentials: my-credentials
members: 3
opsManager:
configMapRef:
name: my-project
type: ReplicaSet
version: 4.4.0-ent
persistent: true
status:
phase: Running
type: ReplicaSet The idea is that the content of a
|
I think we can take a small step first by adding the definition of the resource to the devfile. In the next step, we can ensure that
+1 to the examples. Makes sense. |
I'm actually proposing doing it the other way around. The first step needs to be to ensure that
This issue is about |
My concern on doing that first is that we're just getting started with refactoring and a lot of things are expected to change. I don't intend to wait till refactoring is over but, at the moment, there's almost no clarity on how |
We will first need to address changes in devfile/parser or in parser in odo as there is no support for |
We're waiting on some movement on devfile/api#216 for this to be able to move further. The code for this needs to go into library and not in odo. |
Issues go stale after 90d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle stale |
/lifecycle frozen |
@kadel @dharmit - I'm noticing the recent updates like #4656 to support kubernetes-typed components focus on support operator-backed services. I'm curious if a use case like Tomas's naked Mongo Pod described here: #4159 (comment) On the one-hand, I can see how using an operator would be more powerful for something like a database. But I'm interested in where we're headed with this case. Is the inlined kubernetes component going to allow a devfile author to insert any yaml that will be That is, even if this isn't the most useful way to create a Mongo DB I'm curious if the vision is to allow any yaml to be applied via an inline component? |
@scottkurz I'll try to answer that but will rely on @kadel to validate my response. At a high level, odo is currently not focussing on the users who would modify devfile by hands. That is, if someone's editing it manually and not interacting with it via odo, there's no guarantee that things would work. Having said that, we do understand that for architects or Devfile authors like you, Andy and others, modifying Devfile by hands could be a "norm". What odo does in the code is use the dynamic client to create the Kubernetes inlined component: https://github.com/openshift/odo/blob/c0be940e1df15ca1ebf410de962932b327d9d5a7/pkg/service/service.go#L856-L867 Theoretically, you could very well create a Pod or any other Kubernetes resources of your choice using this. We haven't tested it, however, because such use cases are currently not a priority for odo. @kadel correct me if I am wrong. |
Not really. Odo uses Devfile v2. And as such, it needs to be able to correctly interpret any valid devfile.
If that Devfile has |
OK.. I opened #4685 to follow-up on this use case. Let me just note again I'm not saying this is particularly important to the set of top Open Liberty use cases. I just view it as a test case understanding the full devfile vision. |
Original request in the issue description is implemented. /close |
@dharmit: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/kind feature
service operations should occur on odo push. we need to store the service information in the
Component
as a CR in the devfile.The text was updated successfully, but these errors were encountered: