Skip to content

core.v1.volume

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

Index

Fields

fn fromConfigMap

fromConfigMap(name, configMapName, configMapItems)

Creates a new volume from a ConfigMap

fn fromCsi

fromCsi(name, driver, volumeAttributes={})

Creates a new volume of type csi

fn fromEmptyDir

fromEmptyDir(name, emptyDir={})

Creates a new volume of type emptyDir

fn fromHostPath

fromHostPath(name, hostPath)

Creates a new volume using a hostPath

fn fromPersistentVolumeClaim

fromPersistentVolumeClaim(name, claimName)

Creates a new volume using a PersistentVolumeClaim.

fn fromSecret

fromSecret(name, secretName)

Creates a new volume from a Secret

fn withName

withName(name)

"name of the volume. Must be a DNS_LABEL and unique within the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names"

obj awsElasticBlockStore

"Represents a Persistent Disk resource in AWS.\n\nAn AWS EBS disk must exist before mounting to a container. The disk must also be in the same AWS zone as the kubelet. An AWS EBS disk can only be mounted as read/write once. AWS EBS volumes support ownership management and SELinux relabeling."

fn awsElasticBlockStore.withFsType

withFsType(fsType)

"fsType is the 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#awselasticblockstore"

fn awsElasticBlockStore.withPartition

withPartition(partition)

"partition is the partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as \"1\". Similarly, the volume partition for /dev/sda is \"0\" (or you can leave the property empty)."

fn awsElasticBlockStore.withReadOnly

withReadOnly(readOnly)

"readOnly value true will force the readOnly setting in VolumeMounts. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore"

fn awsElasticBlockStore.withVolumeID

withVolumeID(volumeID)

"volumeID is unique ID of the persistent disk resource in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore"

obj azureDisk

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

fn azureDisk.withCachingMode

withCachingMode(cachingMode)

"cachingMode is the Host Caching mode: None, Read Only, Read Write."

fn azureDisk.withDiskName

withDiskName(diskName)

"diskName is the Name of the data disk in the blob storage"

fn azureDisk.withDiskURI

withDiskURI(diskURI)

"diskURI is the URI of data disk in the blob storage"

fn azureDisk.withFsType

withFsType(fsType)

"fsType is 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."

fn azureDisk.withKind

withKind(kind)

"kind expected values are Shared: multiple blob disks per storage account Dedicated: single blob disk per storage account Managed: azure managed data disk (only in managed availability set). defaults to shared"

fn azureDisk.withReadOnly

withReadOnly(readOnly)

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

obj azureFile

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

fn azureFile.withReadOnly

withReadOnly(readOnly)

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

fn azureFile.withSecretName

withSecretName(secretName)

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

fn azureFile.withShareName

withShareName(shareName)

"shareName is the azure share Name"

obj cephfs

"Represents a Ceph Filesystem mount that lasts the lifetime of a pod Cephfs volumes do not support ownership management or SELinux relabeling."

fn cephfs.withMonitors

withMonitors(monitors)

"monitors is Required: Monitors is a collection of Ceph monitors More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it"

fn cephfs.withMonitorsMixin

withMonitorsMixin(monitors)

"monitors is Required: Monitors is a collection of Ceph monitors More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it"

Note: This function appends passed data to existing values

fn cephfs.withPath

withPath(path)

"path is Optional: Used as the mounted root, rather than the full Ceph tree, default is /"

fn cephfs.withReadOnly

withReadOnly(readOnly)

"readOnly is Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it"

fn cephfs.withSecretFile

withSecretFile(secretFile)

"secretFile is Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it"

fn cephfs.withUser

withUser(user)

"user is optional: User is the rados user name, default is admin More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it"

obj cephfs.secretRef

"LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace."

fn cephfs.secretRef.withName

withName(name)

"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names"

obj cinder

"Represents a cinder volume resource in Openstack. A Cinder volume must exist before mounting to a container. The volume must also be in the same region as the kubelet. Cinder volumes support ownership management and SELinux relabeling."

fn cinder.withFsType

withFsType(fsType)

"fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Examples: \"ext4\", \"xfs\", \"ntfs\". Implicitly inferred to be \"ext4\" if unspecified. More info: https://examples.k8s.io/mysql-cinder-pd/README.md"

fn cinder.withReadOnly

withReadOnly(readOnly)

"readOnly defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://examples.k8s.io/mysql-cinder-pd/README.md"

fn cinder.withVolumeID

withVolumeID(volumeID)

"volumeID used to identify the volume in cinder. More info: https://examples.k8s.io/mysql-cinder-pd/README.md"

obj cinder.secretRef

"LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace."

fn cinder.secretRef.withName

withName(name)

"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names"

obj configMap

"Adapts a ConfigMap into a volume.\n\nThe contents of the target ConfigMap's Data field will be presented in a volume as files using the keys in the Data field as the file names, unless the items element is populated with specific mappings of keys to paths. ConfigMap volumes support ownership management and SELinux relabeling."

fn configMap.withDefaultMode

withDefaultMode(defaultMode)

"defaultMode is optional: mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. 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."

fn configMap.withItems

withItems(items)

"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 '..'."

fn configMap.withItemsMixin

withItemsMixin(items)

"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 '..'."

Note: This function appends passed data to existing values

fn configMap.withName

withName(name)

"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names"

fn configMap.withOptional

withOptional(optional)

"optional specify whether the ConfigMap or its keys must be defined"

obj csi

"Represents a source location of a volume to mount, managed by an external CSI driver"

fn 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."

fn csi.withFsType

withFsType(fsType)

"fsType 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."

fn csi.withReadOnly

withReadOnly(readOnly)

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

fn csi.withVolumeAttributes

withVolumeAttributes(volumeAttributes)

"volumeAttributes stores driver-specific properties that are passed to the CSI driver. Consult your driver's documentation for supported values."

fn csi.withVolumeAttributesMixin

withVolumeAttributesMixin(volumeAttributes)

"volumeAttributes stores driver-specific properties that are passed to the CSI driver. Consult your driver's documentation for supported values."

Note: This function appends passed data to existing values

obj csi.nodePublishSecretRef

"LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace."

fn csi.nodePublishSecretRef.withName

withName(name)

"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names"

obj downwardAPI

"DownwardAPIVolumeSource represents a volume containing downward API info. Downward API volumes support ownership management and SELinux relabeling."

fn downwardAPI.withDefaultMode

withDefaultMode(defaultMode)

"Optional: mode bits to use on created files by default. Must be a Optional: mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. 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."

fn downwardAPI.withItems

withItems(items)

"Items is a list of downward API volume file"

fn downwardAPI.withItemsMixin

withItemsMixin(items)

"Items is a list of downward API volume file"

Note: This function appends passed data to existing values

obj emptyDir

"Represents an empty directory for a pod. Empty directory volumes support ownership management and SELinux relabeling."

fn emptyDir.withMedium

withMedium(medium)

"medium represents what type of storage medium should back this directory. The default is \"\" which means to use the node's default medium. Must be an empty string (default) or Memory. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir"

fn emptyDir.withSizeLimit

withSizeLimit(sizeLimit)

"Quantity is a fixed-point representation of a number. It provides convenient marshaling/unmarshaling in JSON and YAML, in addition to String() and AsInt64() accessors.\n\nThe serialization format is:\n\n<quantity> ::= <signedNumber><suffix>\n\n\t(Note that <suffix> may be empty, from the \"\" case in <decimalSI>.)\n\n<digit> ::= 0 | 1 | ... | 9 <digits> ::= <digit> | <digit><digits> <number> ::= <digits> | <digits>.<digits> | <digits>. | .<digits> <sign> ::= \"+\" | \"-\" <signedNumber> ::= <number> | <sign><number> <suffix> ::= <binarySI> | <decimalExponent> | <decimalSI> <binarySI> ::= Ki | Mi | Gi | Ti | Pi | Ei\n\n\t(International System of units; See: http://physics.nist.gov/cuu/Units/binary.html)\n\n<decimalSI> ::= m | \"\" | k | M | G | T | P | E\n\n\t(Note that 1024 = 1Ki but 1000 = 1k; I didn't choose the capitalization.)\n\n<decimalExponent> ::= \"e\" <signedNumber> | \"E\" <signedNumber>\n\nNo matter which of the three exponent forms is used, no quantity may represent a number greater than 2^63-1 in magnitude, nor may it have more than 3 decimal places. Numbers larger or more precise will be capped or rounded up. (E.g.: 0.1m will rounded up to 1m.) This may be extended in the future if we require larger or smaller quantities.\n\nWhen a Quantity is parsed from a string, it will remember the type of suffix it had, and will use the same type again when it is serialized.\n\nBefore serializing, Quantity will be put in \"canonical form\". This means that Exponent/suffix will be adjusted up or down (with a corresponding increase or decrease in Mantissa) such that:\n\n- No precision is lost - No fractional digits will be emitted - The exponent (or suffix) is as large as possible.\n\nThe sign will be omitted unless the number is negative.\n\nExamples:\n\n- 1.5 will be serialized as \"1500m\" - 1.5Gi will be serialized as \"1536Mi\"\n\nNote that the quantity will NEVER be internally represented by a floating point number. That is the whole point of this exercise.\n\nNon-canonical values will still parse as long as they are well formed, but will be re-emitted in their canonical form. (So always use canonical form, or don't diff.)\n\nThis format is intended to make it difficult to use these numbers without writing some sort of special handling code in the hopes that that will cause implementors to also use a fixed point implementation."

obj ephemeral

"Represents an ephemeral volume that is handled by a normal storage driver."

obj ephemeral.volumeClaimTemplate

"PersistentVolumeClaimTemplate is used to produce PersistentVolumeClaim objects as part of an EphemeralVolumeSource."

obj ephemeral.volumeClaimTemplate.metadata

"ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create."

fn ephemeral.volumeClaimTemplate.metadata.withAnnotations

withAnnotations(annotations)

"Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations"

fn ephemeral.volumeClaimTemplate.metadata.withAnnotationsMixin

withAnnotationsMixin(annotations)

"Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations"

Note: This function appends passed data to existing values

fn ephemeral.volumeClaimTemplate.metadata.withCreationTimestamp

withCreationTimestamp(creationTimestamp)

"Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers."

fn ephemeral.volumeClaimTemplate.metadata.withDeletionGracePeriodSeconds

withDeletionGracePeriodSeconds(deletionGracePeriodSeconds)

"Number of seconds allowed for this object to gracefully terminate before it will be removed from the system. Only set when deletionTimestamp is also set. May only be shortened. Read-only."

fn ephemeral.volumeClaimTemplate.metadata.withDeletionTimestamp

withDeletionTimestamp(deletionTimestamp)

"Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers."

fn ephemeral.volumeClaimTemplate.metadata.withFinalizers

withFinalizers(finalizers)

"Must be empty before the object is deleted from the registry. Each entry is an identifier for the responsible component that will remove the entry from the list. If the deletionTimestamp of the object is non-nil, entries in this list can only be removed. Finalizers may be processed and removed in any order. Order is NOT enforced because it introduces significant risk of stuck finalizers. finalizers is a shared field, any actor with permission can reorder it. If the finalizer list is processed in order, then this can lead to a situation in which the component responsible for the first finalizer in the list is waiting for a signal (field value, external system, or other) produced by a component responsible for a finalizer later in the list, resulting in a deadlock. Without enforced ordering finalizers are free to order amongst themselves and are not vulnerable to ordering changes in the list."

fn ephemeral.volumeClaimTemplate.metadata.withFinalizersMixin

withFinalizersMixin(finalizers)

"Must be empty before the object is deleted from the registry. Each entry is an identifier for the responsible component that will remove the entry from the list. If the deletionTimestamp of the object is non-nil, entries in this list can only be removed. Finalizers may be processed and removed in any order. Order is NOT enforced because it introduces significant risk of stuck finalizers. finalizers is a shared field, any actor with permission can reorder it. If the finalizer list is processed in order, then this can lead to a situation in which the component responsible for the first finalizer in the list is waiting for a signal (field value, external system, or other) produced by a component responsible for a finalizer later in the list, resulting in a deadlock. Without enforced ordering finalizers are free to order amongst themselves and are not vulnerable to ordering changes in the list."

Note: This function appends passed data to existing values

fn ephemeral.volumeClaimTemplate.metadata.withGenerateName

withGenerateName(generateName)

"GenerateName is an optional prefix, used by the server, to generate a unique name ONLY IF the Name field has not been provided. If this field is used, the name returned to the client will be different than the name passed. This value will also be combined with a unique suffix. The provided value has the same validation rules as the Name field, and may be truncated by the length of the suffix required to make the value unique on the server.\n\nIf this field is specified and the generated name exists, the server will return a 409.\n\nApplied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#idempotency"

fn ephemeral.volumeClaimTemplate.metadata.withGeneration

withGeneration(generation)

"A sequence number representing a specific generation of the desired state. Populated by the system. Read-only."

fn ephemeral.volumeClaimTemplate.metadata.withLabels

withLabels(labels)

"Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels"

fn ephemeral.volumeClaimTemplate.metadata.withLabelsMixin

withLabelsMixin(labels)

"Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels"

Note: This function appends passed data to existing values

fn ephemeral.volumeClaimTemplate.metadata.withManagedFields

withManagedFields(managedFields)

"ManagedFields maps workflow-id and version to the set of fields that are managed by that workflow. This is mostly for internal housekeeping, and users typically shouldn't need to set or understand this field. A workflow can be the user's name, a controller's name, or the name of a specific apply path like \"ci-cd\". The set of fields is always in the version that the workflow used when modifying the object."

fn ephemeral.volumeClaimTemplate.metadata.withManagedFieldsMixin

withManagedFieldsMixin(managedFields)

"ManagedFields maps workflow-id and version to the set of fields that are managed by that workflow. This is mostly for internal housekeeping, and users typically shouldn't need to set or understand this field. A workflow can be the user's name, a controller's name, or the name of a specific apply path like \"ci-cd\". The set of fields is always in the version that the workflow used when modifying the object."

Note: This function appends passed data to existing values

fn ephemeral.volumeClaimTemplate.metadata.withName

withName(name)

"Name must be unique within a namespace. Is required when creating resources, although some resources may allow a client to request the generation of an appropriate name automatically. Name is primarily intended for creation idempotence and configuration definition. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names"

fn ephemeral.volumeClaimTemplate.metadata.withNamespace

withNamespace(namespace)

"Namespace defines the space within which each name must be unique. An empty namespace is equivalent to the \"default\" namespace, but \"default\" is the canonical representation. Not all objects are required to be scoped to a namespace - the value of this field for those objects will be empty.\n\nMust be a DNS_LABEL. Cannot be updated. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces"

fn ephemeral.volumeClaimTemplate.metadata.withOwnerReferences

withOwnerReferences(ownerReferences)

"List of objects depended by this object. If ALL objects in the list have been deleted, this object will be garbage collected. If this object is managed by a controller, then an entry in this list will point to this controller, with the controller field set to true. There cannot be more than one managing controller."

fn ephemeral.volumeClaimTemplate.metadata.withOwnerReferencesMixin

withOwnerReferencesMixin(ownerReferences)

"List of objects depended by this object. If ALL objects in the list have been deleted, this object will be garbage collected. If this object is managed by a controller, then an entry in this list will point to this controller, with the controller field set to true. There cannot be more than one managing controller."

Note: This function appends passed data to existing values

fn ephemeral.volumeClaimTemplate.metadata.withResourceVersion

withResourceVersion(resourceVersion)

"An opaque value that represents the internal version of this object that can be used by clients to determine when objects have changed. May be used for optimistic concurrency, change detection, and the watch operation on a resource or set of resources. Clients must treat these values as opaque and passed unmodified back to the server. They may only be valid for a particular resource or set of resources.\n\nPopulated by the system. Read-only. Value must be treated as opaque by clients and . More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency"

withSelfLink(selfLink)

"Deprecated: selfLink is a legacy read-only field that is no longer populated by the system."

fn ephemeral.volumeClaimTemplate.metadata.withUid

withUid(uid)

"UID is the unique in time and space value for this object. It is typically generated by the server on successful creation of a resource and is not allowed to change on PUT operations.\n\nPopulated by the system. Read-only. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#uids"

obj ephemeral.volumeClaimTemplate.spec

"PersistentVolumeClaimSpec describes the common attributes of storage devices and allows a Source for provider-specific attributes"

fn ephemeral.volumeClaimTemplate.spec.withAccessModes

withAccessModes(accessModes)

"accessModes contains the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1"

fn ephemeral.volumeClaimTemplate.spec.withAccessModesMixin

withAccessModesMixin(accessModes)

"accessModes contains the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1"

Note: This function appends passed data to existing values

fn ephemeral.volumeClaimTemplate.spec.withStorageClassName

withStorageClassName(storageClassName)

"storageClassName is the name of the StorageClass required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1"

fn ephemeral.volumeClaimTemplate.spec.withVolumeAttributesClassName

withVolumeAttributesClassName(volumeAttributesClassName)

"volumeAttributesClassName may be used to set the VolumeAttributesClass used by this claim. If specified, the CSI driver will create or update the volume with the attributes defined in the corresponding VolumeAttributesClass. This has a different purpose than storageClassName, it can be changed after the claim is created. An empty string value means that no VolumeAttributesClass will be applied to the claim but it's not allowed to reset this field to empty string once it is set. If unspecified and the PersistentVolumeClaim is unbound, the default VolumeAttributesClass will be set by the persistentvolume controller if it exists. If the resource referred to by volumeAttributesClass does not exist, this PersistentVolumeClaim will be set to a Pending state, as reflected by the modifyVolumeStatus field, until such as a resource exists. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#volumeattributesclass (Alpha) Using this field requires the VolumeAttributesClass feature gate to be enabled."

fn ephemeral.volumeClaimTemplate.spec.withVolumeMode

withVolumeMode(volumeMode)

"volumeMode defines what type of volume is required by the claim. Value of Filesystem is implied when not included in claim spec."

fn ephemeral.volumeClaimTemplate.spec.withVolumeName

withVolumeName(volumeName)

"volumeName is the binding reference to the PersistentVolume backing this claim."

obj ephemeral.volumeClaimTemplate.spec.dataSource

"TypedLocalObjectReference contains enough information to let you locate the typed referenced object inside the same namespace."

fn ephemeral.volumeClaimTemplate.spec.dataSource.withApiGroup

withApiGroup(apiGroup)

"APIGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required."

fn ephemeral.volumeClaimTemplate.spec.dataSource.withKind

withKind(kind)

"Kind is the type of resource being referenced"

fn ephemeral.volumeClaimTemplate.spec.dataSource.withName

withName(name)

"Name is the name of resource being referenced"

obj ephemeral.volumeClaimTemplate.spec.dataSourceRef

fn ephemeral.volumeClaimTemplate.spec.dataSourceRef.withApiGroup

withApiGroup(apiGroup)

"APIGroup is the group for the resource being referenced. If APIGroup is not specified, the specified Kind must be in the core API group. For any other third-party types, APIGroup is required."

fn ephemeral.volumeClaimTemplate.spec.dataSourceRef.withKind

withKind(kind)

"Kind is the type of resource being referenced"

fn ephemeral.volumeClaimTemplate.spec.dataSourceRef.withName

withName(name)

"Name is the name of resource being referenced"

fn ephemeral.volumeClaimTemplate.spec.dataSourceRef.withNamespace

withNamespace(namespace)

"Namespace is the namespace of resource being referenced Note that when a namespace is specified, a gateway.networking.k8s.io/ReferenceGrant object is required in the referent namespace to allow that namespace's owner to accept the reference. See the ReferenceGrant documentation for details. (Alpha) This field requires the CrossNamespaceVolumeDataSource feature gate to be enabled."

obj ephemeral.volumeClaimTemplate.spec.resources

"VolumeResourceRequirements describes the storage resource requirements for a volume."

fn ephemeral.volumeClaimTemplate.spec.resources.withLimits

withLimits(limits)

"Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/"

fn ephemeral.volumeClaimTemplate.spec.resources.withLimitsMixin

withLimitsMixin(limits)

"Limits describes the maximum amount of compute resources allowed. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/"

Note: This function appends passed data to existing values

fn ephemeral.volumeClaimTemplate.spec.resources.withRequests

withRequests(requests)

"Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. Requests cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/"

fn ephemeral.volumeClaimTemplate.spec.resources.withRequestsMixin

withRequestsMixin(requests)

"Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. Requests cannot exceed Limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/"

Note: This function appends passed data to existing values

obj ephemeral.volumeClaimTemplate.spec.selector

"A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects."

fn ephemeral.volumeClaimTemplate.spec.selector.withMatchExpressions

withMatchExpressions(matchExpressions)

"matchExpressions is a list of label selector requirements. The requirements are ANDed."

fn ephemeral.volumeClaimTemplate.spec.selector.withMatchExpressionsMixin

withMatchExpressionsMixin(matchExpressions)

"matchExpressions is a list of label selector requirements. The requirements are ANDed."

Note: This function appends passed data to existing values

fn ephemeral.volumeClaimTemplate.spec.selector.withMatchLabels

withMatchLabels(matchLabels)

"matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is \"key\", the operator is \"In\", and the values array contains only \"value\". The requirements are ANDed."

fn ephemeral.volumeClaimTemplate.spec.selector.withMatchLabelsMixin

withMatchLabelsMixin(matchLabels)

"matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is \"key\", the operator is \"In\", and the values array contains only \"value\". The requirements are ANDed."

Note: This function appends passed data to existing values

obj fc

"Represents a Fibre Channel volume. Fibre Channel volumes can only be mounted as read/write once. Fibre Channel volumes support ownership management and SELinux relabeling."

fn fc.withFsType

withFsType(fsType)

"fsType is the 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."

fn fc.withLun

withLun(lun)

"lun is Optional: FC target lun number"

fn fc.withReadOnly

withReadOnly(readOnly)

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

fn fc.withTargetWWNs

withTargetWWNs(targetWWNs)

"targetWWNs is Optional: FC target worldwide names (WWNs)"

fn fc.withTargetWWNsMixin

withTargetWWNsMixin(targetWWNs)

"targetWWNs is Optional: FC target worldwide names (WWNs)"

Note: This function appends passed data to existing values

fn fc.withWwids

withWwids(wwids)

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

fn fc.withWwidsMixin

withWwidsMixin(wwids)

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

Note: This function appends passed data to existing values

obj flexVolume

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

fn flexVolume.withDriver

withDriver(driver)

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

fn flexVolume.withFsType

withFsType(fsType)

"fsType is the 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."

fn flexVolume.withOptions

withOptions(options)

"options is Optional: this field holds extra command options if any."

fn flexVolume.withOptionsMixin

withOptionsMixin(options)

"options is Optional: this field holds extra command options if any."

Note: This function appends passed data to existing values

fn flexVolume.withReadOnly

withReadOnly(readOnly)

"readOnly is Optional: defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts."

obj flexVolume.secretRef

"LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace."

fn flexVolume.secretRef.withName

withName(name)

"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names"

obj flocker

"Represents a Flocker volume mounted by the Flocker agent. One and only one of datasetName and datasetUUID should be set. Flocker volumes do not support ownership management or SELinux relabeling."

fn flocker.withDatasetName

withDatasetName(datasetName)

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

fn flocker.withDatasetUUID

withDatasetUUID(datasetUUID)

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

obj gcePersistentDisk

"Represents a Persistent Disk resource in Google Compute Engine.\n\nA GCE PD must exist before mounting to a container. The disk must also be in the same GCE project and zone as the kubelet. A GCE PD can only be mounted as read/write once or read-only many times. GCE PDs support ownership management and SELinux relabeling."

fn gcePersistentDisk.withFsType

withFsType(fsType)

"fsType is 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#gcepersistentdisk"

fn gcePersistentDisk.withPartition

withPartition(partition)

"partition is the partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as \"1\". Similarly, the volume partition for /dev/sda is \"0\" (or you can leave the property empty). More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk"

fn gcePersistentDisk.withPdName

withPdName(pdName)

"pdName is unique name of the PD resource in GCE. Used to identify the disk in GCE. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk"

fn gcePersistentDisk.withReadOnly

withReadOnly(readOnly)

"readOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk"

obj gitRepo

"Represents a volume that is populated with the contents of a git repository. Git repo volumes do not support ownership management. Git repo volumes support SELinux relabeling.\n\nDEPRECATED: 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."

fn gitRepo.withDirectory

withDirectory(directory)

"directory is the 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."

fn gitRepo.withRepository

withRepository(repository)

"repository is the URL"

fn gitRepo.withRevision

withRevision(revision)

"revision is the commit hash for the specified revision."

obj glusterfs

"Represents a Glusterfs mount that lasts the lifetime of a pod. Glusterfs volumes do not support ownership management or SELinux relabeling."

fn glusterfs.withEndpoints

withEndpoints(endpoints)

"endpoints is the endpoint name that details Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod"

fn glusterfs.withPath

withPath(path)

"path is the Glusterfs volume path. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod"

fn glusterfs.withReadOnly

withReadOnly(readOnly)

"readOnly here will force the Glusterfs volume to be mounted with read-only permissions. Defaults to false. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod"

obj hostPath

"Represents a host path mapped into a pod. Host path volumes do not support ownership management or SELinux relabeling."

fn hostPath.withPath

withPath(path)

"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"

fn hostPath.withType

withType(type)

"type for HostPath Volume Defaults to \"\" More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath"

obj iscsi

"Represents an ISCSI disk. ISCSI volumes can only be mounted as read/write once. ISCSI volumes support ownership management and SELinux relabeling."

fn iscsi.withChapAuthDiscovery

withChapAuthDiscovery(chapAuthDiscovery)

"chapAuthDiscovery defines whether support iSCSI Discovery CHAP authentication"

fn iscsi.withChapAuthSession

withChapAuthSession(chapAuthSession)

"chapAuthSession defines whether support iSCSI Session CHAP authentication"

fn iscsi.withFsType

withFsType(fsType)

"fsType is the 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"

fn iscsi.withInitiatorName

withInitiatorName(initiatorName)

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

fn iscsi.withIqn

withIqn(iqn)

"iqn is the target iSCSI Qualified Name."

fn iscsi.withIscsiInterface

withIscsiInterface(iscsiInterface)

"iscsiInterface is the interface Name that uses an iSCSI transport. Defaults to 'default' (tcp)."

fn iscsi.withLun

withLun(lun)

"lun represents iSCSI Target Lun number."

fn iscsi.withPortals

withPortals(portals)

"portals is the 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)."

fn iscsi.withPortalsMixin

withPortalsMixin(portals)

"portals is the 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)."

Note: This function appends passed data to existing values

fn iscsi.withReadOnly

withReadOnly(readOnly)

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

fn iscsi.withTargetPortal

withTargetPortal(targetPortal)

"targetPortal is 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)."

obj iscsi.secretRef

"LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace."

fn iscsi.secretRef.withName

withName(name)

"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names"

obj nfs

"Represents an NFS mount that lasts the lifetime of a pod. NFS volumes do not support ownership management or SELinux relabeling."

fn nfs.withPath

withPath(path)

"path that is exported by the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs"

fn nfs.withReadOnly

withReadOnly(readOnly)

"readOnly here will force the NFS export to be mounted with read-only permissions. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs"

fn nfs.withServer

withServer(server)

"server is the hostname or IP address of the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs"

obj persistentVolumeClaim

"PersistentVolumeClaimVolumeSource references the user's PVC in the same namespace. This volume finds the bound PV and mounts that volume for the pod. A PersistentVolumeClaimVolumeSource is, essentially, a wrapper around another type of volume that is owned by someone else (the system)."

fn persistentVolumeClaim.withClaimName

withClaimName(claimName)

"claimName is the name of a PersistentVolumeClaim in the same namespace as the pod using this volume. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims"

fn persistentVolumeClaim.withReadOnly

withReadOnly(readOnly)

"readOnly Will force the ReadOnly setting in VolumeMounts. Default false."

obj photonPersistentDisk

"Represents a Photon Controller persistent disk resource."

fn photonPersistentDisk.withFsType

withFsType(fsType)

"fsType is the 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."

fn photonPersistentDisk.withPdID

withPdID(pdID)

"pdID is the ID that identifies Photon Controller persistent disk"

obj portworxVolume

"PortworxVolumeSource represents a Portworx volume resource."

fn 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."

fn portworxVolume.withReadOnly

withReadOnly(readOnly)

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

fn portworxVolume.withVolumeID

withVolumeID(volumeID)

"volumeID uniquely identifies a Portworx volume"

obj projected

"Represents a projected volume source"

fn projected.withDefaultMode

withDefaultMode(defaultMode)

"defaultMode are the mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. 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."

fn projected.withSources

withSources(sources)

"sources is the list of volume projections"

fn projected.withSourcesMixin

withSourcesMixin(sources)

"sources is the list of volume projections"

Note: This function appends passed data to existing values

obj quobyte

"Represents a Quobyte mount that lasts the lifetime of a pod. Quobyte volumes do not support ownership management or SELinux relabeling."

fn quobyte.withGroup

withGroup(group)

"group to map volume access to Default is no group"

fn quobyte.withReadOnly

withReadOnly(readOnly)

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

fn quobyte.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"

fn quobyte.withTenant

withTenant(tenant)

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

fn quobyte.withUser

withUser(user)

"user to map volume access to Defaults to serivceaccount user"

fn quobyte.withVolume

withVolume(volume)

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

obj rbd

"Represents a Rados Block Device mount that lasts the lifetime of a pod. RBD volumes support ownership management and SELinux relabeling."

fn rbd.withFsType

withFsType(fsType)

"fsType is the 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#rbd"

fn rbd.withImage

withImage(image)

"image is the rados image name. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it"

fn rbd.withKeyring

withKeyring(keyring)

"keyring is the path to key ring for RBDUser. Default is /etc/ceph/keyring. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it"

fn rbd.withMonitors

withMonitors(monitors)

"monitors is a collection of Ceph monitors. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it"

fn rbd.withMonitorsMixin

withMonitorsMixin(monitors)

"monitors is a collection of Ceph monitors. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it"

Note: This function appends passed data to existing values

fn rbd.withPool

withPool(pool)

"pool is the rados pool name. Default is rbd. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it"

fn rbd.withReadOnly

withReadOnly(readOnly)

"readOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it"

fn rbd.withUser

withUser(user)

"user is the rados user name. Default is admin. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it"

obj rbd.secretRef

"LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace."

fn rbd.secretRef.withName

withName(name)

"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names"

obj scaleIO

"ScaleIOVolumeSource represents a persistent ScaleIO volume"

fn scaleIO.withFsType

withFsType(fsType)

"fsType is the filesystem type to mount. Must be a filesystem type supported by the host operating system. Ex. \"ext4\", \"xfs\", \"ntfs\". Default is \"xfs\"."

fn scaleIO.withGateway

withGateway(gateway)

"gateway is the host address of the ScaleIO API Gateway."

fn scaleIO.withProtectionDomain

withProtectionDomain(protectionDomain)

"protectionDomain is the name of the ScaleIO Protection Domain for the configured storage."

fn scaleIO.withReadOnly

withReadOnly(readOnly)

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

fn scaleIO.withSslEnabled

withSslEnabled(sslEnabled)

"sslEnabled Flag enable/disable SSL communication with Gateway, default false"

fn scaleIO.withStorageMode

withStorageMode(storageMode)

"storageMode indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned. Default is ThinProvisioned."

fn scaleIO.withStoragePool

withStoragePool(storagePool)

"storagePool is the ScaleIO Storage Pool associated with the protection domain."

fn scaleIO.withSystem

withSystem(system)

"system is the name of the storage system as configured in ScaleIO."

fn scaleIO.withVolumeName

withVolumeName(volumeName)

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

obj scaleIO.secretRef

"LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace."

fn scaleIO.secretRef.withName

withName(name)

"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names"

obj secret

"Adapts a Secret into a volume.\n\nThe contents of the target Secret's Data field will be presented in a volume as files using the keys in the Data field as the file names. Secret volumes support ownership management and SELinux relabeling."

fn secret.withDefaultMode

withDefaultMode(defaultMode)

"defaultMode is Optional: mode bits used to set permissions on created files by default. Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511. YAML accepts both octal and decimal values, JSON requires decimal values for mode bits. 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."

fn secret.withItems

withItems(items)

"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 '..'."

fn secret.withItemsMixin

withItemsMixin(items)

"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 '..'."

Note: This function appends passed data to existing values

fn secret.withOptional

withOptional(optional)

"optional field specify whether the Secret or its keys must be defined"

fn secret.withSecretName

withSecretName(secretName)

"secretName is the name of the secret in the pod's namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret"

obj storageos

"Represents a StorageOS persistent volume resource."

fn storageos.withFsType

withFsType(fsType)

"fsType is the 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."

fn storageos.withReadOnly

withReadOnly(readOnly)

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

fn storageos.withVolumeName

withVolumeName(volumeName)

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

fn storageos.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."

obj storageos.secretRef

"LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace."

fn storageos.secretRef.withName

withName(name)

"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names"

obj vsphereVolume

"Represents a vSphere volume resource."

fn vsphereVolume.withFsType

withFsType(fsType)

"fsType is 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."

fn vsphereVolume.withStoragePolicyID

withStoragePolicyID(storagePolicyID)

"storagePolicyID is the storage Policy Based Management (SPBM) profile ID associated with the StoragePolicyName."

fn vsphereVolume.withStoragePolicyName

withStoragePolicyName(storagePolicyName)

"storagePolicyName is the storage Policy Based Management (SPBM) profile name."

fn vsphereVolume.withVolumePath

withVolumePath(volumePath)

"volumePath is the path that identifies vSphere volume vmdk"