- Templates
- python-template
python-template
Updated 4:06:08 PM
Sandbox Template
YAML
apiVersion: extensions.agents.x-k8s.io/v1beta1
kind: SandboxTemplate
metadata:
annotations:
meta.helm.sh/release-name: pool-c0c135b1fc1e23cd
meta.helm.sh/release-namespace: agent-sandboxes
creationTimestamp: 2026-11-16T15:45:19Z
generation: 1
labels:
agents.x-k8s.io/sandbox-template-ref-hash: cede6d20
app.kubernetes.io/managed-by: Helm
name: python-template
namespace: agent-sandboxes
resourceVersion: "1292"
uid: 2a622b38-4c12-4348-b458-332b22b7e6ac
spec:
envVarsInjectionPolicy: Disallowed
failedPodPolicy: Retain
networkPolicyManagement: Managed
podTemplate:
spec:
automountServiceAccountToken: false
containers:
- env:
- name: SANDBOX_BASE_DIR
value: /workspace
- name: HOME
value: /workspace
- name: TMPDIR
value: /tmp
- name: PYTHONDONTWRITEBYTECODE
value: "1"
image: registry.k8s.io/agent-sandbox/python-runtime-sandbox:v1.0.11
livenessProbe:
httpGet:
path: /
port: 8888
initialDelaySeconds: 5
periodSeconds: 10
name: python-runtime
ports:
- containerPort: 8888
protocol: TCP
readinessProbe:
httpGet:
path: /
port: 8888
periodSeconds: 1
resources:
limits:
cpu: "1"
ephemeral-storage: 1Gi
memory: 1Gi
requests:
cpu: 250m
ephemeral-storage: 256Mi
memory: 512Mi
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
readOnlyRootFilesystem: true
runAsNonRoot: true
volumeMounts:
- mountPath: /workspace
name: workspace
- mountPath: /tmp
name: tmp
dnsConfig:
nameservers:
- 1.1.1.1
- 8.8.8.8
options:
- name: ndots
value: "1"
dnsPolicy: None
enableServiceLinks: false
restartPolicy: OnFailure
runtimeClassName: vnode
securityContext:
fsGroup: 1000
runAsGroup: 1000
runAsNonRoot: true
runAsUser: 1000
seccompProfile:
type: RuntimeDefault
volumes:
- emptyDir:
sizeLimit: 256Mi
name: tmp
volumeClaimTemplates:
- metadata:
name: workspace
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
volumeClaimTemplatesPolicy: Overrides
Network Policy python-template-network-policy (managed)
YAML
podSelector:
matchLabels:
agents.x-k8s.io/sandbox-template-ref-hash: cede6d20
policyTypes:
- Ingress
- Egress
ingress:
- from:
- podSelector:
matchLabels:
app: sandbox-router
namespaceSelector:
matchLabels:
kubernetes.io/metadata.name: agent-sandbox-system
egress:
- to:
- ipBlock:
cidr: 0.0.0.0/0
except:
- 10.0.0.0/8
- 172.16.0.0/12
- 192.168.0.0/16
- 169.254.0.0/16
- ipBlock:
cidr: ::/0
except:
- fc00::/7
- fe80::/10