diff --git a/docs/setup.md b/docs/setup.md index 323f057..30ef517 100644 --- a/docs/setup.md +++ b/docs/setup.md @@ -206,13 +206,29 @@ curl -fsSL https://github.com/BerriAI/inference-stack/releases/download/v0.4.2/i When updating a Docker install that predates the Grafana volume, run the installer before removing or recreating the old Grafana container. The installer copies its dashboards and other Grafana data into the new volume. A stopped container can still be migrated. -For an existing Kubernetes cluster, update the chart while retaining your values: +For an existing Kubernetes cluster, confirm your current context and run one upgrade at a time. The command below retains your values and removes the old LiteLLM migration Job only after it completes. Kubernetes cannot update a Job's pod template in place. If the old migration fails or is still running after the timeout, check its logs before retrying. ```bash -helm upgrade inference-stack https://github.com/BerriAI/inference-stack/releases/download/v0.4.2/inference-stack-0.4.2.tgz \ - --namespace inference --reset-then-reuse-values --set-string launcher.image=ghcr.io/berriai/inference-stack/launcher:0.4.2 --wait +( + set -e + job=job/inference-stack-litellm-migrations + existing=$(kubectl -n inference get "$job" --ignore-not-found -o name) + if [ -n "$existing" ]; then + if ! kubectl -n inference wait --for=condition=complete "$job" --timeout=10m; then + # Continue only if Kubernetes already cleaned up the old Job. + existing=$(kubectl -n inference get "$job" --ignore-not-found -o name) + [ -z "$existing" ] || exit 1 + fi + kubectl -n inference delete "$job" --ignore-not-found + fi + helm upgrade inference-stack https://github.com/BerriAI/inference-stack/releases/download/v0.4.2/inference-stack-0.4.2.tgz \ + --namespace inference --reset-then-reuse-values --set-string launcher.image=ghcr.io/berriai/inference-stack/launcher:0.4.2 \ + --wait --timeout 10m +) ``` +With Helm 4, use `--wait=legacy` instead of `--wait` so Helm does not wait on a Job Kubernetes may already have removed. + After the chart update, rerun the [Kubernetes setup command](#kubernetes) to reconnect. Open the launcher and LiteLLM to confirm both are reachable. For AWS, launch a new stack with this release and a different stack name. Deploy your models and create application keys there. Keep the original installation until requests work in the new one, then [delete the original stack](#aws). Updating only the launcher image does not update its AWS infrastructure.