pub struct Secret {
pub data: Option<BTreeMap<String, ByteString>>,
pub immutable: Option<bool>,
pub metadata: ObjectMeta,
pub string_data: Option<BTreeMap<String, String>>,
pub type_: Option<String>,
}
Expand description
Secret holds secret data of a certain type. The total bytes of the values in the Data field must be less than MaxSecretSize bytes.
Fields§
§data: Option<BTreeMap<String, ByteString>>
Data contains the secret data. Each key must consist of alphanumeric characters, ‘-’, ‘_’ or ‘.’. The serialized form of the secret data is a base64 encoded string, representing the arbitrary (possibly non-string) data value here. Described in https://tools.ietf.org/html/rfc4648#section-4
immutable: Option<bool>
Immutable, if set to true, ensures that data stored in the Secret cannot be updated (only object metadata can be modified). If not set to true, the field can be modified at any time. Defaulted to nil.
metadata: ObjectMeta
Standard object’s metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
string_data: Option<BTreeMap<String, String>>
stringData allows specifying non-binary secret data in string form. It is provided as a write-only input field for convenience. All keys and values are merged into the data field on write, overwriting any existing values. The stringData field is never output when reading from the API.
type_: Option<String>
Used to facilitate programmatic handling of secret data. More info: https://kubernetes.io/docs/concepts/configuration/secret/#secret-types
Trait Implementations§
Source§impl DeepMerge for Secret
impl DeepMerge for Secret
Source§fn merge_from(&mut self, other: Secret)
fn merge_from(&mut self, other: Secret)
other
into self
.Source§impl<'de> Deserialize<'de> for Secret
impl<'de> Deserialize<'de> for Secret
Source§fn deserialize<D>(
deserializer: D,
) -> Result<Secret, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<Secret, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Source§impl ListableResource for Secret
impl ListableResource for Secret
Source§impl Resource for Secret
impl Resource for Secret
Source§const API_VERSION: &'static str = "v1"
const API_VERSION: &'static str = "v1"
Resource::GROUP
and Resource::VERSION
(eg "apiextensions.k8s.io/v1beta1"
)
or just the version for resources without a group (eg "v1"
). Read moreSource§const GROUP: &'static str = ""
const GROUP: &'static str = ""
Source§const URL_PATH_SEGMENT: &'static str = "secrets"
const URL_PATH_SEGMENT: &'static str = "secrets"
Source§type Scope = NamespaceResourceScope
type Scope = NamespaceResourceScope
Source§impl SecretExt for Secret
impl SecretExt for Secret
fn new(name: impl ToString) -> Self
fn immutable(self, yes: bool) -> Self
fn type(self, type: impl ToString) -> Self
fn data( self, data: impl IntoIterator<Item = (impl ToString, ByteString)>, ) -> Self
fn string_data( self, data: impl IntoIterator<Item = (impl ToString, impl ToString)>, ) -> Self
Source§fn image_pull_secret(
name: impl ToString,
registry: impl ToString,
username: impl ToString,
password: impl ToString,
) -> Self
fn image_pull_secret( name: impl ToString, registry: impl ToString, username: impl ToString, password: impl ToString, ) -> Self
Source§fn basic_auth(
name: impl ToString,
username: impl ToString,
password: impl ToString,
) -> Self
fn basic_auth( name: impl ToString, username: impl ToString, password: impl ToString, ) -> Self
fn ssh_auth(name: impl ToString, private_key: impl ToString) -> Self
Source§impl SecretExt2 for Secret
impl SecretExt2 for Secret
Source§fn image_pull_secret(name: impl ToString, data: impl ToString) -> Self
fn image_pull_secret(name: impl ToString, data: impl ToString) -> Self
Source§impl Serialize for Secret
impl Serialize for Secret
Source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
impl StructuralPartialEq for Secret
Auto Trait Implementations§
impl Freeze for Secret
impl RefUnwindSafe for Secret
impl Send for Secret
impl Sync for Secret
impl Unpin for Secret
impl UnwindSafe for Secret
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<K> OwnerReferenceExt for Kwhere
K: Metadata<Ty = ObjectMeta>,
impl<K> OwnerReferenceExt for Kwhere
K: Metadata<Ty = ObjectMeta>,
Source§fn is_owned_by<T>(&self, owner: &T) -> boolwhere
T: Metadata<Ty = ObjectMeta>,
fn is_owned_by<T>(&self, owner: &T) -> boolwhere
T: Metadata<Ty = ObjectMeta>,
self
being owned by owner
Source§fn is_controlled_by<T>(&self, owner: &T) -> boolwhere
T: Metadata<Ty = ObjectMeta>,
fn is_controlled_by<T>(&self, owner: &T) -> boolwhere
T: Metadata<Ty = ObjectMeta>,
self
being owned and controlled by owner
Source§impl<T> ResourceBuilder for Twhere
T: Metadata<Ty = ObjectMeta>,
impl<T> ResourceBuilder for Twhere
T: Metadata<Ty = ObjectMeta>,
Source§fn owner(self, owner: OwnerReference) -> T
fn owner(self, owner: OwnerReference) -> T
Source§fn label(self, key: impl ToString, value: impl ToString) -> T
fn label(self, key: impl ToString, value: impl ToString) -> T
labels()
Source§fn labels(
self,
labels: impl IntoIterator<Item = (impl ToString, impl ToString)>,
) -> T
fn labels( self, labels: impl IntoIterator<Item = (impl ToString, impl ToString)>, ) -> T
Source§fn annotation(self, key: impl ToString, value: impl ToString) -> T
fn annotation(self, key: impl ToString, value: impl ToString) -> T
labels()