From c9dd236a86922dbd35d2027bb0fbfaaa75e2dcec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Ho=C3=9F?= Date: Sun, 11 Feb 2024 12:06:34 +0100 Subject: [PATCH] add kubernetes-sigs/secrets-store-csi-driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Sebastian Hoß --- .reuse/dep5 | 4 + code-generator/src/catalog.rs | 8 ++ .../v1/secretproviderclasses.yaml | 80 ++++++++++++++++ .../v1/secretproviderclasspodstatuses.yaml | 53 +++++++++++ .../v1alpha1/secretproviderclasses.yaml | 95 +++++++++++++++++++ .../secretproviderclasspodstatuses.yaml | 54 +++++++++++ kube-custom-resources-rs/Cargo.toml | 1 + kube-custom-resources-rs/src/lib.rs | 12 +++ .../src/secrets_store_csi_x_k8s_io/mod.rs | 2 + .../src/secrets_store_csi_x_k8s_io/v1/mod.rs | 2 + .../v1/secretproviderclasses.rs | 59 ++++++++++++ .../v1/secretproviderclasspodstatuses.rs | 31 ++++++ .../v1alpha1/mod.rs | 2 + .../v1alpha1/secretproviderclasses.rs | 72 ++++++++++++++ .../secretproviderclasspodstatuses.rs | 31 ++++++ 15 files changed, 506 insertions(+) create mode 100644 crd-catalog/kubernetes-sigs/secrets-store-csi-driver/secrets-store.csi.x-k8s.io/v1/secretproviderclasses.yaml create mode 100644 crd-catalog/kubernetes-sigs/secrets-store-csi-driver/secrets-store.csi.x-k8s.io/v1/secretproviderclasspodstatuses.yaml create mode 100644 crd-catalog/kubernetes-sigs/secrets-store-csi-driver/secrets-store.csi.x-k8s.io/v1alpha1/secretproviderclasses.yaml create mode 100644 crd-catalog/kubernetes-sigs/secrets-store-csi-driver/secrets-store.csi.x-k8s.io/v1alpha1/secretproviderclasspodstatuses.yaml create mode 100644 kube-custom-resources-rs/src/secrets_store_csi_x_k8s_io/mod.rs create mode 100644 kube-custom-resources-rs/src/secrets_store_csi_x_k8s_io/v1/mod.rs create mode 100644 kube-custom-resources-rs/src/secrets_store_csi_x_k8s_io/v1/secretproviderclasses.rs create mode 100644 kube-custom-resources-rs/src/secrets_store_csi_x_k8s_io/v1/secretproviderclasspodstatuses.rs create mode 100644 kube-custom-resources-rs/src/secrets_store_csi_x_k8s_io/v1alpha1/mod.rs create mode 100644 kube-custom-resources-rs/src/secrets_store_csi_x_k8s_io/v1alpha1/secretproviderclasses.rs create mode 100644 kube-custom-resources-rs/src/secrets_store_csi_x_k8s_io/v1alpha1/secretproviderclasspodstatuses.rs diff --git a/.reuse/dep5 b/.reuse/dep5 index 732bf91dc..ea71cb872 100644 --- a/.reuse/dep5 +++ b/.reuse/dep5 @@ -623,6 +623,10 @@ Files: crd-catalog/kubernetes-sigs/node-feature-discovery-operator/* Copyright: The kubernetes-sigs/node-feature-discovery-operator Authors License: Apache-2.0 +Files: crd-catalog/kubernetes-sigs/secrets-store-csi-driver/* +Copyright: The kubernetes-sigs/secrets-store-csi-driver Authors +License: Apache-2.0 + Files: crd-catalog/kubernetes-sigs/security-profiles-operator/* Copyright: The kubernetes-sigs/security-profiles-operator Authors License: Apache-2.0 diff --git a/code-generator/src/catalog.rs b/code-generator/src/catalog.rs index af45472a3..f9a0d0bcb 100644 --- a/code-generator/src/catalog.rs +++ b/code-generator/src/catalog.rs @@ -1570,6 +1570,14 @@ pub const CRD_V1_SOURCES: &'static [UpstreamSource] = &[ "https://github.com/kubernetes-sigs/node-feature-discovery-operator/blob/master/config/crd/bases/node.k8s.io_v1alpha1_noderesourcetopologies.yaml", ], }, + UpstreamSource { + project_name: "kubernetes-sigs/secrets-store-csi-driver", + license: APACHE_V2, + urls: &[ + "https://github.com/kubernetes-sigs/secrets-store-csi-driver/blob/main/config/crd/bases/secrets-store.csi.x-k8s.io_secretproviderclasses.yaml", + "https://github.com/kubernetes-sigs/secrets-store-csi-driver/blob/main/config/crd/bases/secrets-store.csi.x-k8s.io_secretproviderclasspodstatuses.yaml", + ], + }, UpstreamSource { project_name: "kubernetes-sigs/security-profiles-operator", license: APACHE_V2, diff --git a/crd-catalog/kubernetes-sigs/secrets-store-csi-driver/secrets-store.csi.x-k8s.io/v1/secretproviderclasses.yaml b/crd-catalog/kubernetes-sigs/secrets-store-csi-driver/secrets-store.csi.x-k8s.io/v1/secretproviderclasses.yaml new file mode 100644 index 000000000..1b66fdd89 --- /dev/null +++ b/crd-catalog/kubernetes-sigs/secrets-store-csi-driver/secrets-store.csi.x-k8s.io/v1/secretproviderclasses.yaml @@ -0,0 +1,80 @@ +apiVersion: "apiextensions.k8s.io/v1" +kind: "CustomResourceDefinition" +metadata: + annotations: + controller-gen.kubebuilder.io/version: "v0.12.1" + name: "secretproviderclasses.secrets-store.csi.x-k8s.io" +spec: + group: "secrets-store.csi.x-k8s.io" + names: + kind: "SecretProviderClass" + listKind: "SecretProviderClassList" + plural: "secretproviderclasses" + singular: "secretproviderclass" + scope: "Namespaced" + versions: + - name: "v1" + schema: + openAPIV3Schema: + description: "SecretProviderClass is the Schema for the secretproviderclasses API" + properties: + apiVersion: + description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources" + type: "string" + kind: + description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds" + type: "string" + metadata: + type: "object" + spec: + description: "SecretProviderClassSpec defines the desired state of SecretProviderClass" + properties: + parameters: + additionalProperties: + type: "string" + description: "Configuration for specific provider" + type: "object" + provider: + description: "Configuration for provider name" + type: "string" + secretObjects: + items: + description: "SecretObject defines the desired state of synced K8s secret objects" + properties: + annotations: + additionalProperties: + type: "string" + description: "annotations of k8s secret object" + type: "object" + data: + items: + description: "SecretObjectData defines the desired state of synced K8s secret object data" + properties: + key: + description: "data field to populate" + type: "string" + objectName: + description: "name of the object to sync" + type: "string" + type: "object" + type: "array" + labels: + additionalProperties: + type: "string" + description: "labels of K8s secret object" + type: "object" + secretName: + description: "name of the K8s secret object" + type: "string" + type: + description: "type of K8s secret object" + type: "string" + type: "object" + type: "array" + type: "object" + status: + description: "SecretProviderClassStatus defines the observed state of SecretProviderClass" + type: "object" + type: "object" + served: true + storage: true diff --git a/crd-catalog/kubernetes-sigs/secrets-store-csi-driver/secrets-store.csi.x-k8s.io/v1/secretproviderclasspodstatuses.yaml b/crd-catalog/kubernetes-sigs/secrets-store-csi-driver/secrets-store.csi.x-k8s.io/v1/secretproviderclasspodstatuses.yaml new file mode 100644 index 000000000..5ace4f7e8 --- /dev/null +++ b/crd-catalog/kubernetes-sigs/secrets-store-csi-driver/secrets-store.csi.x-k8s.io/v1/secretproviderclasspodstatuses.yaml @@ -0,0 +1,53 @@ +apiVersion: "apiextensions.k8s.io/v1" +kind: "CustomResourceDefinition" +metadata: + annotations: + controller-gen.kubebuilder.io/version: "v0.12.1" + name: "secretproviderclasspodstatuses.secrets-store.csi.x-k8s.io" +spec: + group: "secrets-store.csi.x-k8s.io" + names: + kind: "SecretProviderClassPodStatus" + listKind: "SecretProviderClassPodStatusList" + plural: "secretproviderclasspodstatuses" + singular: "secretproviderclasspodstatus" + scope: "Namespaced" + versions: + - name: "v1" + schema: + openAPIV3Schema: + description: "SecretProviderClassPodStatus is the Schema for the secretproviderclassespodstatus API" + properties: + apiVersion: + description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources" + type: "string" + kind: + description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds" + type: "string" + metadata: + type: "object" + status: + description: "SecretProviderClassPodStatusStatus defines the observed state of SecretProviderClassPodStatus" + properties: + mounted: + type: "boolean" + objects: + items: + description: "SecretProviderClassObject defines the object fetched from external secrets store" + properties: + id: + type: "string" + version: + type: "string" + type: "object" + type: "array" + podName: + type: "string" + secretProviderClassName: + type: "string" + targetPath: + type: "string" + type: "object" + type: "object" + served: true + storage: true diff --git a/crd-catalog/kubernetes-sigs/secrets-store-csi-driver/secrets-store.csi.x-k8s.io/v1alpha1/secretproviderclasses.yaml b/crd-catalog/kubernetes-sigs/secrets-store-csi-driver/secrets-store.csi.x-k8s.io/v1alpha1/secretproviderclasses.yaml new file mode 100644 index 000000000..fdd8d7fb8 --- /dev/null +++ b/crd-catalog/kubernetes-sigs/secrets-store-csi-driver/secrets-store.csi.x-k8s.io/v1alpha1/secretproviderclasses.yaml @@ -0,0 +1,95 @@ +apiVersion: "apiextensions.k8s.io/v1" +kind: "CustomResourceDefinition" +metadata: + annotations: + controller-gen.kubebuilder.io/version: "v0.12.1" + name: "secretproviderclasses.secrets-store.csi.x-k8s.io" +spec: + group: "secrets-store.csi.x-k8s.io" + names: + kind: "SecretProviderClass" + listKind: "SecretProviderClassList" + plural: "secretproviderclasses" + singular: "secretproviderclass" + scope: "Namespaced" + versions: + - deprecated: true + deprecationWarning: "secrets-store.csi.x-k8s.io/v1alpha1 is deprecated. Use secrets-store.csi.x-k8s.io/v1 instead." + name: "v1alpha1" + schema: + openAPIV3Schema: + description: "SecretProviderClass is the Schema for the secretproviderclasses API" + properties: + apiVersion: + description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources" + type: "string" + kind: + description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds" + type: "string" + metadata: + type: "object" + spec: + description: "SecretProviderClassSpec defines the desired state of SecretProviderClass" + properties: + parameters: + additionalProperties: + type: "string" + description: "Configuration for specific provider" + type: "object" + provider: + description: "Configuration for provider name" + type: "string" + secretObjects: + items: + description: "SecretObject defines the desired state of synced K8s secret objects" + properties: + annotations: + additionalProperties: + type: "string" + description: "annotations of k8s secret object" + type: "object" + data: + items: + description: "SecretObjectData defines the desired state of synced K8s secret object data" + properties: + key: + description: "data field to populate" + type: "string" + objectName: + description: "name of the object to sync" + type: "string" + type: "object" + type: "array" + labels: + additionalProperties: + type: "string" + description: "labels of K8s secret object" + type: "object" + secretName: + description: "name of the K8s secret object" + type: "string" + type: + description: "type of K8s secret object" + type: "string" + type: "object" + type: "array" + type: "object" + status: + description: "SecretProviderClassStatus defines the observed state of SecretProviderClass" + properties: + byPod: + items: + description: "ByPodStatus defines the state of SecretProviderClass as seen by an individual controller" + properties: + id: + description: "id of the pod that wrote the status" + type: "string" + namespace: + description: "namespace of the pod that wrote the status" + type: "string" + type: "object" + type: "array" + type: "object" + type: "object" + served: true + storage: false diff --git a/crd-catalog/kubernetes-sigs/secrets-store-csi-driver/secrets-store.csi.x-k8s.io/v1alpha1/secretproviderclasspodstatuses.yaml b/crd-catalog/kubernetes-sigs/secrets-store-csi-driver/secrets-store.csi.x-k8s.io/v1alpha1/secretproviderclasspodstatuses.yaml new file mode 100644 index 000000000..41b3972a4 --- /dev/null +++ b/crd-catalog/kubernetes-sigs/secrets-store-csi-driver/secrets-store.csi.x-k8s.io/v1alpha1/secretproviderclasspodstatuses.yaml @@ -0,0 +1,54 @@ +apiVersion: "apiextensions.k8s.io/v1" +kind: "CustomResourceDefinition" +metadata: + annotations: + controller-gen.kubebuilder.io/version: "v0.12.1" + name: "secretproviderclasspodstatuses.secrets-store.csi.x-k8s.io" +spec: + group: "secrets-store.csi.x-k8s.io" + names: + kind: "SecretProviderClassPodStatus" + listKind: "SecretProviderClassPodStatusList" + plural: "secretproviderclasspodstatuses" + singular: "secretproviderclasspodstatus" + scope: "Namespaced" + versions: + - deprecated: true + name: "v1alpha1" + schema: + openAPIV3Schema: + description: "SecretProviderClassPodStatus is the Schema for the secretproviderclassespodstatus API" + properties: + apiVersion: + description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources" + type: "string" + kind: + description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds" + type: "string" + metadata: + type: "object" + status: + description: "SecretProviderClassPodStatusStatus defines the observed state of SecretProviderClassPodStatus" + properties: + mounted: + type: "boolean" + objects: + items: + description: "SecretProviderClassObject defines the object fetched from external secrets store" + properties: + id: + type: "string" + version: + type: "string" + type: "object" + type: "array" + podName: + type: "string" + secretProviderClassName: + type: "string" + targetPath: + type: "string" + type: "object" + type: "object" + served: true + storage: false diff --git a/kube-custom-resources-rs/Cargo.toml b/kube-custom-resources-rs/Cargo.toml index 572fd6b45..5739e1464 100644 --- a/kube-custom-resources-rs/Cargo.toml +++ b/kube-custom-resources-rs/Cargo.toml @@ -273,6 +273,7 @@ secretgenerator_mittwald_de = [] secrets_crossplane_io = [] secrets_doppler_com = [] secrets_hashicorp_com = [] +secrets_store_csi_x_k8s_io = [] secscan_quay_redhat_com = [] security_internal_openshift_io = [] security_openshift_io = [] diff --git a/kube-custom-resources-rs/src/lib.rs b/kube-custom-resources-rs/src/lib.rs index f48dbba3e..044e9a4e9 100644 --- a/kube-custom-resources-rs/src/lib.rs +++ b/kube-custom-resources-rs/src/lib.rs @@ -2163,6 +2163,16 @@ apiVersion `secretgenerator.mittwald.de/v1alpha1`: - `SSHKeyPair` - `StringSecret` +## secrets_store_csi_x_k8s_io + +apiVersion `secrets-store.csi.x-k8s.io/v1`: +- `SecretProviderClass` +- `SecretProviderClassPodStatus` + +apiVersion `secrets-store.csi.x-k8s.io/v1alpha1`: +- `SecretProviderClass` +- `SecretProviderClassPodStatus` + ## secrets_crossplane_io apiVersion `secrets.crossplane.io/v1alpha1`: @@ -2989,6 +2999,8 @@ pub mod schemas_schemahero_io; pub mod scylla_scylladb_com; #[cfg(feature = "secretgenerator_mittwald_de")] pub mod secretgenerator_mittwald_de; +#[cfg(feature = "secrets_store_csi_x_k8s_io")] +pub mod secrets_store_csi_x_k8s_io; #[cfg(feature = "secrets_crossplane_io")] pub mod secrets_crossplane_io; #[cfg(feature = "secrets_doppler_com")] diff --git a/kube-custom-resources-rs/src/secrets_store_csi_x_k8s_io/mod.rs b/kube-custom-resources-rs/src/secrets_store_csi_x_k8s_io/mod.rs new file mode 100644 index 000000000..21c0fbff9 --- /dev/null +++ b/kube-custom-resources-rs/src/secrets_store_csi_x_k8s_io/mod.rs @@ -0,0 +1,2 @@ +pub mod v1; +pub mod v1alpha1; diff --git a/kube-custom-resources-rs/src/secrets_store_csi_x_k8s_io/v1/mod.rs b/kube-custom-resources-rs/src/secrets_store_csi_x_k8s_io/v1/mod.rs new file mode 100644 index 000000000..132f7c2ef --- /dev/null +++ b/kube-custom-resources-rs/src/secrets_store_csi_x_k8s_io/v1/mod.rs @@ -0,0 +1,2 @@ +pub mod secretproviderclasses; +pub mod secretproviderclasspodstatuses; diff --git a/kube-custom-resources-rs/src/secrets_store_csi_x_k8s_io/v1/secretproviderclasses.rs b/kube-custom-resources-rs/src/secrets_store_csi_x_k8s_io/v1/secretproviderclasses.rs new file mode 100644 index 000000000..c98ecc7d0 --- /dev/null +++ b/kube-custom-resources-rs/src/secrets_store_csi_x_k8s_io/v1/secretproviderclasses.rs @@ -0,0 +1,59 @@ +// WARNING: generated by kopium - manual changes will be overwritten +// kopium command: kopium --docs --filename=./crd-catalog/kubernetes-sigs/secrets-store-csi-driver/secrets-store.csi.x-k8s.io/v1/secretproviderclasses.yaml --derive=Default --derive=PartialEq +// kopium version: 0.16.5 + +use kube::CustomResource; +use serde::{Serialize, Deserialize}; +use std::collections::BTreeMap; + +/// SecretProviderClassSpec defines the desired state of SecretProviderClass +#[derive(CustomResource, Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +#[kube(group = "secrets-store.csi.x-k8s.io", version = "v1", kind = "SecretProviderClass", plural = "secretproviderclasses")] +#[kube(namespaced)] +#[kube(schema = "disabled")] +pub struct SecretProviderClassSpec { + /// Configuration for specific provider + #[serde(default, skip_serializing_if = "Option::is_none")] + pub parameters: Option>, + /// Configuration for provider name + #[serde(default, skip_serializing_if = "Option::is_none")] + pub provider: Option, + #[serde(default, skip_serializing_if = "Option::is_none", rename = "secretObjects")] + pub secret_objects: Option>, +} + +/// SecretObject defines the desired state of synced K8s secret objects +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct SecretProviderClassSecretObjects { + /// annotations of k8s secret object + #[serde(default, skip_serializing_if = "Option::is_none")] + pub annotations: Option>, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub data: Option>, + /// labels of K8s secret object + #[serde(default, skip_serializing_if = "Option::is_none")] + pub labels: Option>, + /// name of the K8s secret object + #[serde(default, skip_serializing_if = "Option::is_none", rename = "secretName")] + pub secret_name: Option, + /// type of K8s secret object + #[serde(default, skip_serializing_if = "Option::is_none", rename = "type")] + pub r#type: Option, +} + +/// SecretObjectData defines the desired state of synced K8s secret object data +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct SecretProviderClassSecretObjectsData { + /// data field to populate + #[serde(default, skip_serializing_if = "Option::is_none")] + pub key: Option, + /// name of the object to sync + #[serde(default, skip_serializing_if = "Option::is_none", rename = "objectName")] + pub object_name: Option, +} + +/// SecretProviderClassStatus defines the observed state of SecretProviderClass +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct SecretProviderClassStatus { +} + diff --git a/kube-custom-resources-rs/src/secrets_store_csi_x_k8s_io/v1/secretproviderclasspodstatuses.rs b/kube-custom-resources-rs/src/secrets_store_csi_x_k8s_io/v1/secretproviderclasspodstatuses.rs new file mode 100644 index 000000000..d60a4d272 --- /dev/null +++ b/kube-custom-resources-rs/src/secrets_store_csi_x_k8s_io/v1/secretproviderclasspodstatuses.rs @@ -0,0 +1,31 @@ +// WARNING: generated by kopium - manual changes will be overwritten +// kopium command: kopium --docs --filename=./crd-catalog/kubernetes-sigs/secrets-store-csi-driver/secrets-store.csi.x-k8s.io/v1/secretproviderclasspodstatuses.yaml --derive=Default --derive=PartialEq +// kopium version: 0.16.5 + + +use serde::{Serialize, Deserialize}; + +/// SecretProviderClassPodStatusStatus defines the observed state of SecretProviderClassPodStatus +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct SecretProviderClassPodStatusStatus { + #[serde(default, skip_serializing_if = "Option::is_none")] + pub mounted: Option, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub objects: Option>, + #[serde(default, skip_serializing_if = "Option::is_none", rename = "podName")] + pub pod_name: Option, + #[serde(default, skip_serializing_if = "Option::is_none", rename = "secretProviderClassName")] + pub secret_provider_class_name: Option, + #[serde(default, skip_serializing_if = "Option::is_none", rename = "targetPath")] + pub target_path: Option, +} + +/// SecretProviderClassObject defines the object fetched from external secrets store +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct SecretProviderClassPodStatusStatusObjects { + #[serde(default, skip_serializing_if = "Option::is_none")] + pub id: Option, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub version: Option, +} + diff --git a/kube-custom-resources-rs/src/secrets_store_csi_x_k8s_io/v1alpha1/mod.rs b/kube-custom-resources-rs/src/secrets_store_csi_x_k8s_io/v1alpha1/mod.rs new file mode 100644 index 000000000..132f7c2ef --- /dev/null +++ b/kube-custom-resources-rs/src/secrets_store_csi_x_k8s_io/v1alpha1/mod.rs @@ -0,0 +1,2 @@ +pub mod secretproviderclasses; +pub mod secretproviderclasspodstatuses; diff --git a/kube-custom-resources-rs/src/secrets_store_csi_x_k8s_io/v1alpha1/secretproviderclasses.rs b/kube-custom-resources-rs/src/secrets_store_csi_x_k8s_io/v1alpha1/secretproviderclasses.rs new file mode 100644 index 000000000..cae22ce3a --- /dev/null +++ b/kube-custom-resources-rs/src/secrets_store_csi_x_k8s_io/v1alpha1/secretproviderclasses.rs @@ -0,0 +1,72 @@ +// WARNING: generated by kopium - manual changes will be overwritten +// kopium command: kopium --docs --filename=./crd-catalog/kubernetes-sigs/secrets-store-csi-driver/secrets-store.csi.x-k8s.io/v1alpha1/secretproviderclasses.yaml --derive=Default --derive=PartialEq +// kopium version: 0.16.5 + +use kube::CustomResource; +use serde::{Serialize, Deserialize}; +use std::collections::BTreeMap; + +/// SecretProviderClassSpec defines the desired state of SecretProviderClass +#[derive(CustomResource, Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +#[kube(group = "secrets-store.csi.x-k8s.io", version = "v1alpha1", kind = "SecretProviderClass", plural = "secretproviderclasses")] +#[kube(namespaced)] +#[kube(schema = "disabled")] +pub struct SecretProviderClassSpec { + /// Configuration for specific provider + #[serde(default, skip_serializing_if = "Option::is_none")] + pub parameters: Option>, + /// Configuration for provider name + #[serde(default, skip_serializing_if = "Option::is_none")] + pub provider: Option, + #[serde(default, skip_serializing_if = "Option::is_none", rename = "secretObjects")] + pub secret_objects: Option>, +} + +/// SecretObject defines the desired state of synced K8s secret objects +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct SecretProviderClassSecretObjects { + /// annotations of k8s secret object + #[serde(default, skip_serializing_if = "Option::is_none")] + pub annotations: Option>, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub data: Option>, + /// labels of K8s secret object + #[serde(default, skip_serializing_if = "Option::is_none")] + pub labels: Option>, + /// name of the K8s secret object + #[serde(default, skip_serializing_if = "Option::is_none", rename = "secretName")] + pub secret_name: Option, + /// type of K8s secret object + #[serde(default, skip_serializing_if = "Option::is_none", rename = "type")] + pub r#type: Option, +} + +/// SecretObjectData defines the desired state of synced K8s secret object data +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct SecretProviderClassSecretObjectsData { + /// data field to populate + #[serde(default, skip_serializing_if = "Option::is_none")] + pub key: Option, + /// name of the object to sync + #[serde(default, skip_serializing_if = "Option::is_none", rename = "objectName")] + pub object_name: Option, +} + +/// SecretProviderClassStatus defines the observed state of SecretProviderClass +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct SecretProviderClassStatus { + #[serde(default, skip_serializing_if = "Option::is_none", rename = "byPod")] + pub by_pod: Option>, +} + +/// ByPodStatus defines the state of SecretProviderClass as seen by an individual controller +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct SecretProviderClassStatusByPod { + /// id of the pod that wrote the status + #[serde(default, skip_serializing_if = "Option::is_none")] + pub id: Option, + /// namespace of the pod that wrote the status + #[serde(default, skip_serializing_if = "Option::is_none")] + pub namespace: Option, +} + diff --git a/kube-custom-resources-rs/src/secrets_store_csi_x_k8s_io/v1alpha1/secretproviderclasspodstatuses.rs b/kube-custom-resources-rs/src/secrets_store_csi_x_k8s_io/v1alpha1/secretproviderclasspodstatuses.rs new file mode 100644 index 000000000..07902de8a --- /dev/null +++ b/kube-custom-resources-rs/src/secrets_store_csi_x_k8s_io/v1alpha1/secretproviderclasspodstatuses.rs @@ -0,0 +1,31 @@ +// WARNING: generated by kopium - manual changes will be overwritten +// kopium command: kopium --docs --filename=./crd-catalog/kubernetes-sigs/secrets-store-csi-driver/secrets-store.csi.x-k8s.io/v1alpha1/secretproviderclasspodstatuses.yaml --derive=Default --derive=PartialEq +// kopium version: 0.16.5 + + +use serde::{Serialize, Deserialize}; + +/// SecretProviderClassPodStatusStatus defines the observed state of SecretProviderClassPodStatus +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct SecretProviderClassPodStatusStatus { + #[serde(default, skip_serializing_if = "Option::is_none")] + pub mounted: Option, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub objects: Option>, + #[serde(default, skip_serializing_if = "Option::is_none", rename = "podName")] + pub pod_name: Option, + #[serde(default, skip_serializing_if = "Option::is_none", rename = "secretProviderClassName")] + pub secret_provider_class_name: Option, + #[serde(default, skip_serializing_if = "Option::is_none", rename = "targetPath")] + pub target_path: Option, +} + +/// SecretProviderClassObject defines the object fetched from external secrets store +#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)] +pub struct SecretProviderClassPodStatusStatusObjects { + #[serde(default, skip_serializing_if = "Option::is_none")] + pub id: Option, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub version: Option, +} +