diff --git a/.github/workflows/checks.yaml b/.github/workflows/checks.yaml index 4ce9c49..1d39a87 100644 --- a/.github/workflows/checks.yaml +++ b/.github/workflows/checks.yaml @@ -26,7 +26,7 @@ jobs: version: v3.17.3 - run: | helm repo add prometheus-community https://prometheus-community.github.io/helm-charts - helm repo add grafana https://grafana.github.io/helm-charts + helm repo add grafana-community https://grafana-community.github.io/helm-charts helm dependency build charts/model helm dependency build charts/inference-stack helm lint charts/inference-stack --set-string litellm.postgresql.auth.password=test-only-database-password-0123456789 --set-string litellm.postgresql.auth.postgres-password=test-only-database-admin-0123456789 diff --git a/charts/inference-stack/Chart.lock b/charts/inference-stack/Chart.lock index fec3bb5..c10d57f 100644 --- a/charts/inference-stack/Chart.lock +++ b/charts/inference-stack/Chart.lock @@ -6,10 +6,10 @@ dependencies: repository: https://prometheus-community.github.io/helm-charts version: 27.3.0 - name: grafana - repository: https://grafana.github.io/helm-charts - version: 8.8.2 + repository: https://grafana-community.github.io/helm-charts + version: 14.6.1 - name: lens repository: oci://ghcr.io/berriai/charts version: 0.5.0 -digest: sha256:b7282cb0885dde3a1fa54ee47e79bdaeb6b13cdff4f6d2ac36969d906e3a926c -generated: "2026-11-26T00:27:06.908160254Z" +digest: sha256:ff40407a3c820ac51b983fa9eec24e1cb93e97456e11306600e7f4ea87d503c9 +generated: "2026-11-26T16:54:35.436493084Z" diff --git a/charts/inference-stack/Chart.yaml b/charts/inference-stack/Chart.yaml index 6eaa6de..9e66e61 100644 --- a/charts/inference-stack/Chart.yaml +++ b/charts/inference-stack/Chart.yaml @@ -13,8 +13,8 @@ dependencies: version: 27.3.0 repository: https://prometheus-community.github.io/helm-charts - name: grafana - version: 8.8.2 - repository: https://grafana.github.io/helm-charts + version: 14.6.1 + repository: https://grafana-community.github.io/helm-charts - name: lens version: 0.5.0 repository: oci://ghcr.io/berriai/charts diff --git a/charts/inference-stack/values.yaml b/charts/inference-stack/values.yaml index 25ccfe1..6b9130e 100644 --- a/charts/inference-stack/values.yaml +++ b/charts/inference-stack/values.yaml @@ -80,6 +80,10 @@ prometheus: grafana: fullnameOverride: inference-stack-grafana + initChownData: + image: + tag: "1.36.1" + sha: 73aaf090f3d85aa34ee199857f03fa3a95c8ede2ffd4cc2cdb5b94e566b11662 grafana.ini: auth.anonymous: enabled: true diff --git a/compose/docker-compose.yaml b/compose/docker-compose.yaml index f7ce081..25073a6 100644 --- a/compose/docker-compose.yaml +++ b/compose/docker-compose.yaml @@ -111,7 +111,7 @@ services: - "127.0.0.1:9090:9090" grafana: - image: grafana/grafana:11.4.0 + image: grafana/grafana:13.3.2 environment: GF_SECURITY_ADMIN_PASSWORD: ${LITELLM_MASTER_KEY:?Set LITELLM_MASTER_KEY to a generated password} GF_AUTH_ANONYMOUS_ENABLED: "true" diff --git a/docs/setup.md b/docs/setup.md index 323f057..3190a7b 100644 --- a/docs/setup.md +++ b/docs/setup.md @@ -22,7 +22,7 @@ All published ports bind to `127.0.0.1`. The launcher controls Docker, so keep l ## Kubernetes -Use this path for a cluster. You need Helm 3.14 or later, `kubectl`, curl, OpenSSL, and permission to install the stack's resources. Confirm that `kubectl config current-context` selects the intended cluster. Real models need GPU nodes with the [NVIDIA GPU Operator](https://docs.nvidia.com/datacenter/cloud-native/gpu-operator/latest/getting-started.html). Simulation does not require GPUs. +Use this path for a cluster. You need Kubernetes 1.25 or later, Helm 3.14 or later, `kubectl`, curl, OpenSSL, and permission to install the stack's resources. Confirm that `kubectl config current-context` selects the intended cluster. Real models need GPU nodes with the [NVIDIA GPU Operator](https://docs.nvidia.com/datacenter/cloud-native/gpu-operator/latest/getting-started.html). Simulation does not require GPUs. ```bash curl -fsSL https://github.com/BerriAI/inference-stack/releases/download/v0.4.2/install.sh | bash -s -- kubernetes @@ -206,7 +206,7 @@ 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, update the chart with the new defaults and retain your explicit overrides: ```bash helm upgrade inference-stack https://github.com/BerriAI/inference-stack/releases/download/v0.4.2/inference-stack-0.4.2.tgz \ @@ -291,7 +291,7 @@ From the repository root, with Python 3.12, Helm, and Docker installed: python3 -m venv .venv .venv/bin/pip install -r launcher/requirements.txt helm repo add prometheus-community https://prometheus-community.github.io/helm-charts -helm repo add grafana https://grafana.github.io/helm-charts +helm repo add grafana-community https://grafana-community.github.io/helm-charts helm dependency build charts/model helm dependency build charts/inference-stack .venv/bin/python -m unittest discover -s tests diff --git a/install.sh b/install.sh index b421607..bff328e 100755 --- a/install.sh +++ b/install.sh @@ -166,7 +166,7 @@ else else if [[ ! -d charts/inference-stack/charts ]]; then helm repo add prometheus-community https://prometheus-community.github.io/helm-charts - helm repo add grafana https://grafana.github.io/helm-charts + helm repo add grafana-community https://grafana-community.github.io/helm-charts helm dependency build charts/inference-stack fi helm install inference-stack charts/inference-stack --namespace inference --create-namespace \ diff --git a/tests/test_charts.py b/tests/test_charts.py index 6dc8b25..d40456e 100644 --- a/tests/test_charts.py +++ b/tests/test_charts.py @@ -11,6 +11,37 @@ class ChartTests(unittest.TestCase): + @unittest.skipUnless(shutil.which("helm"), "Helm is required for chart contract checks") + def test_grafana_image_and_dashboard_provisioning(self): + root = Path(__file__).resolve().parents[1] + chart = root / "charts/inference-stack" + compose = yaml.safe_load((root / "compose/docker-compose.yaml").read_text()) + compose_image = compose["services"]["grafana"]["image"] + result = subprocess.run( + ["helm", "template", "inference-stack", str(chart), + "--set", "grafana.persistence.enabled=true", + "--set-string", "litellm.postgresql.auth.password=test-only-database-password-0123456789", + "--set-string", "litellm.postgresql.auth.postgres-password=test-only-database-admin-0123456789"], + text=True, capture_output=True, timeout=20, check=True, + ) + resources = {(r["kind"], r["metadata"]["name"]): r for r in yaml.safe_load_all(result.stdout) if r} + pod = resources["Deployment", "inference-stack-grafana"]["spec"]["template"]["spec"] + grafana = next(c for c in pod["containers"] if c["name"] == "grafana") + self.assertEqual(grafana["image"].removeprefix("docker.io/").removesuffix("-distroless"), compose_image) + init_chown = next(c for c in pod["initContainers"] if c["name"] == "init-chown-data") + self.assertRegex(init_chown["image"], r"^docker\.io/library/busybox:1\.36\.1@sha256:[0-9a-f]{64}$") + + provisioning = resources["ConfigMap", "inference-stack-grafana"]["data"] + provider = yaml.safe_load(provisioning["dashboardproviders.yaml"])["providers"][0] + volumes = {v["name"]: v for v in pod["volumes"]} + mount = next(m for m in grafana["volumeMounts"] if m["mountPath"] == provider["options"]["path"]) + dashboards = resources["ConfigMap", volumes[mount["name"]]["configMap"]["name"]]["data"] + self.assertEqual({json.loads(v)["title"] for v in dashboards.values()}, + {json.loads(p.read_text())["title"] for p in (chart / "files/dashboards").rglob("*.json")}) + datasource = yaml.safe_load(provisioning["datasources.yaml"])["datasources"][0] + self.assertEqual((datasource["uid"], datasource["type"], datasource["url"]), + ("prometheus", "prometheus", "http://inference-stack-prometheus")) + @unittest.skipUnless(shutil.which("helm"), "Helm is required for chart contract checks") def test_mixed_gpu_fleet_schedules_on_matching_capacity(self): chart = Path(__file__).resolve().parents[1] / "charts/model"