diff --git a/.reuse/dep5 b/.reuse/dep5 index 3ffd4e81b..a7c71b2c2 100644 --- a/.reuse/dep5 +++ b/.reuse/dep5 @@ -303,6 +303,10 @@ Files: crd-catalog/external-secrets/external-secrets/* Copyright: The external-secrets/external-secrets Authors License: Apache-2.0 +Files: crd-catalog/FairwindsOps/rbac-manager/* +Copyright: The FairwindsOps/rbac-manager Authors +License: Apache-2.0 + Files: crd-catalog/Flagsmith/flagsmith-operator/* Copyright: The Flagsmith/flagsmith-operator Authors License: LicenseRef-Flagsmith diff --git a/code-generator/src/catalog.rs b/code-generator/src/catalog.rs index c1236bace..18d065318 100644 --- a/code-generator/src/catalog.rs +++ b/code-generator/src/catalog.rs @@ -806,6 +806,13 @@ pub const CRD_V1_SOURCES: &'static [UpstreamSource] = &[ "https://github.com/external-secrets/external-secrets/blob/main/config/crds/bases/external-secrets.io_secretstores.yaml", ], }, + UpstreamSource { + project_name: "FairwindsOps/rbac-manager", + license: APACHE_V2, + urls: &[ + "https://github.com/FairwindsOps/rbac-manager/blob/master/deploy/2_crd.yaml", + ], + }, UpstreamSource { project_name: "Flagsmith/flagsmith-operator", license: FLAGSMITH, diff --git a/crd-catalog/FairwindsOps/rbac-manager/rbacmanager.reactiveops.io/v1beta1/rbacdefinitions.args b/crd-catalog/FairwindsOps/rbac-manager/rbacmanager.reactiveops.io/v1beta1/rbacdefinitions.args new file mode 100644 index 000000000..7ab47510b --- /dev/null +++ b/crd-catalog/FairwindsOps/rbac-manager/rbacmanager.reactiveops.io/v1beta1/rbacdefinitions.args @@ -0,0 +1 @@ +--derive=PartialEq diff --git a/crd-catalog/FairwindsOps/rbac-manager/rbacmanager.reactiveops.io/v1beta1/rbacdefinitions.yaml b/crd-catalog/FairwindsOps/rbac-manager/rbacmanager.reactiveops.io/v1beta1/rbacdefinitions.yaml new file mode 100644 index 000000000..486fb191d --- /dev/null +++ b/crd-catalog/FairwindsOps/rbac-manager/rbacmanager.reactiveops.io/v1beta1/rbacdefinitions.yaml @@ -0,0 +1,110 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + labels: + app: rbac-manager + name: rbacdefinitions.rbacmanager.reactiveops.io +spec: + group: rbacmanager.reactiveops.io + names: + kind: RBACDefinition + plural: rbacdefinitions + shortNames: + - rbd + - rbacdef + singular: rbacdefinition + scope: Cluster + versions: + - name: v1beta1 + schema: + openAPIV3Schema: + properties: + rbacBindings: + items: + properties: + clusterRoleBindings: + items: + properties: + clusterRole: + type: string + required: + - clusterRole + type: object + type: array + name: + type: string + roleBindings: + items: + properties: + clusterRole: + type: string + namespace: + type: string + namespaceSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + enum: + - Exists + - DoesNotExist + - In + - NotIn + type: string + values: + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + type: object + type: object + role: + type: string + type: object + type: array + subjects: + items: + properties: + automountServiceAccountToken: + type: boolean + imagePullSecrets: + items: + type: string + type: array + kind: + enum: + - Group + - ServiceAccount + - User + type: string + name: + type: string + namespace: + type: string + required: + - name + - kind + type: object + type: array + required: + - name + - subjects + type: object + type: array + status: + type: object + required: + - rbacBindings + type: object + served: true + storage: true diff --git a/kube-custom-resources-rs/Cargo.toml b/kube-custom-resources-rs/Cargo.toml index 63be403a3..6e857efca 100644 --- a/kube-custom-resources-rs/Cargo.toml +++ b/kube-custom-resources-rs/Cargo.toml @@ -233,6 +233,7 @@ prometheusservice_services_k8s_aws = [] quay_redhat_com = [] quota_openshift_io = [] ray_io = [] +rbacmanager_reactiveops_io = [] rds_services_k8s_aws = [] registry_apicur_io = [] registry_devfile_io = [] diff --git a/kube-custom-resources-rs/src/lib.rs b/kube-custom-resources-rs/src/lib.rs index 3a8691fb4..c32f40bfe 100644 --- a/kube-custom-resources-rs/src/lib.rs +++ b/kube-custom-resources-rs/src/lib.rs @@ -1875,6 +1875,11 @@ apiVersion `ray.io/v1alpha1`: - `RayJob` - `RayService` +## rbacmanager_reactiveops_io + +apiVersion `rbacmanager.reactiveops.io/v1beta1`: +- `RBACDefinition` + ## rds_services_k8s_aws apiVersion `rds.services.k8s.aws/v1alpha1`: @@ -2737,6 +2742,8 @@ pub mod quay_redhat_com; pub mod quota_openshift_io; #[cfg(feature = "ray_io")] pub mod ray_io; +#[cfg(feature = "rbacmanager_reactiveops_io")] +pub mod rbacmanager_reactiveops_io; #[cfg(feature = "rds_services_k8s_aws")] pub mod rds_services_k8s_aws; #[cfg(feature = "registry_apicur_io")] diff --git a/kube-custom-resources-rs/src/rbacmanager_reactiveops_io/mod.rs b/kube-custom-resources-rs/src/rbacmanager_reactiveops_io/mod.rs new file mode 100644 index 000000000..9f64fc82d --- /dev/null +++ b/kube-custom-resources-rs/src/rbacmanager_reactiveops_io/mod.rs @@ -0,0 +1 @@ +pub mod v1beta1; diff --git a/kube-custom-resources-rs/src/rbacmanager_reactiveops_io/v1beta1/mod.rs b/kube-custom-resources-rs/src/rbacmanager_reactiveops_io/v1beta1/mod.rs new file mode 100644 index 000000000..b1670fdf5 --- /dev/null +++ b/kube-custom-resources-rs/src/rbacmanager_reactiveops_io/v1beta1/mod.rs @@ -0,0 +1 @@ +pub mod rbacdefinitions; diff --git a/kube-custom-resources-rs/src/rbacmanager_reactiveops_io/v1beta1/rbacdefinitions.rs b/kube-custom-resources-rs/src/rbacmanager_reactiveops_io/v1beta1/rbacdefinitions.rs new file mode 100644 index 000000000..edcfc8970 --- /dev/null +++ b/kube-custom-resources-rs/src/rbacmanager_reactiveops_io/v1beta1/rbacdefinitions.rs @@ -0,0 +1,83 @@ +// WARNING: generated by kopium - manual changes will be overwritten +// kopium command: kopium --docs --filename=./crd-catalog/FairwindsOps/rbac-manager/rbacmanager.reactiveops.io/v1beta1/rbacdefinitions.yaml --derive=PartialEq +// kopium version: 0.16.2 + + +use serde::{Serialize, Deserialize}; +use std::collections::BTreeMap; + +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] +pub struct RBACDefinitionRbacBindings { + #[serde(default, skip_serializing_if = "Option::is_none", rename = "clusterRoleBindings")] + pub cluster_role_bindings: Option>, + pub name: String, + #[serde(default, skip_serializing_if = "Option::is_none", rename = "roleBindings")] + pub role_bindings: Option>, + pub subjects: Vec, +} + +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] +pub struct RBACDefinitionRbacBindingsClusterRoleBindings { + #[serde(rename = "clusterRole")] + pub cluster_role: String, +} + +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] +pub struct RBACDefinitionRbacBindingsRoleBindings { + #[serde(default, skip_serializing_if = "Option::is_none", rename = "clusterRole")] + pub cluster_role: Option, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub namespace: Option, + #[serde(default, skip_serializing_if = "Option::is_none", rename = "namespaceSelector")] + pub namespace_selector: Option, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub role: Option, +} + +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] +pub struct RBACDefinitionRbacBindingsRoleBindingsNamespaceSelector { + #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchExpressions")] + pub match_expressions: Option>, + #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchLabels")] + pub match_labels: Option>, +} + +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] +pub struct RBACDefinitionRbacBindingsRoleBindingsNamespaceSelectorMatchExpressions { + pub key: String, + pub operator: RBACDefinitionRbacBindingsRoleBindingsNamespaceSelectorMatchExpressionsOperator, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub values: Option>, +} + +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] +pub enum RBACDefinitionRbacBindingsRoleBindingsNamespaceSelectorMatchExpressionsOperator { + Exists, + DoesNotExist, + In, + NotIn, +} + +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] +pub struct RBACDefinitionRbacBindingsSubjects { + #[serde(default, skip_serializing_if = "Option::is_none", rename = "automountServiceAccountToken")] + pub automount_service_account_token: Option, + #[serde(default, skip_serializing_if = "Option::is_none", rename = "imagePullSecrets")] + pub image_pull_secrets: Option>, + pub kind: RBACDefinitionRbacBindingsSubjectsKind, + pub name: String, + #[serde(default, skip_serializing_if = "Option::is_none")] + pub namespace: Option, +} + +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] +pub enum RBACDefinitionRbacBindingsSubjectsKind { + Group, + ServiceAccount, + User, +} + +#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] +pub struct RBACDefinitionStatus { +} +