pub struct Container {Show 17 fields
pub args: Option<Vec<String>>,
pub command: Option<Vec<String>>,
pub env: Option<Vec<EnvVar>>,
pub env_from: Option<Vec<EnvFromSource>>,
pub image: Option<String>,
pub image_pull_policy: Option<String>,
pub liveness_probe: Option<Probe>,
pub name: Option<String>,
pub ports: Option<Vec<ContainerPort>>,
pub readiness_probe: Option<Probe>,
pub resources: Option<ResourceRequirements>,
pub security_context: Option<SecurityContext>,
pub startup_probe: Option<Probe>,
pub termination_message_path: Option<String>,
pub termination_message_policy: Option<String>,
pub volume_mounts: Option<Vec<VolumeMount>>,
pub working_dir: Option<String>,
}
Expand description
A single application container. This specifies both the container to run, the command to run in the container and the arguments to supply to it. Note that additional arguments may be supplied by the system to the container at runtime.
This type is not used in any activity, and only used as part of another schema.
Fields§
§args: Option<Vec<String>>
Arguments to the entrypoint. The docker image’s CMD is used if this is not provided. Variable references are not supported in Cloud Run.
command: Option<Vec<String>>
Entrypoint array. Not executed within a shell. The docker image’s ENTRYPOINT is used if this is not provided. Variable references are not supported in Cloud Run.
env: Option<Vec<EnvVar>>
List of environment variables to set in the container. EnvVar with duplicate names are generally allowed; if referencing a secret, the name must be unique for the container. For non-secret EnvVar names, the Container will only get the last-declared one.
env_from: Option<Vec<EnvFromSource>>
Not supported by Cloud Run.
image: Option<String>
Required. Name of the container image in Dockerhub, Google Artifact Registry, or Google Container Registry. If the host is not provided, Dockerhub is assumed.
image_pull_policy: Option<String>
Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise.
liveness_probe: Option<Probe>
Periodic probe of container liveness. Container will be restarted if the probe fails.
name: Option<String>
Name of the container specified as a DNS_LABEL (RFC 1123).
ports: Option<Vec<ContainerPort>>
List of ports to expose from the container. Only a single port can be specified. The specified ports must be listening on all interfaces (0.0.0.0) within the container to be accessible. If omitted, a port number will be chosen and passed to the container through the PORT environment variable for the container to listen on.
readiness_probe: Option<Probe>
Not supported by Cloud Run.
resources: Option<ResourceRequirements>
Compute Resources required by this container.
security_context: Option<SecurityContext>
Not supported by Cloud Run.
startup_probe: Option<Probe>
Startup probe of application within the container. All other probes are disabled if a startup probe is provided, until it succeeds. Container will not receive traffic if the probe fails. If not provided, a default startup probe with TCP socket action is used.
termination_message_path: Option<String>
Path at which the file to which the container’s termination message will be written is mounted into the container’s filesystem. Message written is intended to be brief final status, such as an assertion failure message. Will be truncated by the node if greater than 4096 bytes. The total message length across all containers will be limited to 12kb. Defaults to /dev/termination-log.
termination_message_policy: Option<String>
Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated.
volume_mounts: Option<Vec<VolumeMount>>
Volume to mount into the container’s filesystem. Only supports SecretVolumeSources. Pod volumes to mount into the container’s filesystem.
working_dir: Option<String>
Container’s working directory. If not specified, the container runtime’s default will be used, which might be configured in the container image.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Container
impl<'de> Deserialize<'de> for Container
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Part for Container
Auto Trait Implementations§
impl Freeze for Container
impl RefUnwindSafe for Container
impl Send for Container
impl Sync for Container
impl Unpin for Container
impl UnwindSafe for Container
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more