Interface ContainerProps
-
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
ContainerProps.Jsii$Proxy
@Generated(value="jsii-pacmak/1.57.0 (build f614666)", date="2022-04-26T09:02:10.445Z") @Stability(Stable) public interface ContainerProps extends software.amazon.jsii.JsiiSerializable
Properties for creating a container.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classContainerProps.BuilderA builder forContainerPropsstatic classContainerProps.Jsii$ProxyAn implementation forContainerProps
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description static ContainerProps.Builderbuilder()default List<String>getArgs()Arguments to the entrypoint.default List<String>getCommand()Entrypoint array.default Map<String,EnvValue>getEnv()List of environment variables to set in the container.StringgetImage()Docker image name.default ImagePullPolicygetImagePullPolicy()Image pull policy for this container.default ContainerLifecyclegetLifecycle()Describes actions that the management system should take in response to container lifecycle events.default ProbegetLiveness()Periodic probe of container liveness.default StringgetName()Name of the container specified as a DNS_LABEL.default NumbergetPort()Number of port to expose on the pod's IP address.default ProbegetReadiness()Determines when the container is ready to serve traffic.default ResourcesgetResources()Compute resources (CPU and memory requests and limits) required by the container.default ContainerSecurityContextPropsgetSecurityContext()SecurityContext defines the security options the container should be run with.default ProbegetStartup()StartupProbe indicates that the Pod has successfully initialized.default List<VolumeMount>getVolumeMounts()Pod volumes to mount into the container's filesystem.default StringgetWorkingDir()Container's working directory.
-
-
-
Method Detail
-
getImage
@Stability(Stable) @NotNull String getImage()
Docker image name.
-
getArgs
@Stability(Stable) @Nullable default List<String> getArgs()
Arguments to the entrypoint. The docker image's CMD is used if `command` is not provided.Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not.
Cannot be updated.
Default: []
-
getCommand
@Stability(Stable) @Nullable default List<String> getCommand()
Entrypoint array.Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Cannot be updated. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell
Default: - The docker image's ENTRYPOINT.
-
getEnv
@Stability(Stable) @Nullable default Map<String,EnvValue> getEnv()
List of environment variables to set in the container.Cannot be updated.
Default: - No environment variables.
-
getImagePullPolicy
@Stability(Stable) @Nullable default ImagePullPolicy getImagePullPolicy()
Image pull policy for this container.Default: ImagePullPolicy.ALWAYS
-
getLifecycle
@Stability(Stable) @Nullable default ContainerLifecycle getLifecycle()
Describes actions that the management system should take in response to container lifecycle events.
-
getLiveness
@Stability(Stable) @Nullable default Probe getLiveness()
Periodic probe of container liveness.Container will be restarted if the probe fails.
Default: - no liveness probe is defined
-
getName
@Stability(Stable) @Nullable default String getName()
Name of the container specified as a DNS_LABEL.Each container in a pod must have a unique name (DNS_LABEL). Cannot be updated.
Default: 'main'
-
getPort
@Stability(Stable) @Nullable default Number getPort()
Number of port to expose on the pod's IP address.This must be a valid port number, 0 < x < 65536.
Default: - No port is exposed.
-
getReadiness
@Stability(Stable) @Nullable default Probe getReadiness()
Determines when the container is ready to serve traffic.Default: - no readiness probe is defined
-
getResources
@Stability(Stable) @Nullable default Resources getResources()
Compute resources (CPU and memory requests and limits) required by the container.
-
getSecurityContext
@Stability(Stable) @Nullable default ContainerSecurityContextProps getSecurityContext()
SecurityContext defines the security options the container should be run with.If set, the fields override equivalent fields of the pod's security context.
Default: ensureNonRoot: false privileged: false readOnlyRootFilesystem: false
-
getStartup
@Stability(Stable) @Nullable default Probe getStartup()
StartupProbe indicates that the Pod has successfully initialized.If specified, no other probes are executed until this completes successfully
Default: - no startup probe is defined.
-
getVolumeMounts
@Stability(Stable) @Nullable default List<VolumeMount> getVolumeMounts()
Pod volumes to mount into the container's filesystem.Cannot be updated.
-
getWorkingDir
@Stability(Stable) @Nullable default String getWorkingDir()
Container's working directory.If not specified, the container runtime's default will be used, which might be configured in the container image. Cannot be updated.
Default: - The container runtime's default.
-
builder
@Stability(Stable) static ContainerProps.Builder builder()
- Returns:
- a
ContainerProps.BuilderofContainerProps
-
-