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

feat: switch to upstream openwebui helm chart #379

Merged
merged 7 commits into from
Feb 7, 2025

Conversation

kaiehrhardt
Copy link
Contributor

fixes #285

@samos123
Copy link
Contributor

samos123 commented Feb 3, 2025

Thanks Kai! This is very helpful. Initially when we started there was no good openwebui helm chart, but now there is.

We may eventually switch to no longer including openwebui by default but let's do that in a separate PR.

Let me know if you need help with getting tests to pass again.

@samos123
Copy link
Contributor

samos123 commented Feb 3, 2025

Do we need to include this file in the repo itself? charts/kubeai/charts/open-webui-5.4.0.tgz

I was assuming specify the dependency chart in Chart and chart repo url was enough.

version: 0.2.0
- name: open-webui
condition: open-webui.enabled
repository: https://helm.openwebui.com/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we need to include the tgz file itself if we already specify the repo here? I probably prefer to remove the tgz file and just point to upstream helm repo url.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have asked myself the same question. Does it still work without the tgz? I will try that.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without the tgz:

Error: INSTALLATION FAILED: An error occurred while checking for chart dependencies. You may need to run `helm dependency build` to fetch missing dependencies: found in Chart.yaml, but missing in charts/ directory: open-webui

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will it automatically download the tgz file somehow and we can simply put it in .gitignore?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will play around with this a bit more as well to see if we can figure out a way to omit these tgz files. If not, we can just include them as well.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generated Artifacts:
The .tgz file created by helm dependency build is a generated artifact. Since it’s derived from the dependency information in your Chart.yaml, it can be recreated at any time by running that command.

Version Control Best Practices:
It’s generally best practice to avoid committing generated files to Git. Instead, you should commit the source (in this case, the dependency definitions in Chart.yaml) and let the build process handle generating the required artifacts.

Vendoring vs. Rebuilding:
The only time you might consider committing the .tgz files is if you need your chart to be completely self-contained (for example, to support offline installations or to ensure absolute reproducibility without fetching dependencies). However, if your users can run helm dependency build as part of their workflow, it’s simpler and cleaner not to commit them.

Publishing as a Helm Repo:
When you package your chart for publication in a Helm repo (using helm package), the packaging process will include your dependencies appropriately. The repository consumers will download the packaged chart, not the raw Git repo, so committing the .tgz file is unnecessary.

^^ AI had this to say. I think we're probably fine with not including the tgz as long as we run helm dependency build during local development. The publishing will automatically include the depedencies. I will make some changes to this PR to try this out.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was able to remove the tgz file from repo and it should be included in the release packaging workflow as well. I will make sure to validate that in the upcoming release.

@kaiehrhardt kaiehrhardt force-pushed the upstream-openwebui branch 3 times, most recently from 9988310 to 0257353 Compare February 4, 2025 02:12
@samos123 samos123 requested review from samos123 and nstogner February 4, 2025 02:21
Comment on lines +27 to +29
setValueTemplates:
open-webui.enabled: false
skipBuildDependencies: true
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i'm not sure about that. do you want openwebui in your dev env?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can leave as-is for now. We probably should have 1 test that includes it at a minimum though.

@samos123
Copy link
Contributor

samos123 commented Feb 6, 2025

edit: fixed and added a commit

I am seeing the following warning when testing locally:

helm install kubeai ./charts/kubeai 
W0205 21:53:19.307473 1133781 warnings.go:70] spec.template.spec.containers[0].env[4]: hides previous definition of "ENABLE_OLLAMA_API", which may be dropped when using apply
NAME: kubeai
LAST DEPLOYED: Wed Feb  5 21:53:18 2025
NAMESPACE: default
STATUS: deployed
REVISION: 1
TEST SUITE: None

Will try to fix.

```
helm install kubeai ./charts/kubeai
W0205 21:53:19.307473 1133781 warnings.go:70] spec.template.spec.containers[0].env[4]: hides previous definition of "ENABLE_OLLAMA_API", which may be dropped when using apply
```
@samos123
Copy link
Contributor

samos123 commented Feb 6, 2025

This new openwebui has some Arena Chat model that we should try to remove imo
image

@samos123
Copy link
Contributor

samos123 commented Feb 6, 2025

Confirmed it's all working well locally. Didn't know about the preview feature in Open WebUI

image

@samos123
Copy link
Contributor

samos123 commented Feb 6, 2025

Thanks for your patience @kaiehrhardt I made a few follow up commits. Could you please review my changes before I merge it?

The main things I changed are:

  • Remove .tgz file from git
  • Update our testing and releasing workflows
  • Remove Arena
  • Fix warning

@kaiehrhardt
Copy link
Contributor Author

lgtm

@samos123 samos123 merged commit 6498799 into substratusai:main Feb 7, 2025
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Look into decommissioning embedded Open WebUI chart in favor of the upstream chart
2 participants