-
Notifications
You must be signed in to change notification settings - Fork 65
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
Creation of resources specified as kubernetes components #216
Comments
It looks like the library can already extract inlined If I understand it correctly, this is how you can easily extract inlined package main
import (
"fmt"
"github.com/devfile/library/pkg/devfile"
"github.com/devfile/library/pkg/devfile/parser/data/v2/common"
)
func main() {
devfileObj, err := devfile.ParseAndValidate("./devfile.yaml")
if err != nil {
panic(err)
}
components, err :=devfileObj.Data.GetComponents(common.DevfileOptions{})
if err != nil {
panic(err)
}
for _, component := range components {
if component.Kubernetes != nil {
fmt.Println(component.Kubernetes.Inlined)
}
}
} |
Closing this since the support is already there |
@maysunfaisal @yangcao77 does library provide a way to delete a component from the devfile? I don't see a method for that in the interface: https://github.com/devfile/library/blob/master/pkg/devfile/parser/data/interface.go#L25-L28 How do you recommend component deletion from devfile? EDIT: I made a comment about this on #306 (comment). |
@dharmit looking at the odo issue redhat-developer/odo#4160, does this delete entail deleting the entry from the devfile? like for example |
you are right. currently there is no easy way provided by library to perform deletion. |
Yes, that's how it's intended to work. |
Is your feature request related to a problem? Please describe.
In odo, we're planning to store the information about Operator backed services in the devfile under "components -> kubernetes" when user does, say,
odo service create etcdoperator.v0.9.4-clusterwide/EtcdCluster
orodo link EtcdCluster/example
.In this approach, we intend to store the CRD yaml in "components -> kubernetes -> inlined".
Describe the solution you'd like
When the user does
odo service create
orodo link
as mentioned above, the CRD of the Operator backed service should be stored under "components -> kubernetes -> inlined".Next, these kubernetes components should be created for the user on the kubernetes/OpenShift cluster when they do
odo push
.Describe alternatives you've considered
NA.
Additional context
Some discussion on this has happened on redhat-developer/odo#4159.
Does devfile library support or plan to support creation of such resources under "components -> kubernetes"?
The text was updated successfully, but these errors were encountered: