feat: introduce chart - #1
Conversation
There was a problem hiding this comment.
Pull request overview
This PR introduces a first-party Helm chart for deploying GPUStack Operator (worker + per-manufacturer device-manager DaemonSets), updates packaging so the operator image bundles the chart, and updates test/CI tooling to generate/lint/test and publish the chart.
Changes:
- Add
deploy/gpustack-operator/chartHelm chart (values, templates, docs/schema, cleanup hook). - Switch EKS Terraform test infra from raw Kubernetes manifests to installing the Helm chart.
- Add Helm chart dev tooling (
make generate/lint/test chart) and CI workflow to validate & publish the chart; update packaging to stamp version deterministically and bundle the chart tgz into the image.
Reviewed changes
Copilot reviewed 39 out of 40 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| testing/infra/clusters/eks/terraform.tf | Replace k8s/kubectl providers with Helm provider dependency. |
| testing/infra/clusters/eks/main.tf | Install operator into EKS via helm_release and map test image into chart values. |
| testing/infra/clusters/eks/.terraform.lock.hcl | Lockfile updates for Helm provider and removal of prior providers. |
| pkg/worker/kuberess/apps_gpustack_device_manager.go | Device-manager install now uses bundled operator chart as a Helm release; adds image parsing and chart version resolution. |
| pkg/worker/kuberess/apps_gpustack_device_manager_test.go | New tests for rendering operator-chart values used for device-manager-only install. |
| pack/gpustack-operator/Dockerfile | Add build-arg version stamping and bundle packaged operator chart into the image. |
| hack/test.sh | Add make test chart support via Helm helpers. |
| hack/package.sh | Pass git version into image build for deterministic stamping/cache behavior. |
| hack/lint.sh | Add make lint chart support via Helm helpers. |
| hack/lib/helm.sh | New Helm helper library for deps/docs/schema/lint/test using chart-testing. |
| hack/generate.sh | Add chart generation task (deps + docs + schema). |
| docs/development.md | Document make generate/lint/test chart workflow and expectations. |
| docs/architecture.md | Update architecture docs to reflect chart-rendered vs runtime-rendered device-managers. |
| deploy/gpustack-operator/chart/values.yaml | New chart values with worker/deviceManager configuration, global image settings, manufacturers map, cleanup hook toggle. |
| deploy/gpustack-operator/chart/values.schema.json | Generated schema for chart values. |
| deploy/gpustack-operator/chart/templates/worker/serviceaccount.yaml | Chart templates for worker ServiceAccount + cluster-admin binding. |
| deploy/gpustack-operator/chart/templates/worker/service.yaml | Worker Service template with Prometheus annotations. |
| deploy/gpustack-operator/chart/templates/worker/deployment.yaml | Worker Deployment template, env propagation, cert-manager mode, and device-manager disable flag. |
| deploy/gpustack-operator/chart/templates/worker/certificate.yaml | Optional cert-manager Issuer/Certificate for worker webhook cert. |
| deploy/gpustack-operator/chart/templates/NOTES.txt | Helm install notes for deployed components and rollout checks. |
| deploy/gpustack-operator/chart/templates/device-manager/serviceaccount.yaml | Device-manager ServiceAccount + cluster-admin binding. |
| deploy/gpustack-operator/chart/templates/device-manager/service.yaml | Device-manager Service template with Prometheus annotations. |
| deploy/gpustack-operator/chart/templates/device-manager/runtimeclass.yaml | Conditionally create RuntimeClass for select manufacturers with ownership checks. |
| deploy/gpustack-operator/chart/templates/device-manager/daemonset.yaml | Per-manufacturer device-manager DaemonSet templates keyed by NFD PCI labels. |
| deploy/gpustack-operator/chart/templates/cleanup/rbac.yaml | Hook RBAC for post-delete cleanup job (cluster-admin). |
| deploy/gpustack-operator/chart/templates/cleanup/job.yaml | Post-delete hook job to run cleanup inside the cluster. |
| deploy/gpustack-operator/chart/templates/cleanup/configmap.yaml | Hook ConfigMap to ship cleanup script into the cluster. |
| deploy/gpustack-operator/chart/templates/_helpers.tpl | Helper templates for naming/labels, image resolution, and cert-manager auto-detection. |
| deploy/gpustack-operator/chart/README.md.gotmpl | README template for helm-docs generation. |
| deploy/gpustack-operator/chart/README.md | Generated chart README. |
| deploy/gpustack-operator/chart/files/cleanup.sh | Shared cleanup script for removing runtime-installed leftovers. |
| deploy/gpustack-operator/chart/Chart.yaml | New chart metadata (version/appVersion kept in sync). |
| deploy/gpustack-operator/chart/.helmignore | Helm packaging ignore rules. |
| deploy/gpustack-operator/chart/.gitignore | Ignore dependency artifacts (charts/*.tgz, Chart.lock). |
| .github/workflows/ci.yml | Pass git version build-arg into image build in CI. |
| .github/workflows/ci-chart.yml | New workflow: generate/verify/lint/test chart on changes; publish on tags. |
| .github/configs/kind-config.yaml | Kind config used by chart CI testing. |
| .claude/skills/gpustack-operator-e2e/SKILL.md | Update E2E skill to deploy via Helm chart and use shared cleanup script. |
| .claude/skills/gpustack-operator-chart-e2e/SKILL.md | New skill for chart-specific E2E install/uninstall + version consistency checks. |
| .claude/hooks/gpustack-operator-lint.sh | Stop-hook now optionally lints chart changes in addition to Go lint. |
Files not reviewed (1)
- testing/infra/clusters/eks/.terraform.lock.hcl: Generated file
| {{- define "gpustack-operator.image" -}} | ||
| {{- $root := .root -}} | ||
| {{- $image := merge (deepCopy .overrides) $root.Values.image -}} | ||
| {{- $repository := $image.repository -}} |
There was a problem hiding this comment.
Not changing this. Helm/sprig merge $dst $src gives precedence to the first (dst) argument — only mergeOverwrite lets later maps win. Here merge (deepCopy .overrides) $root.Values.image keeps the component overrides (dst) and only fills gaps from the chart defaults, so the overrides already take effect. Reversing the order would make the chart defaults overwrite the overrides.
| {{- define "gpustack-operator.imagePullPolicy" -}} | ||
| {{- $image := merge (deepCopy .overrides) .root.Values.image -}} | ||
| {{- $image.pullPolicy -}} |
There was a problem hiding this comment.
Same as the image helper above — merge gives precedence to its first argument (dst, the component overrides), so pullPolicy overrides already take precedence. Leaving the order as-is.
| - name: Publish | ||
| uses: stefanprodan/helm-gh-pages@master | ||
| with: | ||
| token: ${{ secrets.GITHUB_TOKEN }} |
There was a problem hiding this comment.
Intentionally keeping @master here — we want this action to track master, and are accepting the supply-chain trade-off rather than pinning for now.
Signed-off-by: thxCode <thxcode0824@gmail.com>
2004148 to
1430a4f
Compare
What type of PR is this?
What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?