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

Helm support on odo #4236

Open
gorkem opened this issue Nov 18, 2020 · 13 comments
Open

Helm support on odo #4236

gorkem opened this issue Nov 18, 2020 · 13 comments
Labels
kind/epic An issue categorized as a high-level Epic. Needs to be scoped and broken down in 1+ stories/tasks kind/feature Categorizes issue as a feature request. For PRs, that means that the PR is the implementation lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. priority/Medium Nice to have issue. Getting it done before priority changes would be great.

Comments

@gorkem
Copy link
Contributor

gorkem commented Nov 18, 2020

/kind feature

Goal

Developers should be able to use services such as databases, caches, messaging that are installed as Helm charts to the cluster to link with their applications.

Non-goals

Ability to install helm charts using odo is not a primary goal with this enhancement.
Creating helm charts for the application developed is NOT a goal.

Use cases

In order of priority

Link a service installed using a helm chart

odo link command should be able to link a service installed using a helm chart.

List services installed using helm

odo service command should be able to list the helm based installed services.

Restore development state from devfile

odo push should be able to restore the development environment including installation of the required helm components.

Dependencies

Need some additional updates from the Service Binding Operator, which are scheduled for GA

Discussion

This enhancement purposely does not include the installation of helm charts via odo. Helm has a very comprehensive CLI and tooling that is familiar for developers. odo should not try to replace those functions provided by the helm CLI but instead complement them on a multi-container, cloud native application development scenario.

JIRA Epic Tracking

ODO-50

@openshift-ci-robot openshift-ci-robot added the kind/feature Categorizes issue as a feature request. For PRs, that means that the PR is the implementation label Nov 18, 2020
@sspeiche sspeiche added this to the 2.2 (Planning) milestone Nov 19, 2020
@girishramnani girishramnani added the kind/epic An issue categorized as a high-level Epic. Needs to be scoped and broken down in 1+ stories/tasks label Nov 19, 2020
@serenamarie125
Copy link

Pulling into 2.1 milestone. This work cannot be started until the refactor work is complete. Will check back at end of January to re-evaluate status and 2.1 goal.

@girishramnani
Copy link
Contributor

girishramnani commented Nov 25, 2020

an open question to the team and maybe even @gorkem?
There are operators that internally use helm or like operators can be driven using helm - so wouldn’t that be enough in terms of providing helm support?
issue - #4236

We are also in discussion about allowing an easy way to install operators ( i.e. install using admin rights ) in odo then wouldn’t someone just use a cockroach db helm based operator - install it and use it ? and our current linking feature to that operator would work upfront?

@kadel
Copy link
Member

kadel commented Nov 25, 2020

I would say that this won't be enough. This operator uses helm internally, but it is still an operator on the outside.

The point of adding Helm support to odo is to benefit from the Helm ecosystem.

We want users to be able to do just helm install mysql than odo link mysql and have everything ready for the application to connect to the database.

@girishramnani
Copy link
Contributor

girishramnani commented Nov 25, 2020

We want users to be able to do just helm install mysql than odo link mysql and have everything ready for the application to connect to the database.

but this a very specific chart that would only have one service which we can detect and link to - that will not be the case always.

@girishramnani
Copy link
Contributor

I would also like to ask how hard is it to convert a mysql chart to run as an operator using the "helm backed operator strategy of operator sdk"?

@kadel
Copy link
Member

kadel commented Nov 25, 2020

but this a very specific chart that would only have one service which we can detect and link to - that will not be the case always.

The same problem applies to the operator backed services. There is nothing that would guarantee that resources created by an operator include Service.

I would also like to ask how hard is it to convert a mysql chart to run as an operator using the "helm backed operator strategy of operator sdk"?

What problem would this solve?

@sbose78
Copy link
Member

sbose78 commented Nov 25, 2020

We want users to be able to do just helm install mysql than odo link mysql and have everything ready for the application to connect to the database.

+1

@gorkem
Copy link
Contributor Author

gorkem commented Nov 25, 2020

I agree with @kadel. The goal is to be able to support Helm. Helm operator instructions is a mile long, we can not expect developers to go through it because they wanted to deploy a DB during development.

@kadel
Copy link
Member

kadel commented Nov 25, 2020

Implementation of this should not be that complicated.

The first part is extending odo service list list of installed charts.

We can check the Helm source code to check how helm list does that.
Or if we are saying that we need Service in order to create a link we can use labels and annotations that Helm is labeling all objects.
For example to list Services that belong to Helm chart you could do something like this

▶ kubectl get svc -l app.kubernetes.io/managed-by=Helm -o jsonpath="Service.name | Helm.release-name{'\n'}{range .items[*]}{.metadata.name}  |  {.metadata.annotations.meta\.helm\.sh\/release-name}{'\n'}{end}"

Service.name | Helm.release-name
mongodb  |  mongodb
my-mysql  |  my-mysql
my-mysql-slave  |  my-mysql

Now we know both the Helm release name and Service.

So now odo link my-mysql can easily generate ServiceBinding or in this case two ServiceBindigs as there are two Services assuming that SBO can create two SBs for one Deployment (@sbose78 ?). If not users will have to pass extra parameters to odo link narrowing it down to just one Service.

@kadel
Copy link
Member

kadel commented Feb 8, 2021

Started putting together how this should work and how it can be implemented.

#4413

It looks like there might be some blockers. Need to investigate further.

@kadel
Copy link
Member

kadel commented Feb 16, 2021

I've looked into doing linking using Service Binding Operator. The outcome of my research is that it is not possible to construct ServiceBinding in a way that would allow linking to Helm Chart.

On problem is that there is no standard way how Helm Charts are exposing information about how to connect to the provided service. One way to approach this could be assuming that any Service and Secret created by Helm Chart is providing connect information.

The other problem is Service Binding Operator.
Currently, it is not possible to directly specify Secret or Service as a binding service in ServiceBinding redhat-developer/service-binding-operator#872
We would have to modify resources created by Helm and add annotations and ownerReferences to make SBO work with Helm Charts.

We either need to wait for SBO to implement the necessary functionality or try to implement linking between the odo component and Helm charts ourselves inside odo.

@wtrocki
Copy link

wtrocki commented Mar 2, 2021

I would like to jump on the issue with slight different variation.

Currently, ODO recognizes services as Operator Backend Backends which are basically CR + deployments.
Service Binding Operator abstracts from that model and will allow to bind any CR - even the one that doesn't have particular deployment - This is great feature - it just needs CR.

When considering adding helm it will be good to see if ODO can provide a flexible way to define what is service by using labels etc.

For example

app.kubernetes.io/component="external-service"
app.kubernetes.io/managed-by="some-external-service-operator | HELM | ANYTHING FANCY IN FUTURE"

This will not only support helm but also "Other" services.

@rm3l rm3l added this to odo Project Oct 3, 2022
@rm3l rm3l moved this to To Do 📝 in odo Project Oct 3, 2022
@rm3l rm3l removed the status in odo Project Oct 3, 2022
@kadel kadel added the priority/Medium Nice to have issue. Getting it done before priority changes would be great. label Feb 6, 2023
@rm3l rm3l moved this to To Do 📝 in odo Project Jun 26, 2023
@rm3l rm3l removed the status in odo Project Jun 27, 2023
Copy link
Contributor

github-actions bot commented Nov 2, 2023

A friendly reminder that this issue had no activity for 90 days. Stale issues will be closed after an additional 30 days of inactivity.

@github-actions github-actions bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Nov 2, 2023
@rm3l rm3l added lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Nov 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/epic An issue categorized as a high-level Epic. Needs to be scoped and broken down in 1+ stories/tasks kind/feature Categorizes issue as a feature request. For PRs, that means that the PR is the implementation lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. priority/Medium Nice to have issue. Getting it done before priority changes would be great.
Projects
Status: No status
Development

No branches or pull requests

9 participants