@aws-cdk_aws-batch-alpha.HostPathVolumeOptions

interface HostPathVolumeOptions ๐Ÿ”น

LanguageType name
.NETAmazon.CDK.AWS.Batch.Alpha.HostPathVolumeOptions
Gogithub.com/aws/aws-cdk-go/awscdkbatchalpha/v2#HostPathVolumeOptions
Javasoftware.amazon.awscdk.services.batch.alpha.HostPathVolumeOptions
Pythonaws_cdk.aws_batch_alpha.HostPathVolumeOptions
TypeScript (source)@aws-cdk/aws-batch-alpha ยป HostPathVolumeOptions

Options for a kubernetes HostPath volume.

See also: https://kubernetes.io/docs/concepts/storage/volumes/#hostpath

Example

declare const jobDefn: batch.EksJobDefinition;
jobDefn.container.addVolume(batch.EksVolume.emptyDir({
  name: 'emptyDir',
  mountPath: '/Volumes/emptyDir',
}));
jobDefn.container.addVolume(batch.EksVolume.hostPath({
  name: 'hostPath',
  hostPath: '/sys',
  mountPath: '/Volumes/hostPath',
}));
jobDefn.container.addVolume(batch.EksVolume.secret({
  name: 'secret',
  optional: true,
  mountPath: '/Volumes/secret',
  secretName: 'mySecret',
}));

Properties

NameTypeDescription
hostPath๐Ÿ”นstringThe path of the file or directory on the host to mount into containers on the pod.
name๐Ÿ”นstringThe name of this volume.
mountPath?๐Ÿ”นstringThe path on the container where the volume is mounted.
readonly?๐Ÿ”นbooleanIf specified, the container has readonly access to the volume.

hostPath๐Ÿ”น

Type: string

The path of the file or directory on the host to mount into containers on the pod.

Note: HothPath Volumes present many security risks, and should be avoided when possible.

See also: https://kubernetes.io/docs/concepts/storage/volumes/#hostpath


name๐Ÿ”น

Type: string

The name of this volume.

The name must be a valid DNS subdomain name.

See also: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#dns-subdomain-names


mountPath?๐Ÿ”น

Type: string (optional, default: the volume is not mounted)

The path on the container where the volume is mounted.


readonly?๐Ÿ”น

Type: boolean (optional, default: false)

If specified, the container has readonly access to the volume.

Otherwise, the container has read/write access.