k8s-crds-cluster-api 1.12.5

Kubernetes CRDs for cluster-api
Documentation
// WARNING: generated by kopium - manual changes will be overwritten
// kopium command: kopium -f clusterresourcesetbindings.yml --schema=derived --docs -b --derive=Default --derive=PartialEq --smart-derive-elision
// kopium version: 0.23.0

#[allow(unused_imports)]
mod prelude {
    pub use kube_derive::CustomResource;
    #[cfg(feature = "schemars")]
    pub use schemars::JsonSchema;
    pub use serde::{Deserialize, Serialize};
    #[cfg(feature = "builder")]
    pub use typed_builder::TypedBuilder;
}

use self::prelude::*;

/// spec is the desired state of ClusterResourceSetBinding.
#[derive(CustomResource, Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
#[cfg_attr(feature = "builder", derive(TypedBuilder))]
#[cfg_attr(feature = "schemars", derive(JsonSchema))]
#[cfg_attr(not(feature = "schemars"), kube(schema = "disabled"))]
#[kube(
    group = "addons.cluster.x-k8s.io",
    version = "v1beta2",
    kind = "ClusterResourceSetBinding",
    plural = "clusterresourcesetbindings"
)]
#[kube(namespaced)]
#[kube(derive = "Default")]
#[kube(derive = "PartialEq")]
pub struct ClusterResourceSetBindingSpec {
    /// bindings is a list of ClusterResourceSets and their resources.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
    pub bindings: Option<Vec<ClusterResourceSetBindingBindings>>,
    /// clusterName is the name of the Cluster this binding applies to.
    #[serde(rename = "clusterName")]
    pub cluster_name: String,
}

/// ResourceSetBinding keeps info on all of the resources in a ClusterResourceSet.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
#[cfg_attr(feature = "builder", derive(TypedBuilder))]
#[cfg_attr(feature = "schemars", derive(JsonSchema))]
pub struct ClusterResourceSetBindingBindings {
    /// clusterResourceSetName is the name of the ClusterResourceSet that is applied to the owner cluster of the binding.
    #[serde(rename = "clusterResourceSetName")]
    pub cluster_resource_set_name: String,
    /// resources is a list of resources that the ClusterResourceSet has.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
    pub resources: Option<Vec<ClusterResourceSetBindingBindingsResources>>,
}

/// ResourceBinding shows the status of a resource that belongs to a ClusterResourceSet matched by the owner cluster of the ClusterResourceSetBinding object.
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
#[cfg_attr(feature = "builder", derive(TypedBuilder))]
#[cfg_attr(feature = "schemars", derive(JsonSchema))]
pub struct ClusterResourceSetBindingBindingsResources {
    /// applied is to track if a resource is applied to the cluster or not.
    pub applied: bool,
    /// hash is the hash of a resource's data. This can be used to decide if a resource is changed.
    /// For "ApplyOnce" ClusterResourceSet.spec.strategy, this is no-op as that strategy does not act on change.
    #[serde(default, skip_serializing_if = "Option::is_none")]
    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
    pub hash: Option<String>,
    /// kind of the resource. Supported kinds are: Secrets and ConfigMaps.
    pub kind: ClusterResourceSetBindingBindingsResourcesKind,
    /// lastAppliedTime identifies when this resource was last applied to the cluster.
    #[serde(
        default,
        skip_serializing_if = "Option::is_none",
        rename = "lastAppliedTime"
    )]
    #[cfg_attr(feature = "builder", builder(default, setter(strip_option)))]
    pub last_applied_time: Option<String>,
    /// name of the resource that is in the same namespace with ClusterResourceSet object.
    pub name: String,
}

/// ResourceBinding shows the status of a resource that belongs to a ClusterResourceSet matched by the owner cluster of the ClusterResourceSetBinding object.
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
#[cfg_attr(feature = "schemars", derive(JsonSchema))]
pub enum ClusterResourceSetBindingBindingsResourcesKind {
    Secret,
    ConfigMap,
}