feat: support installing Helm charts from all sources in app store - #113
Closed
YanamiNeko wants to merge 1 commit into
Closed
feat: support installing Helm charts from all sources in app store#113YanamiNeko wants to merge 1 commit into
YanamiNeko wants to merge 1 commit into
Conversation
The app store could only deploy a single image extracted from a Sealos template, so Helm charts listed there could never actually be installed. Add first-class Helm support: - browse charts via ArtifactHub server-side search, any HTTP(S) repository index.yaml, or a direct oci:// reference - prefill the chart's real values.yaml instead of an empty object - run install/upgrade/uninstall as background tasks so long installs no longer block the HTTP request, and stream Helm logs to the UI - install atomically so failed installs roll back instead of leaving partial resources behind - manage existing releases from a new Helm Releases page - require admin for every Helm write endpoint and refuse to create the target namespace implicitly
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #83.
The app store previously deployed apps by extracting a single container image out of a Sealos template and creating a Deployment + Service. Helm charts shown in the store could therefore never actually be installed.
This adds first-class Helm support so charts from any source can be installed and managed:
index.yaml, and directoci://references.values.yamlis fetched and prefilled in the editor, withvalues.schema.jsonand the selectable version list returned alongside it. Input accepts YAML (and JSON, being a subset).taskId; the UI polls for status and streams Helm's own log output. Long installs no longer hold the HTTP request open.Helm logic lives in
object/helm.goandobject/helm_repo.go, withcontrollers/kept as a thin HTTP layer, matching the existing project structure.New endpoints
GET /api/search-helm-chartsGET /api/get-helm-repo-chartsGET /api/get-helm-chart-infoGET /api/get-helm-releasesGET /api/get-helm-taskPOST /api/install-helm-chartPOST /api/upgrade-helm-releasePOST /api/uninstall-helm-releaseTest plan
go test -tags skipCi ./...go buildcd web && yarn buildeslinton all changed frontend filesHelmRenderChartuses Helm'sDryRun + ClientOnlymode to download a real chart and render its templates without needing a cluster. Verified end-to-end againstcharts.jetstack.io/cert-manager:CASOS_HELM_E2E=1 go test -tags skipCi -run TestHelmRenderChartE2E ./object/→ PASSThis caught a genuine bug: client-only rendering defaults to Kubernetes v1.20.0, which fails any chart declaring a
kubeVersionconstraint. Fixed by pinning the rendering version to match the embedded control plane.Notes for reviewers
go.sumgrows accordingly.helm.sh/helm/v3wantsgolang.org/x/crypto v0.53.0, while this repo pinsv0.49.0throughreplace(same forx/netandx/sys). The build is green as-is, so I left the existingreplaceblock untouched — happy to relax it if you'd prefer.values.schema.json.