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 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§const SECRET_TYPE_OPAQUE: &str = "Opaque"
const SECRET_TYPE_OPAQUE: &str = "Opaque"
Source§const SECRET_TYPE_SERVICE_ACCOUNT_TOKEN: &str = "kubernetes.io/service-account-token"
const SECRET_TYPE_SERVICE_ACCOUNT_TOKEN: &str = "kubernetes.io/service-account-token"
Source§const SERVICE_ACCOUNT_NAME_KEY: &str = "kubernetes.io/service-account.name"
const SERVICE_ACCOUNT_NAME_KEY: &str = "kubernetes.io/service-account.name"
Source§const SERVICE_ACCOUNT_UID_KEY: &str = "kubernetes.io/service-account.uid"
const SERVICE_ACCOUNT_UID_KEY: &str = "kubernetes.io/service-account.uid"
Source§const SERVICE_ACCOUNT_TOKEN_KEY: &str = "token"
const SERVICE_ACCOUNT_TOKEN_KEY: &str = "token"
Source§const SERVICE_ACCOUNT_KUBECONFIG_KEY: &str = "kubernetes.kubeconfig"
const SERVICE_ACCOUNT_KUBECONFIG_KEY: &str = "kubernetes.kubeconfig"
Source§const SERVICE_ACCOUNT_ROOTCA_KEY: &str = "ca.crt"
const SERVICE_ACCOUNT_ROOTCA_KEY: &str = "ca.crt"
Source§const SERVICE_ACCOUNT_NAMESPACE_KEY: &str = "namespace"
const SERVICE_ACCOUNT_NAMESPACE_KEY: &str = "namespace"
Source§const SECRET_TYPE_DOCKERCFG: &str = "kubernetes.io/dockercfg"
const SECRET_TYPE_DOCKERCFG: &str = "kubernetes.io/dockercfg"
Source§const DOCKER_CONFIG_KEY: &str = ".dockercfg"
const DOCKER_CONFIG_KEY: &str = ".dockercfg"
Source§const SECRET_TYPE_DOCKER_CONFIG_JSON: &str = "kubernetes.io/dockerconfigjson"
const SECRET_TYPE_DOCKER_CONFIG_JSON: &str = "kubernetes.io/dockerconfigjson"
Source§const DOCKER_CONFIG_JSON_KEY: &str = ".dockerconfigjson"
const DOCKER_CONFIG_JSON_KEY: &str = ".dockerconfigjson"
Source§const SECRET_TYPE_BASIC_AUTH: &str = "kubernetes.io/basic-auth"
const SECRET_TYPE_BASIC_AUTH: &str = "kubernetes.io/basic-auth"
Source§const BASIC_AUTH_USERNAME_KEY: &str = "username"
const BASIC_AUTH_USERNAME_KEY: &str = "username"
Source§const BASIC_AUTH_PASSWORD_KEY: &str = "password"
const BASIC_AUTH_PASSWORD_KEY: &str = "password"
Source§const SECRET_TYPE_SSH_AUTH: &str = "kubernetes.io/ssh-auth"
const SECRET_TYPE_SSH_AUTH: &str = "kubernetes.io/ssh-auth"
Source§const SSH_AUTH_PRIVATE_KEY: &str = "ssh-privatekey"
const SSH_AUTH_PRIVATE_KEY: &str = "ssh-privatekey"
Source§const SECRET_TYPE_TLS: &str = "kubernetes.io/tls"
const SECRET_TYPE_TLS: &str = "kubernetes.io/tls"
Source§const TLS_CERT_KEY: &str = "tls.crt"
const TLS_CERT_KEY: &str = "tls.crt"
Source§const TLS_PRIVATE_KEY_KEY: &str = "tls.key"
const TLS_PRIVATE_KEY_KEY: &str = "tls.key"
Source§const SECRET_TYPE_BOOTSTRAP_TOKEN: &str = "bootstrap.kubernetes.io/token"
const SECRET_TYPE_BOOTSTRAP_TOKEN: &str = "bootstrap.kubernetes.io/token"
Source§fn docker_config_json(name: impl ToString, config: impl ToString) -> Self
fn docker_config_json(name: impl ToString, config: impl ToString) -> Self
config
as plain text
(i.e. string_data field)Source§fn docker_config_json_base64_encoded(
name: impl ToString,
config: ByteString,
) -> Self
fn docker_config_json_base64_encoded( name: impl ToString, config: ByteString, ) -> Self
config
as base64 encoded text
(i.e. data field)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
Source§impl SecretExt2 for Secret
impl SecretExt2 for Secret
Source§fn image_pull_secret(name: impl ToString, config: impl ToString) -> Self
fn image_pull_secret(name: impl ToString, config: 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()