Package org.cdk8s.plus23
Class Container
- java.lang.Object
-
- software.amazon.jsii.JsiiObject
-
- org.cdk8s.plus23.Container
-
- All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable
@Generated(value="jsii-pacmak/1.61.0 (build abf4039)", date="2022-07-06T20:17:23.531Z") @Stability(Stable) public class Container extends software.amazon.jsii.JsiiObject
A single application container that you want to run within a pod.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classContainer.BuilderA fluent builder forContainer.
-
Constructor Summary
Constructors Modifier Constructor Description Container(ContainerProps props)protectedContainer(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)protectedContainer(software.amazon.jsii.JsiiObjectRef objRef)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<String>getArgs()Arguments to the entrypoint.List<String>getCommand()Entrypoint array (the command to execute when the container starts).EnvgetEnv()The environment of the container.StringgetImage()The container image.ImagePullPolicygetImagePullPolicy()Image pull policy for this container.List<VolumeMount>getMounts()Volume mounts configured for this container.StringgetName()The name of the container.NumbergetPort()The port this container exposes.ContainerResourcesgetResources()Compute resources (CPU and memory requests and limits) required by the container.ContainerSecurityContextgetSecurityContext()The security context of the container.StringgetWorkingDir()The working directory inside the container.voidmount(String path, IStorage storage)Mount a volume to a specific path so that it is accessible by the container.voidmount(String path, IStorage storage, MountOptions options)Mount a volume to a specific path so that it is accessible by the container.-
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
-
-
-
-
Constructor Detail
-
Container
protected Container(software.amazon.jsii.JsiiObjectRef objRef)
-
Container
protected Container(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
-
Container
@Stability(Stable) public Container(@NotNull ContainerProps props)- Parameters:
props- This parameter is required.
-
-
Method Detail
-
mount
@Stability(Stable) public void mount(@NotNull String path, @NotNull IStorage storage, @Nullable MountOptions options)Mount a volume to a specific path so that it is accessible by the container.Every pod that is configured to use this container will autmoatically have access to the volume.
- Parameters:
path- - The desired path in the container. This parameter is required.storage- - The storage to mount. This parameter is required.options-
-
mount
@Stability(Stable) public void mount(@NotNull String path, @NotNull IStorage storage)Mount a volume to a specific path so that it is accessible by the container.Every pod that is configured to use this container will autmoatically have access to the volume.
- Parameters:
path- - The desired path in the container. This parameter is required.storage- - The storage to mount. This parameter is required.
-
getEnv
@Stability(Stable) @NotNull public Env getEnv()
The environment of the container.
-
getImage
@Stability(Stable) @NotNull public String getImage()
The container image.
-
getImagePullPolicy
@Stability(Stable) @NotNull public ImagePullPolicy getImagePullPolicy()
Image pull policy for this container.
-
getMounts
@Stability(Stable) @NotNull public List<VolumeMount> getMounts()
Volume mounts configured for this container.
-
getName
@Stability(Stable) @NotNull public String getName()
The name of the container.
-
getSecurityContext
@Stability(Stable) @NotNull public ContainerSecurityContext getSecurityContext()
The security context of the container.
-
getArgs
@Stability(Stable) @Nullable public List<String> getArgs()
Arguments to the entrypoint.- Returns:
- a copy of the arguments array, cannot be modified.
-
getCommand
@Stability(Stable) @Nullable public List<String> getCommand()
Entrypoint array (the command to execute when the container starts).- Returns:
- a copy of the entrypoint array, cannot be modified
-
getPort
@Stability(Stable) @Nullable public Number getPort()
The port this container exposes.
-
getResources
@Stability(Stable) @Nullable public ContainerResources getResources()
Compute resources (CPU and memory requests and limits) required by the container.
-
getWorkingDir
@Stability(Stable) @Nullable public String getWorkingDir()
The working directory inside the container.
-
-