volume

Volume represents a named volume in a pod that may be accessed by any container in the pod.

Constuctors

Functions
Mixins
  • awsElasticBlockStore

    AWSElasticBlockStore represents an AWS Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore


    Functions
  • azureDisk

    AzureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.


    Functions
    • mixinInstance

      mixinInstance(azureDisk)
      


    • withCachingMode

      withCachingMode(cachingMode)
      

      Host Caching mode: None, Read Only, Read Write.


    • withDiskName

      withDiskName(diskName)
      

      The Name of the data disk in the blob storage


    • withDiskUri

      withDiskUri(diskUri)
      

      The URI the data disk in the blob storage


    • withFsType

      withFsType(fsType)
      

      Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. “ext4”, “xfs”, “ntfs”. Implicitly inferred to be “ext4” if unspecified.


    • withReadOnly

      withReadOnly(readOnly)
      

      Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.


  • azureFile

    AzureFile represents an Azure File Service mount on the host and bind mount to the pod.


    Functions
    • mixinInstance

      mixinInstance(azureFile)
      


    • withReadOnly

      withReadOnly(readOnly)
      

      Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.


    • withSecretName

      withSecretName(secretName)
      

      the name of secret that contains Azure Storage Account Name and Key


    • withShareName

      withShareName(shareName)
      

      Share Name


  • cephfs

    CephFS represents a Ceph FS mount on the host that shares a pod's lifetime


    Functions
    Mixins
  • cinder

    Cinder represents a cinder volume attached and mounted on kubelets host machine More info: https://releases.k8s.io/HEAD/examples/mysql-cinder-pd/README.md


    Functions
    Mixins
  • configMap

    ConfigMap represents a configMap that should populate this volume


    Functions
    • mixinInstance

      mixinInstance(configMap)
      


    • withDefaultMode

      withDefaultMode(defaultMode)
      

      Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.


    • withItems

      withItems(items)
      

      If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the ‘..’ path or start with ‘..’.

      withItems takes an array of type itemsType. You can create an instance of itemsType with hidden.core.v1.keyToPath.new().

      see hidden.core.v1.keyToPath


    • withItemsMixin

      withItemsMixin(items)
      

      If unspecified, each key-value pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the ConfigMap, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the ‘..’ path or start with ‘..’.

      withItemsMixin takes an array of type itemsType. You can create an instance of itemsType with hidden.core.v1.keyToPath.new().

      see hidden.core.v1.keyToPath


    • withName
    • withOptional

      withOptional(optional)
      

      Specify whether the ConfigMap or its keys must be defined


  • csi

    CSI (Container Storage Interface) represents storage that is handled by an external CSI driver (Alpha feature).


    Functions
    • mixinInstance

      mixinInstance(csi)
      


    • withDriver

      withDriver(driver)
      

      Driver is the name of the CSI driver that handles this volume. Consult with your admin for the correct name as registered in the cluster.


    • withFsType

      withFsType(fsType)
      

      Filesystem type to mount. Ex. “ext4”, “xfs”, “ntfs”. If not provided, the empty value is passed to the associated CSI driver which will determine the default filesystem to apply.


    • withReadOnly

      withReadOnly(readOnly)
      

      Specifies a read-only configuration for the volume. Defaults to false (read/write).


    • withVolumeAttributes

      withVolumeAttributes(volumeAttributes)
      

      VolumeAttributes stores driver-specific properties that are passed to the CSI driver. Consult your driver’s documentation for supported values.


    • withVolumeAttributesMixin

      withVolumeAttributesMixin(volumeAttributes)
      

      VolumeAttributes stores driver-specific properties that are passed to the CSI driver. Consult your driver’s documentation for supported values.


    Mixins
  • downwardApi

    DownwardAPI represents downward API about the pod that should populate this volume


    Functions
    • mixinInstance

      mixinInstance(downwardApi)
      


    • withDefaultMode

      withDefaultMode(defaultMode)
      

      Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.


    • withItems

      withItems(items)
      

      Items is a list of downward API volume file

      withItems takes an array of type itemsType. You can create an instance of itemsType with hidden.core.v1.downwardApiVolumeFile.new().

      see hidden.core.v1.downwardApiVolumeFile


    • withItemsMixin

      withItemsMixin(items)
      

      Items is a list of downward API volume file

      withItemsMixin takes an array of type itemsType. You can create an instance of itemsType with hidden.core.v1.downwardApiVolumeFile.new().

      see hidden.core.v1.downwardApiVolumeFile


  • emptyDir

    EmptyDir represents a temporary directory that shares a pod's lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir


    Functions
    Mixins
    • sizeLimit

      Total amount of local storage required for this EmptyDir volume. The size limit is also applicable for memory medium. The maximum usage on memory medium EmptyDir would be the minimum value between the SizeLimit specified here and the sum of memory limits of all containers in a pod. The default is nil which means that the limit is undefined. More info: http://kubernetes.io/docs/user-guide/volumes#emptydir


      Functions
  • fc

    FC represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod.


    Functions
    • mixinInstance

      mixinInstance(fc)
      


    • withFsType

      withFsType(fsType)
      

      Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. “ext4”, “xfs”, “ntfs”. Implicitly inferred to be “ext4” if unspecified.


    • withLun

      withLun(lun)
      

      Optional: FC target lun number


    • withReadOnly

      withReadOnly(readOnly)
      

      Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.


    • withTargetWwns

      withTargetWwns(targetWwns)
      

      Optional: FC target worldwide names (WWNs)


    • withTargetWwnsMixin

      withTargetWwnsMixin(targetWwns)
      

      Optional: FC target worldwide names (WWNs)


    • withWwids

      withWwids(wwids)
      

      Optional: FC volume world wide identifiers (wwids) Either wwids or combination of targetWWNs and lun must be set, but not both simultaneously.


    • withWwidsMixin

      withWwidsMixin(wwids)
      

      Optional: FC volume world wide identifiers (wwids) Either wwids or combination of targetWWNs and lun must be set, but not both simultaneously.


  • flexVolume

    FlexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin.


    Functions
    • mixinInstance

      mixinInstance(flexVolume)
      


    • withDriver

      withDriver(driver)
      

      Driver is the name of the driver to use for this volume.


    • withFsType

      withFsType(fsType)
      

      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.


    • withOptions

      withOptions(options)
      

      Optional: Extra command options if any.


    • withOptionsMixin

      withOptionsMixin(options)
      

      Optional: Extra command options if any.


    • withReadOnly

      withReadOnly(readOnly)
      

      Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.


    Mixins
  • flocker

    Flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running


    Functions
    • mixinInstance

      mixinInstance(flocker)
      


    • withDatasetName

      withDatasetName(datasetName)
      

      Name of the dataset stored as metadata -> name on the dataset for Flocker should be considered as deprecated


    • withDatasetUuid

      withDatasetUuid(datasetUuid)
      

      UUID of the dataset. This is unique identifier of a Flocker dataset


  • gcePersistentDisk

    GCEPersistentDisk represents a GCE Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk


    Functions
  • gitRepo

    GitRepo represents a git repository at a particular revision. DEPRECATED: GitRepo is deprecated. To provision a container with a git repo, mount an EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir into the Pod's container.


    Functions
    • mixinInstance

      mixinInstance(gitRepo)
      


    • withDirectory

      withDirectory(directory)
      

      Target directory name. Must not contain or start with ‘..’. If ‘.’ is supplied, the volume directory will be the git repository. Otherwise, if specified, the volume will contain the git repository in the subdirectory with the given name.


    • withRepository

      withRepository(repository)
      

      Repository URL


    • withRevision

      withRevision(revision)
      

      Commit hash for the specified revision.


  • glusterfs

    Glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime. More info: https://releases.k8s.io/HEAD/examples/volumes/glusterfs/README.md


    Functions
  • hostPath

    HostPath represents a pre-existing file or directory on the host machine that is directly exposed to the container. This is generally used for system agents or other privileged things that are allowed to see the host machine. Most containers will NOT need this. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath


    Functions
  • iscsi

    ISCSI represents an ISCSI Disk resource that is attached to a kubelet's host machine and then exposed to the pod. More info: https://releases.k8s.io/HEAD/examples/volumes/iscsi/README.md


    Functions
    • mixinInstance

      mixinInstance(iscsi)
      


    • withChapAuthDiscovery

      withChapAuthDiscovery(chapAuthDiscovery)
      

      whether support iSCSI Discovery CHAP authentication


    • withChapAuthSession

      withChapAuthSession(chapAuthSession)
      

      whether support iSCSI Session CHAP authentication


    • withFsType

      withFsType(fsType)
      

      Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system. Examples: “ext4”, “xfs”, “ntfs”. Implicitly inferred to be “ext4” if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi


    • withInitiatorName

      withInitiatorName(initiatorName)
      

      Custom iSCSI Initiator Name. If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface : will be created for the connection.


    • withIqn

      withIqn(iqn)
      

      Target iSCSI Qualified Name.


    • withIscsiInterface

      withIscsiInterface(iscsiInterface)
      

      iSCSI Interface Name that uses an iSCSI transport. Defaults to ‘default’ (tcp).


    • withLun

      withLun(lun)
      

      iSCSI Target Lun number.


    • withPortals

      withPortals(portals)
      

      iSCSI Target Portal List. The portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260).


    • withPortalsMixin

      withPortalsMixin(portals)
      

      iSCSI Target Portal List. The portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260).


    • withReadOnly

      withReadOnly(readOnly)
      

      ReadOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false.


    • withTargetPortal

      withTargetPortal(targetPortal)
      

      iSCSI Target Portal. The Portal is either an IP or ip_addr:port if the port is other than default (typically TCP ports 860 and 3260).


    Mixins
  • nfs

    NFS represents an NFS mount on the host that shares a pod's lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs


    Functions
  • persistentVolumeClaim

    PersistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims


    Functions
  • photonPersistentDisk

    PhotonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine


    Functions
    • mixinInstance

      mixinInstance(photonPersistentDisk)
      


    • withFsType

      withFsType(fsType)
      

      Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. “ext4”, “xfs”, “ntfs”. Implicitly inferred to be “ext4” if unspecified.


    • withPdId

      withPdId(pdId)
      

      ID that identifies Photon Controller persistent disk


  • portworxVolume

    PortworxVolume represents a portworx volume attached and mounted on kubelets host machine


    Functions
    • mixinInstance

      mixinInstance(portworxVolume)
      


    • withFsType

      withFsType(fsType)
      

      FSType represents the filesystem type to mount Must be a filesystem type supported by the host operating system. Ex. “ext4”, “xfs”. Implicitly inferred to be “ext4” if unspecified.


    • withReadOnly

      withReadOnly(readOnly)
      

      Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.


    • withVolumeId

      withVolumeId(volumeId)
      

      VolumeID uniquely identifies a Portworx volume


  • projected

    Items for all in one resources secrets, configmaps, and downward API


    Functions
    • mixinInstance

      mixinInstance(projected)
      


    • withDefaultMode

      withDefaultMode(defaultMode)
      

      Mode bits to use on created files by default. Must be a value between 0 and 0777. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.


    • withSources

      withSources(sources)
      

      list of volume projections

      withSources takes an array of type sourcesType. You can create an instance of sourcesType with hidden.core.v1.volumeProjection.new().

      see hidden.core.v1.volumeProjection


    • withSourcesMixin

      withSourcesMixin(sources)
      

      list of volume projections

      withSourcesMixin takes an array of type sourcesType. You can create an instance of sourcesType with hidden.core.v1.volumeProjection.new().

      see hidden.core.v1.volumeProjection


  • quobyte

    Quobyte represents a Quobyte mount on the host that shares a pod's lifetime


    Functions
    • mixinInstance

      mixinInstance(quobyte)
      


    • withGroup

      withGroup(group)
      

      Group to map volume access to Default is no group


    • withReadOnly

      withReadOnly(readOnly)
      

      ReadOnly here will force the Quobyte volume to be mounted with read-only permissions. Defaults to false.


    • withRegistry

      withRegistry(registry)
      

      Registry represents a single or multiple Quobyte Registry services specified as a string as host:port pair (multiple entries are separated with commas) which acts as the central registry for volumes


    • withTenant

      withTenant(tenant)
      

      Tenant owning the given Quobyte volume in the Backend Used with dynamically provisioned Quobyte volumes, value is set by the plugin


    • withUser

      withUser(user)
      

      User to map volume access to Defaults to serivceaccount user


    • withVolume

      withVolume(volume)
      

      Volume is a string that references an already created Quobyte volume by name.


  • rbd

    RBD represents a Rados Block Device mount on the host that shares a pod's lifetime. More info: https://releases.k8s.io/HEAD/examples/volumes/rbd/README.md


    Functions
    Mixins
  • scaleIo

    ScaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes.


    Functions
    • mixinInstance

      mixinInstance(scaleIo)
      


    • withFsType

      withFsType(fsType)
      

      Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. “ext4”, “xfs”, “ntfs”. Default is “xfs”.


    • withGateway

      withGateway(gateway)
      

      The host address of the ScaleIO API Gateway.


    • withProtectionDomain

      withProtectionDomain(protectionDomain)
      

      The name of the ScaleIO Protection Domain for the configured storage.


    • withReadOnly

      withReadOnly(readOnly)
      

      Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.


    • withSslEnabled

      withSslEnabled(sslEnabled)
      

      Flag to enable/disable SSL communication with Gateway, default false


    • withStorageMode

      withStorageMode(storageMode)
      

      Indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. Default is ThinProvisioned.


    • withStoragePool

      withStoragePool(storagePool)
      

      The ScaleIO Storage Pool associated with the protection domain.


    • withSystem

      withSystem(system)
      

      The name of the storage system as configured in ScaleIO.


    • withVolumeName

      withVolumeName(volumeName)
      

      The name of a volume already created in the ScaleIO system that is associated with this volume source.


    Mixins
  • secret

    Secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret


    Functions
    • mixinInstance

      mixinInstance(secret)
      


    • withDefaultMode

      withDefaultMode(defaultMode)
      

      Optional: mode bits to use on created files by default. Must be a value between 0 and 0777. Defaults to 0644. Directories within the path are not affected by this setting. This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.


    • withItems

      withItems(items)
      

      If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the ‘..’ path or start with ‘..’.

      withItems takes an array of type itemsType. You can create an instance of itemsType with hidden.core.v1.keyToPath.new().

      see hidden.core.v1.keyToPath


    • withItemsMixin

      withItemsMixin(items)
      

      If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup will error unless it is marked optional. Paths must be relative and may not contain the ‘..’ path or start with ‘..’.

      withItemsMixin takes an array of type itemsType. You can create an instance of itemsType with hidden.core.v1.keyToPath.new().

      see hidden.core.v1.keyToPath


    • withOptional

      withOptional(optional)
      

      Specify whether the Secret or its keys must be defined


    • withSecretName

      withSecretName(secretName)
      

      Name of the secret in the pod’s namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret


  • storageos

    StorageOS represents a StorageOS volume attached and mounted on Kubernetes nodes.


    Functions
    • mixinInstance

      mixinInstance(storageos)
      


    • withFsType

      withFsType(fsType)
      

      Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. “ext4”, “xfs”, “ntfs”. Implicitly inferred to be “ext4” if unspecified.


    • withReadOnly

      withReadOnly(readOnly)
      

      Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.


    • withVolumeName

      withVolumeName(volumeName)
      

      VolumeName is the human-readable name of the StorageOS volume. Volume names are only unique within a namespace.


    • withVolumeNamespace

      withVolumeNamespace(volumeNamespace)
      

      VolumeNamespace specifies the scope of the volume within StorageOS. If no namespace is specified then the Pod’s namespace will be used. This allows the Kubernetes name scoping to be mirrored within StorageOS for tighter integration. Set VolumeName to any name to override the default behaviour. Set to “default” if you are not using namespaces within StorageOS. Namespaces that do not pre-exist within StorageOS will be created.


    Mixins
  • vsphereVolume

    VsphereVolume represents a vSphere volume attached and mounted on kubelets host machine


    Functions
    • mixinInstance

      mixinInstance(vsphereVolume)
      


    • withFsType

      withFsType(fsType)
      

      Filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. “ext4”, “xfs”, “ntfs”. Implicitly inferred to be “ext4” if unspecified.


    • withStoragePolicyId

      withStoragePolicyId(storagePolicyId)
      

      Storage Policy Based Management (SPBM) profile ID associated with the StoragePolicyName.


    • withStoragePolicyName

      withStoragePolicyName(storagePolicyName)
      

      Storage Policy Based Management (SPBM) profile name.


    • withVolumePath

      withVolumePath(volumePath)
      

      Path that identifies vSphere volume vmdk