Files
2026-09-24 18:55:45 -07:00

127 lines
4.7 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 gateway and workspace Helm chart READMEs"
run = """
helm-docs --chart-search-root deploy/helm/openshell
helm-docs --chart-search-root deploy/helm/openshell-workspace
"""
["helm:docs:check"]
description = "Verify the openshell Helm chart README is generated and up to date"
run = """
set -e
gateway_tmp="$(mktemp)"
workspace_tmp="$(mktemp)"
trap 'rm -f "$gateway_tmp" "$workspace_tmp"' EXIT
helm-docs --chart-search-root deploy/helm/openshell --dry-run > "$gateway_tmp"
if ! diff -u deploy/helm/openshell/README.md "$gateway_tmp"; then
echo "Helm chart README is out of sync. Run: mise run helm:docs" >&2
exit 1
fi
helm-docs --chart-search-root deploy/helm/openshell-workspace --dry-run > "$workspace_tmp"
if ! diff -u deploy/helm/openshell-workspace/README.md "$workspace_tmp"; then
echo "Workspace Helm chart README is out of sync. Run: mise run helm:docs" >&2
exit 1
fi
"""
run_windows = "echo Skipping helm:docs:check: Helm validation is not part of the native Windows lane."
hide = true
["helm:lint"]
description = "Lint the OpenShell gateway and workspace Helm charts"
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 --set agentSandbox.preflight.enabled=false
helm template openshell deploy/helm/openshell --set agentSandbox.preflight.enabled=false >/dev/null
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" --set agentSandbox.preflight.enabled=false
helm template openshell deploy/helm/openshell -f "$f" --set agentSandbox.preflight.enabled=false >/dev/null
done
echo "--- helm lint: workspace defaults ---"
helm lint deploy/helm/openshell-workspace
echo "All variants passed."
"""
run_windows = "echo Skipping helm:lint: Helm validation is not part of the native Windows lane."
["helm:test"]
description = "Run gateway and workspace 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 unittest deploy/helm/openshell-workspace
deploy/helm/test-split-ownership.sh
"""
run_windows = "echo Skipping helm:test: Helm validation is not part of the native Windows lane."
["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 a one-shot Skaffold deploy and register its local plaintext gateway"
dir = "deploy/helm/openshell"
run = "skaffold run && ../../../tasks/scripts/helm-k3s-local.sh register"
["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 agent-sandbox and an OTLP trace collector, then merge kubeconfig"
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
["helm:k3s:forward"]
description = "Forward collector OTLP ingest (4317), trace UI (18888), and the local gateway (8090) when deployed"
run = "tasks/scripts/helm-k3s-local.sh forward"
# 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"