volume
Source: base/pkg/kusion_models/kube/frontend/volume/volume.k
Schema Volume
Volume represents a named volume and corresponding mounts in containers.
Attributes
Name and Description | Type | Default Value | Required |
---|---|---|---|
name Volume's name. Must be a DNS_LABEL and unique within the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/\#names | str | Undefined | required |
volumeSource VolumeSource represents the location and type of the mounted volume. | volume.EmptyDir | volume.Secret | volume.ConfigMap | volume.FlexVolume | volume.HostPath | volume.DownwardAPI | volume.CSI | Undefined | required |
mounts Volumes to mount into the container's filesystem. | [volume.Mount] | Undefined | optional |
Examples
volume = v.Volume {
name = "kubeconfig"
volumeSource = v.Secret {
secretName = "kubeconfig"
defaultMode = 420
}
mounts = [
v.Mount {
path = "/etc/kubernetes/kubeconfig"
readOnly = true
}
]
}
Schema Mount
Mount represents a mounting of a Volume within a container.
Attributes
Name and Description | Type | Default Value | Required |
---|---|---|---|
container A Pod-level attribute. Name of container to mount, * represents all containers. | str | * | required |
path A Container-level attribute. Path within the container at which the volume should be mounted. | str | Undefined | required |
subPath A Container-level attribute. Path within the volume from which the container's volume should be mounted. | str | Undefined | optional |
readOnly A Container-level attribute. Mounted read-only if true, read-write otherwise. | bool | False | optional |
Schema EmptyDir
EmptyDir represents a temporary directory that shares a pod's lifetime.
Attributes
Name and Description | Type | Default Value | Required |
---|---|---|---|
medium A Pod-level attribute. What type of storage medium should back this directory. | "" | "Memory" | "" | required |
sizeLimit A Pod-level attribute. Total amount of local storage required for this EmptyDir volume. | str | Undefined | optional |
Schema Secret
Secret represents a secret that should populate this volume.
Attributes
Name and Description | Type | Default Value | Required |
---|---|---|---|
secretName A Pod-level attribute. Name of the secret in the pod's namespace to use. | str | Undefined | required |
items A Pod-level attribute. Key-value pairs projected into the volume. | [{str: str}] | Undefined | optional |
defaultMode A Pod-level attribute. Mode bits used to set permissions on created files by default. | int | Undefined | optional |
Schema ConfigMap
ConfigMap represents a secret that should populate this volume.
Attributes
Name and Description | Type | Default Value | Required |
---|---|---|---|
name A Pod-level attribute. Name of the configMap in the pod's namespace to use. | str | Undefined | required |
items A Pod-level attribute. Key-value pairs projected into the volume. | [{str: str}] | Undefined | optional |
defaultMode A Pod-level attribute. Mode bits used to set permissions on created files by default. | int | Undefined | optional |
Schema FlexVolume
FlexVolume represents a secret that should populate this volume.
Attributes
Name and Description | Type | Default Value | Required |
---|---|---|---|
driver A Pod-level attribute. Driver is the name of the driver to use for this volume. | str | Undefined | required |
fsType A Pod-level attribute. Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". The default filesystem depends on FlexVolume script. | str | Undefined | optional |
options A Pod-level attribute. Extra command options if any. | {str: str} | Undefined | optional |
readOnly A Pod-level attribute. Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. | bool | False | optional |
Schema HostPath
HostPath represents a secret that should populate this volume.
Attributes
Name and Description | Type | Default Value | Required |
---|---|---|---|
path A Pod-level attribute. Path of the directory on the host. If the path is a symlink, it will follow the link to the real path. More info: https://kubernetes.io/docs/concepts/storage/volumes\#hostpath | str | Undefined | required |
type A Pod-level attribute. Type for HostPath Volume Defaults to "" More info: https://kubernetes.io/docs/concepts/storage/volumes\#hostpath | str | Undefined | optional |
Schema DownwardAPI
DownwardAPI represents a secret that should populate this volume.
Attributes
Name and Description | Type | Default Value | Required |
---|---|---|---|
defaultMode A Pod-level attribute. Mode bits used to set permissions on created files by default. | int | Undefined | optional |
items A Pod-level attribute. Items is a list of downward API volume file | [{str: any}] | Undefined | optional |
Schema CSI
CSI (Container Storage Interface) represents ephemeral storage that is handled by certain external CSI drivers (Beta feature).
Attributes
Name and Description | Type | Default Value | Required |
---|---|---|---|
driver A Pod-level attribute. Driver is the name of the driver to use for this volume. | str | Undefined | optional |
fsType A Pod-level attribute. Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs", "ntfs". The default filesystem depends on FlexVolume script. | str | Undefined | optional |
readOnly A Pod-level attribute. Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. | bool | False | optional |
volumeAttributes A Pod-level attribute. Extra command options if any. | {str: str} | Undefined | optional |