Initial release
This commit is contained in:
@@ -0,0 +1,112 @@
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.13.0
|
||||
name: miniojobs.job.min.io
|
||||
spec:
|
||||
group: job.min.io
|
||||
names:
|
||||
kind: MinIOJob
|
||||
listKind: MinIOJobList
|
||||
plural: miniojobs
|
||||
shortNames:
|
||||
- miniojob
|
||||
singular: miniojob
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- additionalPrinterColumns:
|
||||
- jsonPath: .spec.tenant.name
|
||||
name: Tenant
|
||||
type: string
|
||||
- jsonPath: .spec.status.phase
|
||||
name: Phase
|
||||
type: string
|
||||
name: v1alpha1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
properties:
|
||||
apiVersion:
|
||||
type: string
|
||||
kind:
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
properties:
|
||||
commands:
|
||||
items:
|
||||
properties:
|
||||
args:
|
||||
additionalProperties:
|
||||
type: string
|
||||
type: object
|
||||
dependsOn:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
name:
|
||||
type: string
|
||||
op:
|
||||
type: string
|
||||
required:
|
||||
- op
|
||||
type: object
|
||||
type: array
|
||||
execution:
|
||||
default: parallel
|
||||
enum:
|
||||
- parallel
|
||||
- sequential
|
||||
type: string
|
||||
failureStrategy:
|
||||
default: continueOnFailure
|
||||
enum:
|
||||
- continueOnFailure
|
||||
- stopOnFailure
|
||||
type: string
|
||||
mcImage:
|
||||
default: minio/mc:latest
|
||||
type: string
|
||||
serviceAccountName:
|
||||
type: string
|
||||
tenant:
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
namespace:
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
- namespace
|
||||
type: object
|
||||
required:
|
||||
- commands
|
||||
- serviceAccountName
|
||||
- tenant
|
||||
type: object
|
||||
status:
|
||||
properties:
|
||||
commands:
|
||||
items:
|
||||
properties:
|
||||
message:
|
||||
type: string
|
||||
name:
|
||||
type: string
|
||||
result:
|
||||
type: string
|
||||
required:
|
||||
- result
|
||||
type: object
|
||||
type: array
|
||||
message:
|
||||
type: string
|
||||
phase:
|
||||
type: string
|
||||
type: object
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources:
|
||||
status: {}
|
||||
@@ -0,0 +1,74 @@
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
controller-gen.kubebuilder.io/version: v0.13.0
|
||||
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: {}
|
||||
File diff suppressed because it is too large
Load Diff
17
crd/minio/datas.tf
Normal file
17
crd/minio/datas.tf
Normal file
@@ -0,0 +1,17 @@
|
||||
|
||||
locals {
|
||||
common-labels = {
|
||||
"vynil.solidite.fr/owner-name" = var.instance
|
||||
"vynil.solidite.fr/owner-namespace" = var.namespace
|
||||
"vynil.solidite.fr/owner-category" = var.category
|
||||
"vynil.solidite.fr/owner-component" = var.component
|
||||
"app.kubernetes.io/managed-by" = "vynil"
|
||||
"app.kubernetes.io/name" = var.component
|
||||
"app.kubernetes.io/instance" = var.instance
|
||||
}
|
||||
}
|
||||
data "kustomization_overlay" "data" {
|
||||
common_labels = local.common-labels
|
||||
namespace = var.namespace
|
||||
resources = []
|
||||
}
|
||||
29
crd/minio/index.rhai
Normal file
29
crd/minio/index.rhai
Normal file
@@ -0,0 +1,29 @@
|
||||
const VERSION="5.0.14";
|
||||
const SRC=src;
|
||||
const DEST=dest;
|
||||
const DOIT=config.apply;
|
||||
const crdFiles=[
|
||||
"apiextensions.k8s.io_v1_CustomResourceDefinition_miniojobs.job.min.io.yaml",
|
||||
"apiextensions.k8s.io_v1_CustomResourceDefinition_policybindings.sts.min.io.yaml",
|
||||
"apiextensions.k8s.io_v1_CustomResourceDefinition_tenants.minio.min.io.yaml",
|
||||
];
|
||||
fn pre_install() {
|
||||
if ! global::DOIT {
|
||||
return;
|
||||
}
|
||||
for file in global::crdFiles {
|
||||
shell(`kubectl replace -f ${global::SRC}/${file} || kubectl create -f ${global::SRC}/${file}`);
|
||||
}
|
||||
}
|
||||
fn post_destroy() {
|
||||
if ! global::DOIT {
|
||||
return;
|
||||
}
|
||||
for file in global::crdFiles {
|
||||
shell(`kubectl delete -f ${global::SRC}/${file}`);
|
||||
}
|
||||
}
|
||||
|
||||
fn pre_pack() {
|
||||
shell(`kubectl kustomize https://github.com/minio/operator//resources/base/crds/?ref=v${global::VERSION} > ${global::SRC}/otel.yaml`);
|
||||
}
|
||||
21
crd/minio/index.yaml
Normal file
21
crd/minio/index.yaml
Normal file
@@ -0,0 +1,21 @@
|
||||
---
|
||||
apiVersion: vinyl.solidite.fr/v1beta1
|
||||
kind: Component
|
||||
category: crd
|
||||
metadata:
|
||||
name: minio
|
||||
description: CRD for minio
|
||||
options:
|
||||
release:
|
||||
default: 8.2.0-2.1.1
|
||||
examples:
|
||||
- 8.2.0-2.1.1
|
||||
type: string
|
||||
apply:
|
||||
default: true
|
||||
examples:
|
||||
- true
|
||||
type: boolean
|
||||
dependencies: []
|
||||
providers: null
|
||||
tfaddtype: null
|
||||
Reference in New Issue
Block a user