pub struct ContainerConfig {Show 17 fields
pub metadata: Option<ContainerMetadata>,
pub image: Option<ImageSpec>,
pub command: Vec<String>,
pub args: Vec<String>,
pub working_dir: String,
pub envs: Vec<KeyValue>,
pub mounts: Vec<Mount>,
pub devices: Vec<Device>,
pub labels: HashMap<String, String>,
pub annotations: HashMap<String, String>,
pub log_path: String,
pub stdin: bool,
pub stdin_once: bool,
pub tty: bool,
pub linux: Option<LinuxContainerConfig>,
pub windows: Option<WindowsContainerConfig>,
pub cdi_devices: Vec<CdiDevice>,
}Expand description
ContainerConfig holds all the required and optional fields for creating a container.
Fields§
§metadata: Option<ContainerMetadata>Metadata of the container. This information will uniquely identify the container, and the runtime should leverage this to ensure correct operation. The runtime may also use this information to improve UX, such as by constructing a readable name.
image: Option<ImageSpec>Image to use.
command: Vec<String>Command to execute (i.e., entrypoint for docker)
args: Vec<String>Args for the Command (i.e., command for docker)
working_dir: StringCurrent working directory of the command.
envs: Vec<KeyValue>List of environment variable to set in the container.
mounts: Vec<Mount>Mounts for the container.
devices: Vec<Device>Devices for the container.
labels: HashMap<String, String>Key-value pairs that may be used to scope and select individual resources. Label keys are of the form: label-key ::= prefixed-name | name prefixed-name ::= prefix ‘/’ name prefix ::= DNS_SUBDOMAIN name ::= DNS_LABEL
annotations: HashMap<String, String>Unstructured key-value map that may be used by the kubelet to store and retrieve arbitrary metadata.
Annotations MUST NOT be altered by the runtime; the annotations stored here MUST be returned in the ContainerStatus associated with the container this ContainerConfig creates.
In general, in order to preserve a well-defined interface between the kubelet and the container runtime, annotations SHOULD NOT influence runtime behaviour.
log_path: StringPath relative to PodSandboxConfig.LogDirectory for container to store
the log (STDOUT and STDERR) on the host.
E.g.,
PodSandboxConfig.LogDirectory = /var/log/pods/<NAMESPACE>_<NAME>_<UID>/
ContainerConfig.LogPath = containerName/Instance#.log
stdin: boolVariables for interactive containers, these have very specialized use-cases (e.g. debugging).
stdin_once: bool§tty: bool§linux: Option<LinuxContainerConfig>Configuration specific to Linux containers.
windows: Option<WindowsContainerConfig>Configuration specific to Windows containers.
cdi_devices: Vec<CdiDevice>CDI devices for the container.
Trait Implementations§
Source§impl Clone for ContainerConfig
impl Clone for ContainerConfig
Source§fn clone(&self) -> ContainerConfig
fn clone(&self) -> ContainerConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ContainerConfig
impl Debug for ContainerConfig
Source§impl Default for ContainerConfig
impl Default for ContainerConfig
Source§impl Message for ContainerConfig
impl Message for ContainerConfig
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.Source§impl Name for ContainerConfig
impl Name for ContainerConfig
Source§const NAME: &'static str = "ContainerConfig"
const NAME: &'static str = "ContainerConfig"
Message.
This name is the same as it appears in the source .proto file, e.g. FooBar.Source§const PACKAGE: &'static str = "runtime.v1"
const PACKAGE: &'static str = "runtime.v1"
., e.g. google.protobuf.Source§fn full_name() -> String
fn full_name() -> String
Message.
It’s prefixed with the package name and names of any parent messages,
e.g. google.rpc.BadRequest.FieldViolation.
By default, this is the package name followed by the message name.
Fully-qualified names must be unique within a domain of Type URLs.Source§impl PartialEq for ContainerConfig
impl PartialEq for ContainerConfig
Source§fn eq(&self, other: &ContainerConfig) -> bool
fn eq(&self, other: &ContainerConfig) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ContainerConfig
Auto Trait Implementations§
impl Freeze for ContainerConfig
impl RefUnwindSafe for ContainerConfig
impl Send for ContainerConfig
impl Sync for ContainerConfig
impl Unpin for ContainerConfig
impl UnsafeUnpin for ContainerConfig
impl UnwindSafe for ContainerConfig
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> 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