Skip to content

Commit a4bbec6

Browse files
Merge pull request #43 from YaoZengzeng/fix-e2e
install agent-sandbox using the official method
2 parents 06d4fb4 + 1125ccc commit a4bbec6

File tree

1 file changed

+5
-15
lines changed

1 file changed

+5
-15
lines changed

test/e2e/run_e2e.sh

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -26,24 +26,14 @@ echo "1. Creating Kind cluster..."
2626
kind create cluster --name "${E2E_CLUSTER_NAME}" || true
2727

2828
echo "2. Installing agent-sandbox..."
29-
rm -rf /tmp/agent-sandbox
30-
git clone --depth 1 --branch "${AGENT_SANDBOX_VERSION}" "${AGENT_SANDBOX_REPO}" /tmp/agent-sandbox
3129

32-
# Build agent-sandbox-controller image
33-
echo "Building agent-sandbox-controller image..."
34-
docker build -t agent-sandbox-controller:latest -f /tmp/agent-sandbox/images/agent-sandbox-controller/Dockerfile /tmp/agent-sandbox
35-
kind load docker-image agent-sandbox-controller:latest --name "${E2E_CLUSTER_NAME}"
30+
AGENT_SANDBOX_VERSION="v0.1.0"
3631

37-
kubectl apply -f /tmp/agent-sandbox/k8s/crds
38-
kubectl apply -f /tmp/agent-sandbox/k8s/rbac.generated.yaml
32+
# To install only the core components:
33+
kubectl apply -f https://github.com/kubernetes-sigs/agent-sandbox/releases/download/${AGENT_SANDBOX_VERSION}/manifest.yaml
3934

40-
# Patch controller deployment to use local image
41-
echo "Patching agent-sandbox-controller deployment..."
42-
sed -i 's|ko://sigs.k8s.io/agent-sandbox/cmd/agent-sandbox-controller|agent-sandbox-controller:latest|g' /tmp/agent-sandbox/k8s/controller.yaml
43-
# Append imagePullPolicy: IfNotPresent after the image line
44-
sed -i '/image: agent-sandbox-controller:latest/a \ imagePullPolicy: IfNotPresent' /tmp/agent-sandbox/k8s/controller.yaml
45-
46-
kubectl apply -f /tmp/agent-sandbox/k8s/controller.yaml
35+
# To install the extensions components:
36+
kubectl apply -f https://github.com/kubernetes-sigs/agent-sandbox/releases/download/${AGENT_SANDBOX_VERSION}/extensions.yaml
4737

4838
echo "3. Building images..."
4939
# We assume we are in the project root

0 commit comments

Comments
 (0)