-
Notifications
You must be signed in to change notification settings - Fork 243
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 should show a list and state of resources created by odo deploy
#5248
Comments
Would it make sense to use already existing command |
Doable. But |
I don't see it that way. Even the outer loop resources are still part of the devfile component, they are part of the same devfile |
You aren't wrong, but |
It is not but it should be,
yes, As I see it devfile = odo component. So every command that odo does is action on top of the component. It doesn't make sense to have Component is confusing term and even among odo developers there is confusion what component actually represents. If we would to keep using components |
created #5253 to capture this and added more info why I think that the |
Just stating a +1 to Tomas' comments above - I agree users would expect to see the deployed app (inner or outer) via 'odo list' (i.e. don't have separate commands), and most users wouldn't even know about 'odo component ' equivalents. |
While I think
|
There are other questions related to output as well:
type K8sComponent struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Manifest unstructured.Unstructured `json:"spec,omitempty"`
Status ComponentStatus `json:"status,omitempty"`
}
// ComponentStatus is Status of components
type ComponentStatus struct { <----------- Existing struct
Context string `json:"context,omitempty"`
State State `json:"state"`
LinkedServices []SecretMount `json:"linkedServices,omitempty"`
}
k8scomp := K8sComponent{
TypeMeta: metav1.TypeMeta{
Kind: "Component",
APIVersion: "odo.dev/v1alpha1",
},
ObjectMeta: metav1.ObjectMeta{
Name: compName, <------ Name of the K8s resource
Namespace: namespace, <------- Namespace where it has been deployed, if deployed
Labels: map[string]string{ <-------- Labels used by the K8s component, this includes the labels from the actual manifest
applabels.ManagedBy: "odo", <------- to determine that the component is managed by odo
component: "devfile-name" <------- determine the devfile that the deployed component belongs to
"{{extralabels}}"
},
},
Manifest: { <----- if the K8s component in devfile is URI, read the data and add it here, else add the in-lined manifest as is.
"{{K8s Manifest}}"
},
Status: ComponentStatus{ <------- if the component is deployed or not
State: state, <------- Possible values: Deployed, Not Deployed
},
} |
Scope of the issue:
|
@serenamarie125 @kadel are we sure to pop issues into a milestone when we are in the middle of it? I'm inclined to put this on 2.5+ instead since we never figured that we would need something like this when we first thought of |
Let's NOT do |
To show the state we could simply modify the component state. Deploy state will have similar states as Push state: Deployed, Not Deployed, Uknown. The output could look like this:
For json output we will just add example of `odo list -o json` output with `deployState` field{
"kind": "List",
"apiVersion": "odo.dev/v1alpha1",
"metadata": {},
"devfileComponents": [
{
"kind": "Component",
"apiVersion": "odo.dev/v1alpha1",
"metadata": {
"name": "devfile-nodejs-deploy",
"namespace": "test",
"creationTimestamp": null,
"labels": {
"app": "app",
"app.kubernetes.io/instance": "devfile-nodejs-deploy",
"app.kubernetes.io/managed-by": "odo",
"app.kubernetes.io/managed-by-version": "v2.4.3",
"app.kubernetes.io/name": "",
"app.kubernetes.io/part-of": "app",
"component": "devfile-nodejs-deploy"
},
"annotations": {
"app.openshift.io/vcs-uri": "https://github.com/kadel/devfile-nodejs-deploy",
"deployment.kubernetes.io/revision": "1",
"odo.dev/project-type": "nodejs"
}
},
"spec": {
"app": "app",
"type": "nodejs",
"env": [
{
"name": "PROJECTS_ROOT",
"value": "/projects"
},
{
"name": "PROJECT_SOURCE",
"value": "/projects"
}
]
},
"status": {
"state": "Pushed",
"deployState": "Deployed"
}
}
],
"otherComponents": []
} Note that this needs to work even without a context folder. So if I'm not in a component folder I should still be able to run This will help users understand that is the current state of their components. Details about all resources should not be in |
Considering the output mentioned in #5248 (comment), if the context is accessible, get the Scope:
|
Could we elaborate the difference in behaviour for the time when |
Considering the output mentioned in #5248 (comment), if the context is accessible, get the Deploy State of the component, else mark it as unknown. |
It might be a bit premature.
|
A friendly reminder that this issue had no activity for 90 days. Stale issues will be closed after an additional 30 days of inactivity. |
This issue was closed because it has been inactive for 30 days since being marked as stale. |
/kind user-story
User Story
As a user, I want to get a list of resources created by
odo deploy
so that I can know:This could be done via
odo deploy list
.Acceptance Criteria
Links
odo deploy
command for initial transition from inner to outer loop #2756/kind user-story
Notes
image
component anddeploy
devfile command / initialodo deploy
implementation #5109 (comment).The text was updated successfully, but these errors were encountered: