HostPathVolumeOptions Struct
Options for a kubernetes HostPath volume.
Example
ts
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
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.
mountPathstringmount_pathstrmountPathStringMountPathstringMountPath*string= the volume is not mounted#The path on the container where the volume is mounted.
The name of this volume.
The name must be a valid DNS subdomain name.
If specified, the container has readonly access to the volume.
Otherwise, the container has read/write access.