IEksContainerDefinition Interface
A container that can be run with EKS orchestration on EC2 resources.
Properties
argsmay be undefinedstring[]argsmay be undefinedtyping.List[str]argsmay be undefinedList<String>Argsmay be undefinedstring[]Argsmay be undefined*[]*string#notes
If this isn't specified, the CMD of the container image is used. This corresponds to the args member in the Entrypoint portion of the Pod in Kubernetes. Environment variable references are expanded using the container's environment. If the referenced environment variable doesn't exist, the reference in the command isn't changed. For example, if the reference is to "
commandmay be undefinedstring[]commandmay be undefinedtyping.List[str]commandmay be undefinedList<String>Commandmay be undefinedstring[]Commandmay be undefined*[]*string#notes
This isn't run within a shell. If this isn't specified, the ENTRYPOINT of the container image is used. Environment variable references are expanded using the container's environment. If the referenced environment variable doesn't exist, the reference in the command isn't changed. For example, if the reference is to "$(NAME1)" and the NAME1 environment variable doesn't exist, the command string will remain "$(NAME1)." $$ is replaced with $ and the resulting string isn't expanded. For example, $$(VAR_NAME) will be passed as $(VAR_NAME) whether or not the VAR_NAME environment variable exists.
The entrypoint can't be updated.
cpuLimitmay be undefinednumbercpu_limitmay be undefinedint | floatcpuLimitmay be undefinedNumberCpuLimitmay be undefineddoubleCpuLimitmay be undefined*float64#Default: No CPU limit
If your container attempts to exceed this limit, it will be terminated.
At least one of cpuReservation and cpuLimit is required. If both are specified, then cpuLimit must be at least as large as cpuReservation.
cpuReservationmay be undefinednumbercpu_reservationmay be undefinedint | floatcpuReservationmay be undefinedNumberCpuReservationmay be undefineddoubleCpuReservationmay be undefined*float64#Default: No CPUs reserved
The container will given at least this many CPUs, but may consume more.
At least one of cpuReservation and cpuLimit is required. If both are specified, then cpuLimit must be at least as large as cpuReservation.
envmay be undefined{ [key: string]: string }envmay be undefinedtyping.Mapping[str, str]envmay be undefinedMap<String, String>Envmay be undefinedIDictionary<string, string>Envmay be undefined*map[string]*string#Note: Environment variables cannot start with "AWS_BATCH". This naming convention is reserved for variables that AWS Batch sets.
gpuLimitmay be undefinednumbergpu_limitmay be undefinedint | floatgpuLimitmay be undefinedNumberGpuLimitmay be undefineddoubleGpuLimitmay be undefined*float64#Default: No GPU limit
If your container attempts to exceed this limit, it will be terminated.
If both gpuReservation and gpuLimit are specified, then gpuLimit must be equal to gpuReservation.
gpuReservationmay be undefinednumbergpu_reservationmay be undefinedint | floatgpuReservationmay be undefinedNumberGpuReservationmay be undefineddoubleGpuReservationmay be undefined*float64#Default: No GPUs reserved
The container will given at least this many CPUs, but may consume more.
If both gpuReservation and gpuLimit are specified, then gpuLimit must be equal to gpuReservation.
imageContainerImageimageContainerImageimageContainerImageImageContainerImageImageContainerImagerequired#imagePullPolicymay be undefinedImagePullPolicyimage_pull_policymay be undefinedImagePullPolicyimagePullPolicymay be undefinedImagePullPolicyImagePullPolicymay be undefinedImagePullPolicyImagePullPolicymay be undefinedImagePullPolicy#Default: ALWAYS if the :latest tag is specified, IF_NOT_PRESENT otherwise
memoryLimitmay be undefinedSizememory_limitmay be undefinedSizememoryLimitmay be undefinedSizeMemoryLimitmay be undefinedSizeMemoryLimitmay be undefinedSize#Default: No memory limit
notes
If your container attempts to exceed the allocated memory, it will be terminated.
Must be larger that 4 MiB
At least one of memoryLimit and memoryReservation is required
Note: To maximize your resource utilization, provide your jobs with as much memory as possible for the specific instance type that you are using.
memoryReservationmay be undefinedSizememory_reservationmay be undefinedSizememoryReservationmay be undefinedSizeMemoryReservationmay be undefinedSizeMemoryReservationmay be undefinedSize#Default: No memory reserved
notes
Your container will be given at least this much memory, but may consume more.
Must be larger that 4 MiB
When system memory is under heavy contention, Docker attempts to keep the container memory to this soft limit. However, your container can consume more memory when it needs to, up to either the hard limit specified with the memory parameter (if applicable), or all of the available memory on the container instance, whichever comes first.
At least one of memoryLimit and memoryReservation is required. If both are specified, then memoryLimit must be equal to memoryReservation
Note: To maximize your resource utilization, provide your jobs with as much memory as possible for the specific instance type that you are using.
namemay be undefinedstringnamemay be undefinedstrnamemay be undefinedStringNamemay be undefinedstringNamemay be undefined*string#Default: : 'Default'
privilegedmay be undefinedbooleanprivilegedmay be undefinedboolprivilegedmay be undefinedBooleanPrivilegedmay be undefinedboolPrivilegedmay be undefined*bool= false#The level of permissions are similar to the root user permissions.
This parameter maps to privileged policy in the Privileged pod security policies in the Kubernetes documentation.
Note: this is only compatible with Kubernetes < v1.25
readonlyRootFilesystemmay be undefinedbooleanreadonly_root_filesystemmay be undefinedboolreadonlyRootFilesystemmay be undefinedBooleanReadonlyRootFilesystemmay be undefinedboolReadonlyRootFilesystemmay be undefined*bool= false#This parameter maps to ReadOnlyRootFilesystem policy in the Volumes and file systems pod security policies in the Kubernetes documentation.
Note: this is only compatible with Kubernetes < v1.25
runAsGroupmay be undefinednumberrun_as_groupmay be undefinedint | floatrunAsGroupmay be undefinedNumberRunAsGroupmay be undefineddoubleRunAsGroupmay be undefined*float64= none#notes
If this parameter isn't specified, the default is the group that's specified in the image metadata. This parameter maps to RunAsGroup and MustRunAs policy in the Users and groups pod security policies in the Kubernetes documentation.
Note: this is only compatible with Kubernetes < v1.25
runAsRootmay be undefinedbooleanrun_as_rootmay be undefinedboolrunAsRootmay be undefinedBooleanRunAsRootmay be undefinedboolRunAsRootmay be undefined*bool#Default: the container is not required to run as a non-root user
Otherwise, no such rule is enforced. This parameter maps to RunAsUser and MustRunAsNonRoot policy in the Users and groups pod security policies in the Kubernetes documentation.
Note: this is only compatible with Kubernetes < v1.25
runAsUsermay be undefinednumberrun_as_usermay be undefinedint | floatrunAsUsermay be undefinedNumberRunAsUsermay be undefineddoubleRunAsUsermay be undefined*float64#Default: the user that is specified in the image metadata.
This parameter maps to RunAsUser and MustRunAs policy in the Users and groups pod security policies in the Kubernetes documentation.
Note: this is only compatible with Kubernetes < v1.25
Methods
addVolume(volume: EksVolume): voiddef add_volume(self, volume: EksVolume) -> Nonepublic void addVolume(EksVolume volume)public void AddVolume(EksVolume volume)func AddVolume(Volume EksVolume)#Automatically added to the Pod.
with(...mixins: IMixin[]): IConstructdef with(self, mixins: IMixin) -> IConstructpublic IConstruct with(IMixin mixins)public IConstruct With(IMixin mixins)func With(Mixins IMixin) IConstruct#Mixins are applied in order. The list of constructs is captured at the start of the call, so constructs added by a mixin will not be visited.
1 parameter · returns
Parameters
mixinsmixinsmixinsmixinsMixins— The mixins to apply.
Returns: This construct for chaining