Interface ContainerProps

  • All Superinterfaces:
    software.amazon.jsii.JsiiSerializable
    All Known Implementing Classes:
    ContainerProps.Jsii$Proxy

    @Generated(value="jsii-pacmak/1.56.0 (build 55e7d15)",
               date="2022-04-13T14:52:28.839Z")
    @Stability(Stable)
    public interface ContainerProps
    extends software.amazon.jsii.JsiiSerializable
    Properties for creating a container.
    • 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.