generated from kubernetes/kubernetes-template-project
-
Notifications
You must be signed in to change notification settings - Fork 78
Open
Description
Currently, it is possible to create a Sandbox with a PersistentVolume using volumeClaimTemplates directly on the Sandbox spec.
For example:
apiVersion: agents.x-k8s.io/v1alpha1
kind: Sandbox
metadata:
name: my-sandbox
spec:
podTemplate:
spec:
containers:
- name: app
image: ghcr.io/example/agent:latest
volumeMounts:
- name: data
mountPath: /data
volumeClaimTemplates:
- metadata:
name: data
spec:
accessModes: ["ReadWriteOnce"]
resources:
requests:
storage: 10Gi
storageClassName: standard
This ensures that the sandbox gets its own persistent volume backed by a PVC created from the template.
However, creating sandboxes using SandboxClaim and SandboxTemplate does not currently support volumeClaimTemplates on the SandboxTemplate.
Allow SandboxTemplate.spec.podTemplate.spec.volumes to accept a volumeClaimTemplates, mirroring the schema and behavior of Sandbox.spec.volumeClaimTemplates so that each sandbox created via a SandboxClaim from that template will get its own PVC and associated persistent volume.
angristan and srlynch1
Metadata
Metadata
Assignees
Labels
No labels