pub struct FileKeySelector {
pub volume_name: Option<String>,
pub path: Option<String>,
pub key: Option<String>,
pub optional: Option<bool>,
}Expand description
FileKeySelector selects a key of the env file. +structType=atomic
Fields§
§volume_name: Option<String>The name of the volume mount containing the env file. +required
path: Option<String>The path within the volume from which to select the file. Must be relative and may not contain the ‘..’ path or start with ‘..’. +required
key: Option<String>The key within the env file. An invalid key will prevent the pod from starting. The keys defined within a source may consist of any printable ASCII characters except ‘=’. During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters. +required
optional: Option<bool>Specify whether the file or its key must be defined. If the file or key does not exist, then the env var is not published. If optional is set to true and the specified key does not exist, the environment variable will not be set in the Pod’s containers.
If optional is set to false and the specified key does not exist, an error will be returned during Pod creation. +optional +default=false
Implementations§
Source§impl FileKeySelector
impl FileKeySelector
Sourcepub fn volume_name(&self) -> &str
pub fn volume_name(&self) -> &str
Returns the value of volume_name, or the default value if volume_name is unset.
Trait Implementations§
Source§impl Clone for FileKeySelector
impl Clone for FileKeySelector
Source§fn clone(&self) -> FileKeySelector
fn clone(&self) -> FileKeySelector
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for FileKeySelector
impl Debug for FileKeySelector
Source§impl Default for FileKeySelector
impl Default for FileKeySelector
Source§impl Hash for FileKeySelector
impl Hash for FileKeySelector
Source§impl Message for FileKeySelector
impl Message for FileKeySelector
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.