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 more resources for minio/operator #56

Merged
merged 1 commit into from
Nov 12, 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
1 change: 1 addition & 0 deletions code-generator/src/catalog.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1564,6 +1564,7 @@ pub const CRD_V1_SOURCES: &'static [UpstreamSource] = &[
license: APACHE_V2,
urls: &[
"https://github.com/minio/operator/blob/master/resources/base/crds/minio.min.io_tenants.yaml",
"https://github.com/minio/operator/blob/master/resources/base/crds/sts.min.io_policybindings.yaml",
],
},
UpstreamSource {
Expand Down
74 changes: 74 additions & 0 deletions crd-catalog/minio/operator/sts.min.io/v1alpha1/policybindings.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.11.1
name: policybindings.sts.min.io
spec:
group: sts.min.io
names:
kind: PolicyBinding
listKind: PolicyBindingList
plural: policybindings
shortNames:
- policybinding
singular: policybinding
scope: Namespaced
versions:
- additionalPrinterColumns:
- jsonPath: .status.currentState
name: State
type: string
- jsonPath: .metadata.creationTimestamp
name: Age
type: date
name: v1alpha1
schema:
openAPIV3Schema:
properties:
apiVersion:
type: string
kind:
type: string
metadata:
type: object
spec:
properties:
application:
properties:
namespace:
type: string
serviceaccount:
type: string
required:
- namespace
- serviceaccount
type: object
policies:
items:
type: string
type: array
required:
- application
- policies
type: object
status:
properties:
currentState:
type: string
usage:
nullable: true
properties:
authotizations:
format: int64
type: integer
type: object
required:
- currentState
- usage
type: object
type: object
served: true
storage: true
subresources:
status: {}
1 change: 1 addition & 0 deletions kube-custom-resources-rs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,7 @@ source_toolkit_fluxcd_io_v1beta2 = []
sparkoperator_k8s_io_v1beta2 = []
status_gatekeeper_sh_v1beta1 = []
storage_kubeblocks_io_v1alpha1 = []
sts_min_io_v1alpha1 = []
stunner_l7mp_io_v1alpha1 = []
submariner_io_v1alpha1 = []
templates_gatekeeper_sh_v1 = []
Expand Down
9 changes: 9 additions & 0 deletions kube-custom-resources-rs/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2501,6 +2501,13 @@ apiVersion: `storage.kubeblocks.io/v1alpha1`
kinds:
- `StorageProvider`

## sts_min_io_v1alpha1

apiVersion: `sts.min.io/v1alpha1`

kinds:
- `PolicyBinding`

## stunner_l7mp_io_v1alpha1

apiVersion: `stunner.l7mp.io/v1alpha1`
Expand Down Expand Up @@ -3228,6 +3235,8 @@ pub mod sparkoperator_k8s_io_v1beta2;
pub mod status_gatekeeper_sh_v1beta1;
#[cfg(feature = "storage_kubeblocks_io_v1alpha1")]
pub mod storage_kubeblocks_io_v1alpha1;
#[cfg(feature = "sts_min_io_v1alpha1")]
pub mod sts_min_io_v1alpha1;
#[cfg(feature = "stunner_l7mp_io_v1alpha1")]
pub mod stunner_l7mp_io_v1alpha1;
#[cfg(feature = "submariner_io_v1alpha1")]
Expand Down
1 change: 1 addition & 0 deletions kube-custom-resources-rs/src/sts_min_io_v1alpha1/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pub mod policybindings;
36 changes: 36 additions & 0 deletions kube-custom-resources-rs/src/sts_min_io_v1alpha1/policybindings.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
// WARNING: generated by kopium - manual changes will be overwritten
// kopium command: kopium --docs --filename=./crd-catalog/minio/operator/sts.min.io/v1alpha1/policybindings.yaml --derive=Default --derive=PartialEq
// kopium version: 0.16.2

use kube::CustomResource;
use serde::{Serialize, Deserialize};

#[derive(CustomResource, Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
#[kube(group = "sts.min.io", version = "v1alpha1", kind = "PolicyBinding", plural = "policybindings")]
#[kube(namespaced)]
#[kube(status = "PolicyBindingStatus")]
#[kube(schema = "disabled")]
pub struct PolicyBindingSpec {
pub application: PolicyBindingApplication,
pub policies: Vec<String>,
}

#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct PolicyBindingApplication {
pub namespace: String,
pub serviceaccount: String,
}

#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct PolicyBindingStatus {
#[serde(rename = "currentState")]
pub current_state: String,
pub usage: PolicyBindingStatusUsage,
}

#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct PolicyBindingStatusUsage {
#[serde(default, skip_serializing_if = "Option::is_none")]
pub authotizations: Option<i64>,
}