From 292078465b501557cc0476b458e7bbac55063c0f Mon Sep 17 00:00:00 2001 From: Philipp Hossner Date: Wed, 11 Nov 2026 23:47:09 +0100 Subject: [PATCH] charts: make the gVisor release location configurable Fixes #172 Signed-off-by: Philipp Hossner --- charts/substrate/README.md | 1 + .../templates/sandboxconfig-gvisor.yaml | 10 +++-- .../tests/sandboxconfig_gvisor_test.yaml | 37 +++++++++++++++++++ charts/substrate/values.yaml | 7 ++++ 4 files changed, 51 insertions(+), 4 deletions(-) create mode 100644 charts/substrate/tests/sandboxconfig_gvisor_test.yaml diff --git a/charts/substrate/README.md b/charts/substrate/README.md index 35d7bc96c8..0f5d4363e7 100644 --- a/charts/substrate/README.md +++ b/charts/substrate/README.md @@ -98,6 +98,7 @@ See `values.yaml` for the full set; the important keys: | `atelet.imageCredentialProviderBinDir` | `""` | Host path to the kubelet credential provider binaries; both paths are mounted read-only | | `credentialProvider.enabled` | `true` | Deploy the Kubernetes Secret provider and route `k8s.io` credential URIs to it. With no provider, every credential injection fails closed | | `credentialProvider.namespacePolicies` | `[]` | Default-deny atespace-to-namespace grants; the chart includes get-only Secret RBAC for the provider | +| `gvisorReleaseLocation` | `gs://gvisor/releases/release` | Where the default gVisor SandboxConfig fetches the release tarballs it pins, as `///gvisor.tar.zstd`. Point it at a mirror (`gs://` or `s3://`) that serves the same files; each asset's `sha256` is still checked | | `ateApi.actorJWTIssuer` | `https://..svc` | Issuer placed in actor JWTs; set a stable URL reachable by relying parties | | `objectStorePlugin.extraEnv` | `[]` | Object storage credentials/settings shared by both object-store plugins | | `objectStorePlugin.control.resources` / `objectStorePlugin.node.resources` | see `values.yaml` | Resources for the API and node object-store sidecars | diff --git a/charts/substrate/templates/sandboxconfig-gvisor.yaml b/charts/substrate/templates/sandboxconfig-gvisor.yaml index 080e408628..1a7fc08a9c 100644 --- a/charts/substrate/templates/sandboxconfig-gvisor.yaml +++ b/charts/substrate/templates/sandboxconfig-gvisor.yaml @@ -21,6 +21,8 @@ limitations under the License. # it) matching the worker node's architecture and extracts it locally. To pin a # different release, add a version below and point defaultVersion at it, or # create another SandboxConfig and reference it from the WorkerPool. +# gvisorReleaseLocation in values.yaml sets where the tarballs are fetched +# from, for example a mirror. # # A bump adds a version and points defaultVersion at it. Keep the # previous version unless it has a known vulnerability: an actor restores its @@ -46,11 +48,11 @@ spec: assets: amd64: gvisor: - url: "gs://gvisor/releases/release/20261026.0/x86_64/gvisor.tar.zstd" + url: {{ printf "%s/20261026.0/x86_64/gvisor.tar.zstd" (.Values.gvisorReleaseLocation | trimSuffix "/") | quote }} sha256: "708afc62f2ee82d19930c703e85f9dab4f27a78c0aec40c0f55eb1040107f1a7" arm64: gvisor: - url: "gs://gvisor/releases/release/20261026.0/aarch64/gvisor.tar.zstd" + url: {{ printf "%s/20261026.0/aarch64/gvisor.tar.zstd" (.Values.gvisorReleaseLocation | trimSuffix "/") | quote }} sha256: "6257e49955f13e6caceb2c4181c5dc5406c460e805940c944e67ad65553f5b02" # gVisor release 20261102.0. - name: v7 @@ -58,9 +60,9 @@ spec: assets: amd64: gvisor: - url: "gs://gvisor/releases/release/20261102.0/x86_64/gvisor.tar.zstd" + url: {{ printf "%s/20261102.0/x86_64/gvisor.tar.zstd" (.Values.gvisorReleaseLocation | trimSuffix "/") | quote }} sha256: "a1439ffbba7d212e0fde32ea79fa9bb51cbc4c5f6c16af1f047260290b861d42" arm64: gvisor: - url: "gs://gvisor/releases/release/20261102.0/aarch64/gvisor.tar.zstd" + url: {{ printf "%s/20261102.0/aarch64/gvisor.tar.zstd" (.Values.gvisorReleaseLocation | trimSuffix "/") | quote }} sha256: "f702ae92ad7a0c4134be34ca23f52966dbb696db0c0f5b8ec439210ab2cd7c6a" diff --git a/charts/substrate/tests/sandboxconfig_gvisor_test.yaml b/charts/substrate/tests/sandboxconfig_gvisor_test.yaml new file mode 100644 index 0000000000..1df2adf9e0 --- /dev/null +++ b/charts/substrate/tests/sandboxconfig_gvisor_test.yaml @@ -0,0 +1,37 @@ +# Copyright 2026 The Agent Substrate Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +suite: gVisor sandbox config +templates: +- sandboxconfig-gvisor.yaml +tests: +- it: fetches the gVisor releases from Google Cloud Storage by default + asserts: + - equal: + path: spec.versions[1].assets.amd64.gvisor.url + value: gs://gvisor/releases/release/20261102.0/x86_64/gvisor.tar.zstd + +- it: fetches the gVisor releases from gvisorReleaseLocation, keeping each pinned sha256 + set: + gvisorReleaseLocation: s3://mirror/gvisor/releases/release/ + asserts: + - equal: + path: spec.versions[0].assets.arm64.gvisor.url + value: s3://mirror/gvisor/releases/release/20261026.0/aarch64/gvisor.tar.zstd + - equal: + path: spec.versions[1].assets.amd64.gvisor.url + value: s3://mirror/gvisor/releases/release/20261102.0/x86_64/gvisor.tar.zstd + - equal: + path: spec.versions[1].assets.amd64.gvisor.sha256 + value: a1439ffbba7d212e0fde32ea79fa9bb51cbc4c5f6c16af1f047260290b861d42 diff --git a/charts/substrate/values.yaml b/charts/substrate/values.yaml index 5d0f7a4dce..1d5de86340 100644 --- a/charts/substrate/values.yaml +++ b/charts/substrate/values.yaml @@ -202,6 +202,13 @@ credentialProvider: cpu: 500m memory: 256Mi +# Where the default gVisor SandboxConfig (gvisor-default) fetches the gVisor +# release tarballs it pins: each asset is +# ///gvisor.tar.zstd. A mirror serves the +# same files under the same paths, at a location the object-store plugin opens +# (gs:// or s3://); atelet still checks each asset's sha256. +gvisorReleaseLocation: gs://gvisor/releases/release + # Name of a ConfigMap in the release namespace that supplies per-environment # overrides for ate-api-server (ATE_API_POSTGRES_READ_WRITE_CONNECTION_STRING, ...). # Mounted via envFrom with optional=true. Created by the chart from these values.