Skip to content

monitoring.v1alpha1.integration

"Integration runs a single Grafana Agent integration. Integrations that generate telemetry must be configured to send that telemetry somewhere; such as autoscrape for exporter-based integrations. \n Integrations have access to the LogsInstances and MetricsInstances in the same GrafanaAgent resource set, referenced by the / of the *Instance resource. \n For example, if there is a default/production MetricsInstance, you can configure a supported integration's autoscrape block with: \n autoscrape: enable: true metrics_instance: default/production \n There is currently no way for telemetry created by an Operator-managed integration to be collected from outside of the integration itself."

Index

Fields

fn new

new(name)

new returns an instance of Integration

obj metadata

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

fn 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: http://kubernetes.io/docs/user-guide/annotations"

fn 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: http://kubernetes.io/docs/user-guide/annotations"

Note: This function appends passed data to existing values

fn metadata.withClusterName

withClusterName(clusterName)

"The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request."

fn 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 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 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 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 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 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 NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header).\n\nApplied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#idempotency"

fn metadata.withGeneration

withGeneration(generation)

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

fn 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: http://kubernetes.io/docs/user-guide/labels"

fn 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: http://kubernetes.io/docs/user-guide/labels"

Note: This function appends passed data to existing values

fn 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: http://kubernetes.io/docs/user-guide/identifiers#names"

fn 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: http://kubernetes.io/docs/user-guide/namespaces"

fn 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 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 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)

"SelfLink is a URL representing this object. Populated by the system. Read-only.\n\nDEPRECATED Kubernetes will stop propagating this field in 1.20 release and the field is planned to be removed in 1.21 release."

fn 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: http://kubernetes.io/docs/user-guide/identifiers#uids"

obj spec

"Specifies the desired behavior of the Integration."

fn spec.withConfig

withConfig(config)

"The configuration for the named integration. Note that integrations are deployed with the integrations-next feature flag, which has different common settings: \n https://grafana.com/docs/agent/latest/configuration/integrations/integrations-next/"

fn spec.withConfigMaps

withConfigMaps(configMaps)

"An extra list of keys from ConfigMaps in the same namespace as the Integration which will be mounted into the Grafana Agent pod running this integration. \n ConfigMaps will be mounted at /etc/grafana-agent/integrations/configMaps///."

fn spec.withConfigMapsMixin

withConfigMapsMixin(configMaps)

"An extra list of keys from ConfigMaps in the same namespace as the Integration which will be mounted into the Grafana Agent pod running this integration. \n ConfigMaps will be mounted at /etc/grafana-agent/integrations/configMaps///."

Note: This function appends passed data to existing values

fn spec.withConfigMixin

withConfigMixin(config)

"The configuration for the named integration. Note that integrations are deployed with the integrations-next feature flag, which has different common settings: \n https://grafana.com/docs/agent/latest/configuration/integrations/integrations-next/"

Note: This function appends passed data to existing values

fn spec.withName

withName(name)

"Name of the integration to run (e.g., \"node_exporter\", \"mysqld_exporter\")."

fn spec.withSecrets

withSecrets(secrets)

"An extra list of keys from Secrets in the same namespace as the Integration which will be mounted into the Grafana Agent pod running this integration. \n Secrets will be mounted at /etc/grafana-agent/integrations/secrets///."

fn spec.withSecretsMixin

withSecretsMixin(secrets)

"An extra list of keys from Secrets in the same namespace as the Integration which will be mounted into the Grafana Agent pod running this integration. \n Secrets will be mounted at /etc/grafana-agent/integrations/secrets///."

Note: This function appends passed data to existing values

fn spec.withVolumeMounts

withVolumeMounts(volumeMounts)

"An extra list of VolumeMounts to be associated with the Grafana Agent pods running this integration. VolumeMount names will be mutated to be unique across all used IntegrationSpecs. \n Mount paths should include the namespace/name of the Integration CR to avoid potentially colliding with other resources."

fn spec.withVolumeMountsMixin

withVolumeMountsMixin(volumeMounts)

"An extra list of VolumeMounts to be associated with the Grafana Agent pods running this integration. VolumeMount names will be mutated to be unique across all used IntegrationSpecs. \n Mount paths should include the namespace/name of the Integration CR to avoid potentially colliding with other resources."

Note: This function appends passed data to existing values

fn spec.withVolumes

withVolumes(volumes)

"An extra list of Volumes to be associated with the Grafana Agent pods running this integration. Volume names will be mutated to be unique across all Integrations. Note that the specified volumes should be able to tolerate existing on multiple pods at once when type is daemonset. \n Don't use volumes for loading secrets/configMaps from the same namespace as the Integration; use the secrets and configMaps fields instead."

fn spec.withVolumesMixin

withVolumesMixin(volumes)

"An extra list of Volumes to be associated with the Grafana Agent pods running this integration. Volume names will be mutated to be unique across all Integrations. Note that the specified volumes should be able to tolerate existing on multiple pods at once when type is daemonset. \n Don't use volumes for loading secrets/configMaps from the same namespace as the Integration; use the secrets and configMaps fields instead."

Note: This function appends passed data to existing values

obj spec.configMaps

"An extra list of keys from ConfigMaps in the same namespace as the Integration which will be mounted into the Grafana Agent pod running this integration. \n ConfigMaps will be mounted at /etc/grafana-agent/integrations/configMaps///."

fn spec.configMaps.withKey

withKey(key)

"The key to select."

fn spec.configMaps.withName

withName(name)

"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?"

fn spec.configMaps.withOptional

withOptional(optional)

"Specify whether the ConfigMap or its key must be defined"

obj spec.secrets

"An extra list of keys from Secrets in the same namespace as the Integration which will be mounted into the Grafana Agent pod running this integration. \n Secrets will be mounted at /etc/grafana-agent/integrations/secrets///."

fn spec.secrets.withKey

withKey(key)

"The key of the secret to select from. Must be a valid secret key."

fn spec.secrets.withName

withName(name)

"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?"

fn spec.secrets.withOptional

withOptional(optional)

"Specify whether the Secret or its key must be defined"

obj spec.type

"Type informs Grafana Agent Operator how to manage the integration being configured."

fn spec.type.withAllNodes

withAllNodes(allNodes)

"When true, the configured integration should be run on every Node in the cluster. This is required for integrations that generate Node-specific metrics like node_exporter, otherwise it must be false to avoid generating duplicate metrics."

fn spec.type.withUnique

withUnique(unique)

"Whether this integration can only be defined once for a Grafana Agent process, such as statsd_exporter. It is invalid for a GrafanaAgent to discover multiple unique Integrations with the same integration name (i.e., a single GrafanaAgent cannot deploy two statsd_exporters)."

obj spec.volumeMounts

"An extra list of VolumeMounts to be associated with the Grafana Agent pods running this integration. VolumeMount names will be mutated to be unique across all used IntegrationSpecs. \n Mount paths should include the namespace/name of the Integration CR to avoid potentially colliding with other resources."

fn spec.volumeMounts.withMountPath

withMountPath(mountPath)

"Path within the container at which the volume should be mounted. Must not contain ':'."

fn spec.volumeMounts.withMountPropagation

withMountPropagation(mountPropagation)

"mountPropagation determines how mounts are propagated from the host to container and the other way around. When not set, MountPropagationNone is used. This field is beta in 1.10."

fn spec.volumeMounts.withName

withName(name)

"This must match the Name of a Volume."

fn spec.volumeMounts.withReadOnly

withReadOnly(readOnly)

"Mounted read-only if true, read-write otherwise (false or unspecified). Defaults to false."

fn spec.volumeMounts.withSubPath

withSubPath(subPath)

"Path within the volume from which the container's volume should be mounted. Defaults to \"\" (volume's root)."

fn spec.volumeMounts.withSubPathExpr

withSubPathExpr(subPathExpr)

"Expanded path within the volume from which the container's volume should be mounted. Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. Defaults to \"\" (volume's root). SubPathExpr and SubPath are mutually exclusive."

obj spec.volumes

"An extra list of Volumes to be associated with the Grafana Agent pods running this integration. Volume names will be mutated to be unique across all Integrations. Note that the specified volumes should be able to tolerate existing on multiple pods at once when type is daemonset. \n Don't use volumes for loading secrets/configMaps from the same namespace as the Integration; use the secrets and configMaps fields instead."

fn spec.volumes.withName

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

obj spec.volumes.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"

fn spec.volumes.awsElasticBlockStore.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#awselasticblockstore TODO: how do we prevent errors in the filesystem from compromising the machine"

fn spec.volumes.awsElasticBlockStore.withPartition

withPartition(partition)

"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 spec.volumes.awsElasticBlockStore.withReadOnly

withReadOnly(readOnly)

"Specify \"true\" to force and set the ReadOnly property in VolumeMounts to \"true\". If omitted, the default is \"false\". More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore"

fn spec.volumes.awsElasticBlockStore.withVolumeID

withVolumeID(volumeID)

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

obj spec.volumes.azureDisk

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

fn spec.volumes.azureDisk.withCachingMode

withCachingMode(cachingMode)

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

fn spec.volumes.azureDisk.withDiskName

withDiskName(diskName)

"The Name of the data disk in the blob storage"

fn spec.volumes.azureDisk.withDiskURI

withDiskURI(diskURI)

"The URI the data disk in the blob storage"

fn spec.volumes.azureDisk.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."

fn spec.volumes.azureDisk.withKind

withKind(kind)

"Expected values 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 spec.volumes.azureDisk.withReadOnly

withReadOnly(readOnly)

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

obj spec.volumes.azureFile

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

fn spec.volumes.azureFile.withReadOnly

withReadOnly(readOnly)

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

fn spec.volumes.azureFile.withSecretName

withSecretName(secretName)

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

fn spec.volumes.azureFile.withShareName

withShareName(shareName)

"Share Name"

obj spec.volumes.cephfs

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

fn spec.volumes.cephfs.withMonitors

withMonitors(monitors)

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

fn spec.volumes.cephfs.withMonitorsMixin

withMonitorsMixin(monitors)

"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 spec.volumes.cephfs.withPath

withPath(path)

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

fn spec.volumes.cephfs.withReadOnly

withReadOnly(readOnly)

"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 spec.volumes.cephfs.withSecretFile

withSecretFile(secretFile)

"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 spec.volumes.cephfs.withUser

withUser(user)

"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 spec.volumes.cephfs.secretRef

"Optional: SecretRef is reference to the authentication secret for User, default is empty. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it"

fn spec.volumes.cephfs.secretRef.withName

withName(name)

"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?"

obj spec.volumes.cinder

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

fn spec.volumes.cinder.withFsType

withFsType(fsType)

"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 spec.volumes.cinder.withReadOnly

withReadOnly(readOnly)

"Optional: 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 spec.volumes.cinder.withVolumeID

withVolumeID(volumeID)

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

obj spec.volumes.cinder.secretRef

"Optional: points to a secret object containing parameters used to connect to OpenStack."

fn spec.volumes.cinder.secretRef.withName

withName(name)

"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?"

obj spec.volumes.configMap

"ConfigMap represents a configMap that should populate this volume"

fn spec.volumes.configMap.withDefaultMode

withDefaultMode(defaultMode)

"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 spec.volumes.configMap.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 '..'."

fn spec.volumes.configMap.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 '..'."

Note: This function appends passed data to existing values

fn spec.volumes.configMap.withName

withName(name)

"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?"

fn spec.volumes.configMap.withOptional

withOptional(optional)

"Specify whether the ConfigMap or its keys must be defined"

obj spec.volumes.configMap.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 spec.volumes.configMap.items.withKey

withKey(key)

"The key to project."

fn spec.volumes.configMap.items.withMode

withMode(mode)

"Optional: mode bits used to set permissions on this file. 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. If not specified, the volume defaultMode will be used. 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 spec.volumes.configMap.items.withPath

withPath(path)

"The relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'."

obj spec.volumes.csi

"CSI (Container Storage Interface) represents ephemeral storage that is handled by certain external CSI drivers (Beta feature)."

fn spec.volumes.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 spec.volumes.csi.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."

fn spec.volumes.csi.withReadOnly

withReadOnly(readOnly)

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

fn spec.volumes.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 spec.volumes.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 spec.volumes.csi.nodePublishSecretRef

"NodePublishSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodePublishVolume and NodeUnpublishVolume calls. This field is optional, and may be empty if no secret is required. If the secret object contains more than one secret, all secret references are passed."

fn spec.volumes.csi.nodePublishSecretRef.withName

withName(name)

"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?"

obj spec.volumes.downwardAPI

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

fn spec.volumes.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 spec.volumes.downwardAPI.withItems

withItems(items)

"Items is a list of downward API volume file"

fn spec.volumes.downwardAPI.withItemsMixin

withItemsMixin(items)

"Items is a list of downward API volume file"

Note: This function appends passed data to existing values

obj spec.volumes.downwardAPI.items

"Items is a list of downward API volume file"

fn spec.volumes.downwardAPI.items.withMode

withMode(mode)

"Optional: mode bits used to set permissions on this file, 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. If not specified, the volume defaultMode will be used. 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 spec.volumes.downwardAPI.items.withPath

withPath(path)

"Required: Path is the relative path name of the file to be created. Must not be absolute or contain the '..' path. Must be utf-8 encoded. The first item of the relative path must not start with '..'"

obj spec.volumes.downwardAPI.items.fieldRef

"Required: Selects a field of the pod: only annotations, labels, name and namespace are supported."

fn spec.volumes.downwardAPI.items.fieldRef.withApiVersion

withApiVersion(apiVersion)

"Version of the schema the FieldPath is written in terms of, defaults to \"v1\"."

fn spec.volumes.downwardAPI.items.fieldRef.withFieldPath

withFieldPath(fieldPath)

"Path of the field to select in the specified API version."

obj spec.volumes.downwardAPI.items.resourceFieldRef

"Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported."

fn spec.volumes.downwardAPI.items.resourceFieldRef.withContainerName

withContainerName(containerName)

"Container name: required for volumes, optional for env vars"

fn spec.volumes.downwardAPI.items.resourceFieldRef.withDivisor

withDivisor(divisor)

"Specifies the output format of the exposed resources, defaults to \"1\

fn spec.volumes.downwardAPI.items.resourceFieldRef.withResource

withResource(resource)

"Required: resource to select"

obj spec.volumes.emptyDir

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

fn spec.volumes.emptyDir.withMedium

withMedium(medium)

"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 spec.volumes.emptyDir.withSizeLimit

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

obj spec.volumes.ephemeral

"Ephemeral represents a volume that is handled by a cluster storage driver. The volume's lifecycle is tied to the pod that defines it - it will be created before the pod starts, and deleted when the pod is removed. \n Use this if: a) the volume is only needed while the pod runs, b) features of normal volumes like restoring from snapshot or capacity tracking are needed, c) the storage driver is specified through a storage class, and d) the storage driver supports dynamic volume provisioning through a PersistentVolumeClaim (see EphemeralVolumeSource for more information on the connection between this volume type and PersistentVolumeClaim). \n Use PersistentVolumeClaim or one of the vendor-specific APIs for volumes that persist for longer than the lifecycle of an individual pod. \n Use CSI for light-weight local ephemeral volumes if the CSI driver is meant to be used that way - see the documentation of the driver for more information. \n A pod can use both types of ephemeral volumes and persistent volumes at the same time."

obj spec.volumes.ephemeral.volumeClaimTemplate

"Will be used to create a stand-alone PVC to provision the volume. The pod in which this EphemeralVolumeSource is embedded will be the owner of the PVC, i.e. the PVC will be deleted together with the pod. The name of the PVC will be <pod name>-<volume name> where <volume name> is the name from the PodSpec.Volumes array entry. Pod validation will reject the pod if the concatenated name is not valid for a PVC (for example, too long). \n An existing PVC with that name that is not owned by the pod will not be used for the pod to avoid using an unrelated volume by mistake. Starting the pod is then blocked until the unrelated PVC is removed. If such a pre-created PVC is meant to be used by the pod, the PVC has to updated with an owner reference to the pod once the pod exists. Normally this should not be necessary, but it may be useful when manually reconstructing a broken cluster. \n This field is read-only and no changes will be made by Kubernetes to the PVC after it has been created. \n Required, must not be nil."

fn spec.volumes.ephemeral.volumeClaimTemplate.withMetadata

withMetadata(metadata)

"May contain labels and annotations that will be copied into the PVC when creating it. No other fields are allowed and will be rejected during validation."

fn spec.volumes.ephemeral.volumeClaimTemplate.withMetadataMixin

withMetadataMixin(metadata)

"May contain labels and annotations that will be copied into the PVC when creating it. No other fields are allowed and will be rejected during validation."

Note: This function appends passed data to existing values

obj spec.volumes.ephemeral.volumeClaimTemplate.spec

"The specification for the PersistentVolumeClaim. The entire content is copied unchanged into the PVC that gets created from this template. The same fields as in a PersistentVolumeClaim are also valid here."

fn spec.volumes.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 spec.volumes.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 spec.volumes.ephemeral.volumeClaimTemplate.spec.withStorageClassName

withStorageClassName(storageClassName)

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

fn spec.volumes.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 spec.volumes.ephemeral.volumeClaimTemplate.spec.withVolumeName

withVolumeName(volumeName)

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

obj spec.volumes.ephemeral.volumeClaimTemplate.spec.dataSource

"This field can be used to specify either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) * An existing PVC (PersistentVolumeClaim) If the provisioner or an external controller can support the specified data source, it will create a new volume based on the contents of the specified data source. If the AnyVolumeDataSource feature gate is enabled, this field will always have the same contents as the DataSourceRef field."

fn spec.volumes.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 spec.volumes.ephemeral.volumeClaimTemplate.spec.dataSource.withKind

withKind(kind)

"Kind is the type of resource being referenced"

fn spec.volumes.ephemeral.volumeClaimTemplate.spec.dataSource.withName

withName(name)

"Name is the name of resource being referenced"

obj spec.volumes.ephemeral.volumeClaimTemplate.spec.dataSourceRef

"Specifies the object from which to populate the volume with data, if a non-empty volume is desired. This may be any local object from a non-empty API group (non core object) or a PersistentVolumeClaim object. When this field is specified, volume binding will only succeed if the type of the specified object matches some installed volume populator or dynamic provisioner. This field will replace the functionality of the DataSource field and as such if both fields are non-empty, they must have the same value. For backwards compatibility, both fields (DataSource and DataSourceRef) will be set to the same value automatically if one of them is empty and the other is non-empty. There are two important differences between DataSource and DataSourceRef: * While DataSource only allows two specific types of objects, DataSourceRef allows any non-core object, as well as PersistentVolumeClaim objects. * While DataSource ignores disallowed values (dropping them), DataSourceRef preserves all values, and generates an error if a disallowed value is specified. (Alpha) Using this field requires the AnyVolumeDataSource feature gate to be enabled."

fn spec.volumes.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 spec.volumes.ephemeral.volumeClaimTemplate.spec.dataSourceRef.withKind

withKind(kind)

"Kind is the type of resource being referenced"

fn spec.volumes.ephemeral.volumeClaimTemplate.spec.dataSourceRef.withName

withName(name)

"Name is the name of resource being referenced"

obj spec.volumes.ephemeral.volumeClaimTemplate.spec.resources

"Resources represents the minimum resources the volume should have. If RecoverVolumeExpansionFailure feature is enabled users are allowed to specify resource requirements that are lower than previous value but must still be higher than capacity recorded in the status field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources"

fn spec.volumes.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 spec.volumes.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 spec.volumes.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. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/"

fn spec.volumes.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. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/"

Note: This function appends passed data to existing values

obj spec.volumes.ephemeral.volumeClaimTemplate.spec.selector

"A label query over volumes to consider for binding."

fn spec.volumes.ephemeral.volumeClaimTemplate.spec.selector.withMatchExpressions

withMatchExpressions(matchExpressions)

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

fn spec.volumes.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 spec.volumes.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 spec.volumes.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 spec.volumes.ephemeral.volumeClaimTemplate.spec.selector.matchExpressions

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

fn spec.volumes.ephemeral.volumeClaimTemplate.spec.selector.matchExpressions.withKey

withKey(key)

"key is the label key that the selector applies to."

fn spec.volumes.ephemeral.volumeClaimTemplate.spec.selector.matchExpressions.withOperator

withOperator(operator)

"operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist."

fn spec.volumes.ephemeral.volumeClaimTemplate.spec.selector.matchExpressions.withValues

withValues(values)

"values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch."

fn spec.volumes.ephemeral.volumeClaimTemplate.spec.selector.matchExpressions.withValuesMixin

withValuesMixin(values)

"values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch."

Note: This function appends passed data to existing values

obj spec.volumes.fc

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

fn spec.volumes.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. TODO: how do we prevent errors in the filesystem from compromising the machine"

fn spec.volumes.fc.withLun

withLun(lun)

"Optional: FC target lun number"

fn spec.volumes.fc.withReadOnly

withReadOnly(readOnly)

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

fn spec.volumes.fc.withTargetWWNs

withTargetWWNs(targetWWNs)

"Optional: FC target worldwide names (WWNs)"

fn spec.volumes.fc.withTargetWWNsMixin

withTargetWWNsMixin(targetWWNs)

"Optional: FC target worldwide names (WWNs)"

Note: This function appends passed data to existing values

fn spec.volumes.fc.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."

fn spec.volumes.fc.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."

Note: This function appends passed data to existing values

obj spec.volumes.flexVolume

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

fn spec.volumes.flexVolume.withDriver

withDriver(driver)

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

fn spec.volumes.flexVolume.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."

fn spec.volumes.flexVolume.withOptions

withOptions(options)

"Optional: Extra command options if any."

fn spec.volumes.flexVolume.withOptionsMixin

withOptionsMixin(options)

"Optional: Extra command options if any."

Note: This function appends passed data to existing values

fn spec.volumes.flexVolume.withReadOnly

withReadOnly(readOnly)

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

obj spec.volumes.flexVolume.secretRef

"Optional: SecretRef is reference to the secret object containing sensitive information to pass to the plugin scripts. This may be empty if no secret object is specified. If the secret object contains more than one secret, all secrets are passed to the plugin scripts."

fn spec.volumes.flexVolume.secretRef.withName

withName(name)

"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?"

obj spec.volumes.flocker

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

fn spec.volumes.flocker.withDatasetName

withDatasetName(datasetName)

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

fn spec.volumes.flocker.withDatasetUUID

withDatasetUUID(datasetUUID)

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

obj spec.volumes.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"

fn spec.volumes.gcePersistentDisk.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#gcepersistentdisk TODO: how do we prevent errors in the filesystem from compromising the machine"

fn spec.volumes.gcePersistentDisk.withPartition

withPartition(partition)

"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 spec.volumes.gcePersistentDisk.withPdName

withPdName(pdName)

"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 spec.volumes.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 spec.volumes.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."

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

fn spec.volumes.gitRepo.withRepository

withRepository(repository)

"Repository URL"

fn spec.volumes.gitRepo.withRevision

withRevision(revision)

"Commit hash for the specified revision."

obj spec.volumes.glusterfs

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

fn spec.volumes.glusterfs.withEndpoints

withEndpoints(endpoints)

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

fn spec.volumes.glusterfs.withPath

withPath(path)

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

fn spec.volumes.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 spec.volumes.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 --- TODO(jonesdl) We need to restrict who can use host directory mounts and who can/can not mount host directories as read/write."

fn spec.volumes.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 spec.volumes.hostPath.withType

withType(type)

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

obj spec.volumes.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://examples.k8s.io/volumes/iscsi/README.md"

fn spec.volumes.iscsi.withChapAuthDiscovery

withChapAuthDiscovery(chapAuthDiscovery)

"whether support iSCSI Discovery CHAP authentication"

fn spec.volumes.iscsi.withChapAuthSession

withChapAuthSession(chapAuthSession)

"whether support iSCSI Session CHAP authentication"

fn spec.volumes.iscsi.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 TODO: how do we prevent errors in the filesystem from compromising the machine"

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

fn spec.volumes.iscsi.withIqn

withIqn(iqn)

"Target iSCSI Qualified Name."

fn spec.volumes.iscsi.withIscsiInterface

withIscsiInterface(iscsiInterface)

"iSCSI Interface Name that uses an iSCSI transport. Defaults to 'default' (tcp)."

fn spec.volumes.iscsi.withLun

withLun(lun)

"iSCSI Target Lun number."

fn spec.volumes.iscsi.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)."

fn spec.volumes.iscsi.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)."

Note: This function appends passed data to existing values

fn spec.volumes.iscsi.withReadOnly

withReadOnly(readOnly)

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

fn spec.volumes.iscsi.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)."

obj spec.volumes.iscsi.secretRef

"CHAP Secret for iSCSI target and initiator authentication"

fn spec.volumes.iscsi.secretRef.withName

withName(name)

"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?"

obj spec.volumes.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"

fn spec.volumes.nfs.withPath

withPath(path)

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

fn spec.volumes.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 spec.volumes.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 spec.volumes.persistentVolumeClaim

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

fn spec.volumes.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 spec.volumes.persistentVolumeClaim.withReadOnly

withReadOnly(readOnly)

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

obj spec.volumes.photonPersistentDisk

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

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

fn spec.volumes.photonPersistentDisk.withPdID

withPdID(pdID)

"ID that identifies Photon Controller persistent disk"

obj spec.volumes.portworxVolume

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

fn spec.volumes.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 spec.volumes.portworxVolume.withReadOnly

withReadOnly(readOnly)

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

fn spec.volumes.portworxVolume.withVolumeID

withVolumeID(volumeID)

"VolumeID uniquely identifies a Portworx volume"

obj spec.volumes.projected

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

fn spec.volumes.projected.withDefaultMode

withDefaultMode(defaultMode)

"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 spec.volumes.projected.withSources

withSources(sources)

"list of volume projections"

fn spec.volumes.projected.withSourcesMixin

withSourcesMixin(sources)

"list of volume projections"

Note: This function appends passed data to existing values

obj spec.volumes.projected.sources

"list of volume projections"

obj spec.volumes.projected.sources.configMap

"information about the configMap data to project"

fn spec.volumes.projected.sources.configMap.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 '..'."

fn spec.volumes.projected.sources.configMap.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 '..'."

Note: This function appends passed data to existing values

fn spec.volumes.projected.sources.configMap.withName

withName(name)

"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?"

fn spec.volumes.projected.sources.configMap.withOptional

withOptional(optional)

"Specify whether the ConfigMap or its keys must be defined"

obj spec.volumes.projected.sources.configMap.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 spec.volumes.projected.sources.configMap.items.withKey

withKey(key)

"The key to project."

fn spec.volumes.projected.sources.configMap.items.withMode

withMode(mode)

"Optional: mode bits used to set permissions on this file. 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. If not specified, the volume defaultMode will be used. 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 spec.volumes.projected.sources.configMap.items.withPath

withPath(path)

"The relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'."

obj spec.volumes.projected.sources.downwardAPI

"information about the downwardAPI data to project"

fn spec.volumes.projected.sources.downwardAPI.withItems

withItems(items)

"Items is a list of DownwardAPIVolume file"

fn spec.volumes.projected.sources.downwardAPI.withItemsMixin

withItemsMixin(items)

"Items is a list of DownwardAPIVolume file"

Note: This function appends passed data to existing values

obj spec.volumes.projected.sources.downwardAPI.items

"Items is a list of DownwardAPIVolume file"

fn spec.volumes.projected.sources.downwardAPI.items.withMode

withMode(mode)

"Optional: mode bits used to set permissions on this file, 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. If not specified, the volume defaultMode will be used. 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 spec.volumes.projected.sources.downwardAPI.items.withPath

withPath(path)

"Required: Path is the relative path name of the file to be created. Must not be absolute or contain the '..' path. Must be utf-8 encoded. The first item of the relative path must not start with '..'"

obj spec.volumes.projected.sources.downwardAPI.items.fieldRef

"Required: Selects a field of the pod: only annotations, labels, name and namespace are supported."

fn spec.volumes.projected.sources.downwardAPI.items.fieldRef.withApiVersion

withApiVersion(apiVersion)

"Version of the schema the FieldPath is written in terms of, defaults to \"v1\"."

fn spec.volumes.projected.sources.downwardAPI.items.fieldRef.withFieldPath

withFieldPath(fieldPath)

"Path of the field to select in the specified API version."

obj spec.volumes.projected.sources.downwardAPI.items.resourceFieldRef

"Selects a resource of the container: only resources limits and requests (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported."

fn spec.volumes.projected.sources.downwardAPI.items.resourceFieldRef.withContainerName

withContainerName(containerName)

"Container name: required for volumes, optional for env vars"

fn spec.volumes.projected.sources.downwardAPI.items.resourceFieldRef.withDivisor

withDivisor(divisor)

"Specifies the output format of the exposed resources, defaults to \"1\

fn spec.volumes.projected.sources.downwardAPI.items.resourceFieldRef.withResource

withResource(resource)

"Required: resource to select"

obj spec.volumes.projected.sources.secret

"information about the secret data to project"

fn spec.volumes.projected.sources.secret.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 '..'."

fn spec.volumes.projected.sources.secret.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 '..'."

Note: This function appends passed data to existing values

fn spec.volumes.projected.sources.secret.withName

withName(name)

"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?"

fn spec.volumes.projected.sources.secret.withOptional

withOptional(optional)

"Specify whether the Secret or its key must be defined"

obj spec.volumes.projected.sources.secret.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 spec.volumes.projected.sources.secret.items.withKey

withKey(key)

"The key to project."

fn spec.volumes.projected.sources.secret.items.withMode

withMode(mode)

"Optional: mode bits used to set permissions on this file. 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. If not specified, the volume defaultMode will be used. 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 spec.volumes.projected.sources.secret.items.withPath

withPath(path)

"The relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'."

obj spec.volumes.projected.sources.serviceAccountToken

"information about the serviceAccountToken data to project"

fn spec.volumes.projected.sources.serviceAccountToken.withAudience

withAudience(audience)

"Audience is the intended audience of the token. A recipient of a token must identify itself with an identifier specified in the audience of the token, and otherwise should reject the token. The audience defaults to the identifier of the apiserver."

fn spec.volumes.projected.sources.serviceAccountToken.withExpirationSeconds

withExpirationSeconds(expirationSeconds)

"ExpirationSeconds is the requested duration of validity of the service account token. As the token approaches expiration, the kubelet volume plugin will proactively rotate the service account token. The kubelet will start trying to rotate the token if the token is older than 80 percent of its time to live or if the token is older than 24 hours.Defaults to 1 hour and must be at least 10 minutes."

fn spec.volumes.projected.sources.serviceAccountToken.withPath

withPath(path)

"Path is the path relative to the mount point of the file to project the token into."

obj spec.volumes.quobyte

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

fn spec.volumes.quobyte.withGroup

withGroup(group)

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

fn spec.volumes.quobyte.withReadOnly

withReadOnly(readOnly)

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

fn spec.volumes.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 spec.volumes.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 spec.volumes.quobyte.withUser

withUser(user)

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

fn spec.volumes.quobyte.withVolume

withVolume(volume)

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

obj spec.volumes.rbd

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

fn spec.volumes.rbd.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#rbd TODO: how do we prevent errors in the filesystem from compromising the machine"

fn spec.volumes.rbd.withImage

withImage(image)

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

fn spec.volumes.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 spec.volumes.rbd.withMonitors

withMonitors(monitors)

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

fn spec.volumes.rbd.withMonitorsMixin

withMonitorsMixin(monitors)

"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 spec.volumes.rbd.withPool

withPool(pool)

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

fn spec.volumes.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 spec.volumes.rbd.withUser

withUser(user)

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

obj spec.volumes.rbd.secretRef

"SecretRef is name of the authentication secret for RBDUser. If provided overrides keyring. Default is nil. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it"

fn spec.volumes.rbd.secretRef.withName

withName(name)

"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?"

obj spec.volumes.scaleIO

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

fn spec.volumes.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\"."

fn spec.volumes.scaleIO.withGateway

withGateway(gateway)

"The host address of the ScaleIO API Gateway."

fn spec.volumes.scaleIO.withProtectionDomain

withProtectionDomain(protectionDomain)

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

fn spec.volumes.scaleIO.withReadOnly

withReadOnly(readOnly)

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

fn spec.volumes.scaleIO.withSslEnabled

withSslEnabled(sslEnabled)

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

fn spec.volumes.scaleIO.withStorageMode

withStorageMode(storageMode)

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

fn spec.volumes.scaleIO.withStoragePool

withStoragePool(storagePool)

"The ScaleIO Storage Pool associated with the protection domain."

fn spec.volumes.scaleIO.withSystem

withSystem(system)

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

fn spec.volumes.scaleIO.withVolumeName

withVolumeName(volumeName)

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

obj spec.volumes.scaleIO.secretRef

"SecretRef references to the secret for ScaleIO user and other sensitive information. If this is not provided, Login operation will fail."

fn spec.volumes.scaleIO.secretRef.withName

withName(name)

"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?"

obj spec.volumes.secret

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

fn spec.volumes.secret.withDefaultMode

withDefaultMode(defaultMode)

"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 spec.volumes.secret.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 '..'."

fn spec.volumes.secret.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 '..'."

Note: This function appends passed data to existing values

fn spec.volumes.secret.withOptional

withOptional(optional)

"Specify whether the Secret or its keys must be defined"

fn spec.volumes.secret.withSecretName

withSecretName(secretName)

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

obj spec.volumes.secret.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 spec.volumes.secret.items.withKey

withKey(key)

"The key to project."

fn spec.volumes.secret.items.withMode

withMode(mode)

"Optional: mode bits used to set permissions on this file. 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. If not specified, the volume defaultMode will be used. 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 spec.volumes.secret.items.withPath

withPath(path)

"The relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'."

obj spec.volumes.storageos

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

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

fn spec.volumes.storageos.withReadOnly

withReadOnly(readOnly)

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

fn spec.volumes.storageos.withVolumeName

withVolumeName(volumeName)

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

fn spec.volumes.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 spec.volumes.storageos.secretRef

"SecretRef specifies the secret to use for obtaining the StorageOS API credentials. If not specified, default values will be attempted."

fn spec.volumes.storageos.secretRef.withName

withName(name)

"Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?"

obj spec.volumes.vsphereVolume

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

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

fn spec.volumes.vsphereVolume.withStoragePolicyID

withStoragePolicyID(storagePolicyID)

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

fn spec.volumes.vsphereVolume.withStoragePolicyName

withStoragePolicyName(storagePolicyName)

"Storage Policy Based Management (SPBM) profile name."

fn spec.volumes.vsphereVolume.withVolumePath

withVolumePath(volumePath)

"Path that identifies vSphere volume vmdk"