-
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
odo service create should add operator CR to the devfile #4160
Comments
I'm not sure what purpose does having both What is odo supposed to do with This is a proposal, IIUC. Do we have to implement things based on this proposal? Or do we use Few other questions (more along the lines of "thinking out loud"):
|
I think inline and
well I was hoping for this to be done in this sprint? only the devfile + operator backed service and that too just adding the CR into the devfile and still do that original work so we dont break operator backed services. Essentially
Yeah that is something I was thinking alot about and right now I would say no. Some more thinking on what kind of combination we are looking at
I bet there is a newer service catalog CR someone would have implemented to move the service catalog into an operator but I haven't searched about it. |
Sorry about writing an essay. I have a lot of questions around this and I couldn't find a better way to put it.
OK. And what would be a valid value for URI in this case? What would we like to store as URI? About storing the CRD in devfile. Currently, we don't support passing parameters for Then there's also this notion of keeping the information in devfile compatible with what Che might need.
If we put the CRD (the definition used to bring up the CR, a.k.a. service, provided by an Operator) in the devfile when doing Also, if I understand correctly, you mean to only add the CRD into devfile as Step 1 and not changing the flow to create the service when doing
OK. So what would be our approach to handle it? Separate code (as is the case right now)? Do we want to provide different UX to the users when they spin up a service using Operators vs. Service Catalog? By different approach, I mean that if we store CRD info in devfile, we eventually want to provide the ability to create a component+service in one From k8s point of view, I don't think we will/should be deprecating support for Service Catalog in a rush. OTOH, we could also deprecate it since it's no longer available on OCP and focus solely on Operators. This reduces the scope of bugs in odo code. IMO, we should think this hard because supporting both requires considering a lot of permutations and combinations. This piece is confusing and I'd prefer we think of reaching a conclusion sooner rather than later.
This means storing the CRD in the devfile. It doesn't mean actually spinning up a service when doing
At the moment, this scenario is not supported. I think I need to come up with a matrix about all the possibilities and their support status. Otherwise, this is quickly going to become insane.
We discussed under the hood conversion of s2i components to devfile on the Cabal. So I think this needs a rethink?
I'm not so sure about the CR/Operator for Service Catalog. But I think we can give a try to the steps mentioned here on a minikube setup. But again, I'd prefer we discuss how long we intend to support it. And I am seeking this info only because OCP doesn't support it anymore. |
It would be a public link to a kubernetes manifest and when there is something inline then the uri would be blank.
Agreed but for now lets not add the functionality of passing parameters - first step is simple and that is store the CRD in the devfile then maybe we can think about this
I asked the same question to tomas and he mentioned that the person who added the service operator in the devfile knows that their application wont function correctly without it so the person cloning the application should have the operator present and if not - its a good thing that push fails. We need to provide good error messages here though
Yes as this flow of storing the CRD in the devfile is still a smaller part of the whole puzzle we need to keep the original work intact until the new flow is completely implemented
|
👍 makes sense.
Ah, I didn't mean to stall this till we have parameters support. Totally agree about adding CRD info into devfile as a first step.
OK. So if the push fails for user2, what do we want the state of the component to be? Only the service creation on the cluster fails for them or does the entire push become invalid? I get it that this is not a part of the first step we just agreed on above, but this is going to be the next step, IIUC. Other questions remain unanswered. Can we discuss this as well because there are a lot of possible scenarios that we need to think of? cc @kadel In the meantime, I'll start looking into adding just the CRD to the devfile. |
The first thing that needs to be addressed is #4159 Once we have that For example command components:
- name: mymongo
kubernetes:
inlined: >
apiVersion: mongodb.com/v1
kind: MongoDB
metadata:
name: mymongo
spec:
credentials: my-credentials
members: 3
opsManager:
configMapRef:
name: my-project
persistent: true
type: ReplicaSet
version: 4.4.0-ent
status:
phase: Running
type: ReplicaSet
Will save the content of myetcd.yaml as a new kubernetes component in Devfile components:
- name: myetcd
kubernetes:
inlined: >
apiVersion: etcd.database.coreos.com/v1beta2
kind: EtcdCluster
metadata:
annotations:
etcd.database.coreos.com/scope: clusterwide
name: myetcd
spec:
size: 3
version: 3.2.13 Similarly with service catalog should result in adding the following kubernetes component into the devfile components:
- name: mymaria
kubernetes:
inlined: >
apiVersion: servicecatalog.k8s.io/v1beta1
kind: ServiceInstance
metadata:
name: mymaria
namespace: tkral-test
spec:
clusterServiceClassExternalName: mariadb
clusterServicePlanExternalName: 10-3-22
parameters:
param-1: value-1
param-2: value-2 But again, before we tackle this we need to make sure that odo understands |
We can get rid of the But how/where do we want to store link related information? |
We need to create a separate issue for this. (just created #4208) The link will come as next after we have #4159 and this one. It will work similarly as |
This will not be possible to do before #4159 which is in turn dependent on devfile/api#216. |
I'm considering adding the code to create service right before https://github.com/openshift/odo/blob/16946d4068f30f1e51cecc64877e535338b043b2/pkg/devfile/adapters/kubernetes/component/adapter.go#L175-L178 Thinking along these lines because there's a call to the function @kadel @mik-dass @girishramnani @valaparthvi if you have a differing opinion/suggestion, let me know. |
Scope of this issue for Sprint 201:
I'll defer documentation till we have properly defined structure via #4664. |
@feloy I noticed that the state doesn't show up when running this command outside of a component directory. I don't think I have a question here, just an fyi, or is this expected for now and we'll be iterating over it? ➜ odo git:(pr/4819) odo service list
NAME MANAGED BY ODO STATE AGE
Database/bkddb Yes (bkd) 15m22s |
/kind user-story
User Story
As a developer working with odo, when I add a new service to the application (like DB), I want to be able to easily share service definitions with my team so they can start the application with the service in the same way as me.
Acceptance Criteria
odo service create
should not create any services on cluster (Creates service on cluster upon "odo push" #4650)odo service create
should store service definition in devfile askubernetes
component (ServiceInstance
for SericeCatalog or CR for operator backed service) (Add and remove service info from devfile #4465)odo service delete
should delete the service from devfile (remove appropriatekubernetes
component). Deletion from the cluster will happen onceodo push
is executed (similar to how we handle URLs).odo service list
should list services and their status. Important is to differentiate between statues like DeletedLocally, DeletedRemotely etc... (Similarly to what odo does for URLs)(being tracked by odo link should store link information in devfile #4208)odo link
should add Service Binding information to devfile.yaml andodo unlink
should remove it from the file. Subsequentodo push
should create/delete the actual link (a Service Binding).Links
/kind user-story
The text was updated successfully, but these errors were encountered: