Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add FairwindsOps/rbac-manager #101

Merged
merged 1 commit into from
Dec 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .reuse/dep5
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 7 additions & 0 deletions code-generator/src/catalog.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
--derive=PartialEq
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions kube-custom-resources-rs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 = []
Expand Down
7 changes: 7 additions & 0 deletions kube-custom-resources-rs/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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`:
Expand Down Expand Up @@ -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")]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pub mod v1beta1;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pub mod rbacdefinitions;
Original file line number Diff line number Diff line change
@@ -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<Vec<RBACDefinitionRbacBindingsClusterRoleBindings>>,
pub name: String,
#[serde(default, skip_serializing_if = "Option::is_none", rename = "roleBindings")]
pub role_bindings: Option<Vec<RBACDefinitionRbacBindingsRoleBindings>>,
pub subjects: Vec<RBACDefinitionRbacBindingsSubjects>,
}

#[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<String>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub namespace: Option<String>,
#[serde(default, skip_serializing_if = "Option::is_none", rename = "namespaceSelector")]
pub namespace_selector: Option<RBACDefinitionRbacBindingsRoleBindingsNamespaceSelector>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub role: Option<String>,
}

#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
pub struct RBACDefinitionRbacBindingsRoleBindingsNamespaceSelector {
#[serde(default, skip_serializing_if = "Option::is_none", rename = "matchExpressions")]
pub match_expressions: Option<Vec<RBACDefinitionRbacBindingsRoleBindingsNamespaceSelectorMatchExpressions>>,
#[serde(default, skip_serializing_if = "Option::is_none", rename = "matchLabels")]
pub match_labels: Option<BTreeMap<String, String>>,
}

#[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<Vec<String>>,
}

#[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<bool>,
#[serde(default, skip_serializing_if = "Option::is_none", rename = "imagePullSecrets")]
pub image_pull_secrets: Option<Vec<String>>,
pub kind: RBACDefinitionRbacBindingsSubjectsKind,
pub name: String,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub namespace: Option<String>,
}

#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
pub enum RBACDefinitionRbacBindingsSubjectsKind {
Group,
ServiceAccount,
User,
}

#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
pub struct RBACDefinitionStatus {
}