mirror of
https://github.com/containers/podman.git
synced 2025-10-12 16:56:32 +08:00
Add kube play support for image volume source
Signed-off-by: Mario Loriedo <mario.loriedo@gmail.com>
This commit is contained in:
@ -28,11 +28,12 @@ Currently, the supported Kubernetes kinds are:
|
||||
|
||||
`Kubernetes Pods or Deployments`
|
||||
|
||||
Only three volume types are supported by kube play, the *hostPath*, *emptyDir*, and *persistentVolumeClaim* volume types.
|
||||
Only four volume types are supported by kube play, the *hostPath*, *emptyDir*, *persistentVolumeClaim*, and *image* volume types.
|
||||
|
||||
- When using the *hostPath* volume type, only the *default (empty)*, *DirectoryOrCreate*, *Directory*, *FileOrCreate*, *File*, *Socket*, *CharDevice* and *BlockDevice* subtypes are supported. Podman interprets the value of *hostPath* *path* as a file path when it contains at least one forward slash, otherwise Podman treats the value as the name of a named volume.
|
||||
- When using a *persistentVolumeClaim*, the value for *claimName* is the name for the Podman named volume.
|
||||
- When using an *emptyDir* volume, Podman creates an anonymous volume that is attached the containers running inside the pod and is deleted once the pod is removed.
|
||||
- When using an *image* volume, Podman creates a read-only image volume with an empty subpath (the whole image is mounted). The image must already exist locally. It is supported in rootful mode only.
|
||||
|
||||
Note: The default restart policy for containers is `always`. You can change the default by setting the `restartPolicy` field in the spec.
|
||||
|
||||
@ -159,7 +160,9 @@ spec:
|
||||
|
||||
and as a result environment variable `FOO` is set to `bar` for container `container-1`.
|
||||
|
||||
`Automounting Volumes`
|
||||
`Automounting Volumes (deprecated)`
|
||||
|
||||
Note: The automounting annotation is deprecated. Kubernetes has [native support for image volumes](https://kubernetes.io/docs/tasks/configure-pod-container/image-volumes/) and that should be used rather than this podman-specific annotation.
|
||||
|
||||
An image can be automatically mounted into a container if the annotation `io.podman.annotations.kube.image.automount/$ctrname` is given. The following rules apply:
|
||||
|
||||
|
Reference in New Issue
Block a user