cluster_api_rs/api/
capi_clusterresourcesetbinding.rs

1// WARNING: generated by kopium - manual changes will be overwritten
2// kopium command: kopium -D PartialEq -A -d -f -
3// kopium version: 0.21.2
4
5#[allow(unused_imports)]
6mod prelude {
7    pub use kube::CustomResource;
8    pub use schemars::JsonSchema;
9    pub use serde::{Deserialize, Serialize};
10}
11use self::prelude::*;
12
13/// ClusterResourceSetBindingSpec defines the desired state of ClusterResourceSetBinding.
14#[derive(CustomResource, Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
15#[kube(
16    group = "addons.cluster.x-k8s.io",
17    version = "v1beta1",
18    kind = "ClusterResourceSetBinding",
19    plural = "clusterresourcesetbindings"
20)]
21#[kube(namespaced)]
22#[kube(derive = "PartialEq")]
23pub struct ClusterResourceSetBindingSpec {
24    /// bindings is a list of ClusterResourceSets and their resources.
25    #[serde(default, skip_serializing_if = "Option::is_none")]
26    pub bindings: Option<Vec<ClusterResourceSetBindingBindings>>,
27    /// clusterName is the name of the Cluster this binding applies to.
28    /// Note: this field mandatory in v1beta2.
29    #[serde(
30        default,
31        skip_serializing_if = "Option::is_none",
32        rename = "clusterName"
33    )]
34    pub cluster_name: Option<String>,
35}
36
37/// ResourceSetBinding keeps info on all of the resources in a ClusterResourceSet.
38#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
39pub struct ClusterResourceSetBindingBindings {
40    /// clusterResourceSetName is the name of the ClusterResourceSet that is applied to the owner cluster of the binding.
41    #[serde(rename = "clusterResourceSetName")]
42    pub cluster_resource_set_name: String,
43    /// resources is a list of resources that the ClusterResourceSet has.
44    #[serde(default, skip_serializing_if = "Option::is_none")]
45    pub resources: Option<Vec<ClusterResourceSetBindingBindingsResources>>,
46}
47
48/// ResourceBinding shows the status of a resource that belongs to a ClusterResourceSet matched by the owner cluster of the ClusterResourceSetBinding object.
49#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
50pub struct ClusterResourceSetBindingBindingsResources {
51    /// applied is to track if a resource is applied to the cluster or not.
52    pub applied: bool,
53    /// hash is the hash of a resource's data. This can be used to decide if a resource is changed.
54    /// For "ApplyOnce" ClusterResourceSet.spec.strategy, this is no-op as that strategy does not act on change.
55    #[serde(default, skip_serializing_if = "Option::is_none")]
56    pub hash: Option<String>,
57    /// kind of the resource. Supported kinds are: Secrets and ConfigMaps.
58    pub kind: ClusterResourceSetBindingBindingsResourcesKind,
59    /// lastAppliedTime identifies when this resource was last applied to the cluster.
60    #[serde(
61        default,
62        skip_serializing_if = "Option::is_none",
63        rename = "lastAppliedTime"
64    )]
65    pub last_applied_time: Option<String>,
66    /// name of the resource that is in the same namespace with ClusterResourceSet object.
67    pub name: String,
68}
69
70/// ResourceBinding shows the status of a resource that belongs to a ClusterResourceSet matched by the owner cluster of the ClusterResourceSetBinding object.
71#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
72pub enum ClusterResourceSetBindingBindingsResourcesKind {
73    Secret,
74    ConfigMap,
75}