mirror of
https://github.com/NVIDIA/OpenShell.git
synced 2026-10-15 05:09:44 +08:00
105 lines
3.4 KiB
TOML
105 lines
3.4 KiB
TOML
# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
# Helm chart tasks
|
|
|
|
["helm:docs"]
|
|
description = "Generate the openshell Helm chart README from Chart.yaml, values.yaml, and README.md.gotmpl"
|
|
run = "helm-docs --chart-search-root deploy/helm/openshell"
|
|
|
|
["helm:docs:check"]
|
|
description = "Verify the openshell Helm chart README is generated and up to date"
|
|
run = """
|
|
set -e
|
|
tmp="$(mktemp)"
|
|
trap 'rm -f "$tmp"' EXIT
|
|
|
|
helm-docs --chart-search-root deploy/helm/openshell --dry-run > "$tmp"
|
|
if ! diff -u deploy/helm/openshell/README.md "$tmp"; then
|
|
echo "Helm chart README is out of sync. Run: mise run helm:docs" >&2
|
|
exit 1
|
|
fi
|
|
"""
|
|
hide = true
|
|
|
|
["helm:lint"]
|
|
description = "Lint the openshell Helm chart (defaults + all CI configuration variants)"
|
|
run = """
|
|
set -e
|
|
helm dependency build deploy/helm/openshell
|
|
echo "--- helm lint: defaults ---"
|
|
echo "values files: deploy/helm/openshell/values.yaml"
|
|
helm lint deploy/helm/openshell
|
|
for f in deploy/helm/openshell/ci/values-*.yaml; do
|
|
variant=$(basename "$f" .yaml | sed 's/values-//')
|
|
echo "--- helm lint: $variant ---"
|
|
echo "values files: deploy/helm/openshell/values.yaml, $f"
|
|
helm lint deploy/helm/openshell -f "$f"
|
|
done
|
|
echo "All variants passed."
|
|
"""
|
|
|
|
["helm:test"]
|
|
description = "Run Helm chart unit tests"
|
|
run = """
|
|
set -e
|
|
if ! helm plugin list | grep -q unittest; then
|
|
helm plugin install https://github.com/helm-unittest/helm-unittest --verify=false
|
|
fi
|
|
helm dependency build deploy/helm/openshell
|
|
helm unittest deploy/helm/openshell
|
|
"""
|
|
|
|
["helm:skaffold:dev"]
|
|
description = "Run skaffold dev for deploy/helm/openshell (iterative deploy)"
|
|
dir = "deploy/helm/openshell"
|
|
run = "skaffold dev"
|
|
|
|
["helm:skaffold:run"]
|
|
description = "Run skaffold run for deploy/helm/openshell (one-shot deploy)"
|
|
dir = "deploy/helm/openshell"
|
|
run = "skaffold run"
|
|
|
|
["helm:skaffold:delete"]
|
|
description = "Run skaffold delete for deploy/helm/openshell"
|
|
dir = "deploy/helm/openshell"
|
|
run = "skaffold delete"
|
|
|
|
["helm:skaffold:diagnose"]
|
|
description = "Run skaffold diagnose for deploy/helm/openshell"
|
|
dir = "deploy/helm/openshell"
|
|
run = "skaffold diagnose"
|
|
hide = true
|
|
|
|
# Local k3s via k3d (Docker required). macOS gets k3d from mise; Linux users
|
|
# should install k3d explicitly or point workflows at an existing/kind cluster.
|
|
|
|
["helm:k3s:create"]
|
|
description = "Create a local k3s cluster with k3d and merge kubeconfig (macOS via mise; Linux requires explicit k3d install; use with helm:skaffold:dev)"
|
|
run = "tasks/scripts/helm-k3s-local.sh create"
|
|
|
|
["helm:k3s:delete"]
|
|
description = "Delete the local k3d cluster created by helm:k3s:create"
|
|
run = "tasks/scripts/helm-k3s-local.sh delete"
|
|
|
|
["helm:k3s:start"]
|
|
description = "Start the local k3d cluster (after helm:k3s:stop)"
|
|
run = "tasks/scripts/helm-k3s-local.sh start"
|
|
hide = true
|
|
|
|
["helm:k3s:stop"]
|
|
description = "Stop the local k3d cluster without deleting it"
|
|
run = "tasks/scripts/helm-k3s-local.sh stop"
|
|
hide = true
|
|
|
|
["helm:k3s:status"]
|
|
description = "List local k3d clusters"
|
|
run = "tasks/scripts/helm-k3s-local.sh status"
|
|
hide = true
|
|
|
|
# Install Envoy Gateway's GatewayClass into the cluster
|
|
|
|
["helm:gateway:apply"]
|
|
description = "Apply the Envoy GatewayClass manifest (run after helm:skaffold:run when gateway routing is enabled)"
|
|
run = "kubectl apply -f deploy/kube/manifests/envoy-gateway-openshell.yaml"
|