Skip to content

Commit

Permalink
feat: init default controller config
Browse files Browse the repository at this point in the history
Signed-off-by: Abirdcfly <[email protected]>
  • Loading branch information
Abirdcfly committed Nov 1, 2023
1 parent 39c4065 commit 024c909
Show file tree
Hide file tree
Showing 13 changed files with 690 additions and 156 deletions.
2 changes: 1 addition & 1 deletion charts/arcadia/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: arcadia
description: A Helm chart(KubeBB Component) for KubeAGI Arcadia
type: application
version: 0.1.11
version: 0.1.12
appVersion: "0.0.1"

keywords:
Expand Down
107 changes: 107 additions & 0 deletions charts/arcadia/crds/arcadia.kubeagi.k8s.com.cn_datasets.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.9.2
creationTimestamp: null
name: datasets.arcadia.kubeagi.k8s.com.cn
spec:
group: arcadia.kubeagi.k8s.com.cn
names:
kind: Dataset
listKind: DatasetList
plural: datasets
singular: dataset
scope: Namespaced
versions:
- additionalPrinterColumns:
- jsonPath: .spec.displayName
name: display-name
type: string
- jsonPath: .spec.contentType
name: type
type: string
name: v1alpha1
schema:
openAPIV3Schema:
description: Dataset is the Schema for the datasets 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: DatasetSpec defines the desired state of Dataset
properties:
bestCase:
description: bestCase defines the best case to use this dataset
type: string
contentType:
description: ContentType defines dataset
type: string
creator:
description: Creator defines dataset creator(AUTO-FILLED by webhook)
type: string
displayName:
description: DisplayName defines dataset display name
type: string
required:
- contentType
- displayName
type: object
status:
description: DatasetStatus defines the observed state of Dataset
properties:
conditions:
description: Conditions of the resource.
items:
description: A Condition that may apply to a resource.
properties:
lastSuccessfulTime:
description: LastSuccessfulTime is repository Last Successful
Update Time
format: date-time
type: string
lastTransitionTime:
description: LastTransitionTime is the last time this condition
transitioned from one status to another.
format: date-time
type: string
message:
description: A Message containing details about this condition's
last transition from one status to another, if any.
type: string
reason:
description: A Reason for this condition's last transition from
one status to another.
type: string
status:
description: Status of this condition; is it currently True,
False, or Unknown
type: string
type:
description: Type of this condition. At most one of each condition
type may apply to a resource at any point in time.
type: string
required:
- lastTransitionTime
- reason
- status
- type
type: object
type: array
type: object
type: object
served: true
storage: true
subresources:
status: {}
234 changes: 234 additions & 0 deletions charts/arcadia/crds/arcadia.kubeagi.k8s.com.cn_versioneddatasets.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,234 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.9.2
creationTimestamp: null
name: versioneddatasets.arcadia.kubeagi.k8s.com.cn
spec:
group: arcadia.kubeagi.k8s.com.cn
names:
kind: VersionedDataset
listKind: VersionedDatasetList
plural: versioneddatasets
singular: versioneddataset
scope: Namespaced
versions:
- additionalPrinterColumns:
- jsonPath: .spec.dataset.name
name: dataset
type: string
- jsonPath: .spec.version
name: version
type: string
name: v1alpha1
schema:
openAPIV3Schema:
description: VersionedDataset is the Schema for the versioneddatasets 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: VersionedDatasetSpec defines the desired state of VersionedDataset
properties:
dataset:
description: Dataset which this `VersionedDataset` belongs to
properties:
apiGroup:
description: APIGroup is the group for the resource being referenced.
If APIGroup is not specified, the specified Kind must be in
the core API group. For any other third-party types, APIGroup
is required.
type: string
kind:
description: Kind is the type of resource being referenced
type: string
name:
description: Name is the name of resource being referenced
type: string
namespace:
description: Namespace is the namespace of resource being referenced
type: string
required:
- kind
- name
type: object
files:
description: Files included in this `VersionedDataset`
items:
properties:
from:
description: From defines the datasource which provides this
`File`
properties:
apiGroup:
description: APIGroup is the group for the resource being
referenced. If APIGroup is not specified, the specified
Kind must be in the core API group. For any other third-party
types, APIGroup is required.
type: string
kind:
description: Kind is the type of resource being referenced
type: string
name:
description: Name is the name of resource being referenced
type: string
namespace:
description: Namespace is the namespace of resource being
referenced
type: string
required:
- kind
- name
type: object
path:
description: Path defines the detail path to get this `File`
type: string
required:
- from
- path
type: object
type: array
version:
description: Version
type: string
required:
- dataset
- version
type: object
status:
description: VersionedDatasetStatus defines the observed state of VersionedDataset
properties:
conditions:
description: Conditions of the resource.
items:
description: A Condition that may apply to a resource.
properties:
lastSuccessfulTime:
description: LastSuccessfulTime is repository Last Successful
Update Time
format: date-time
type: string
lastTransitionTime:
description: LastTransitionTime is the last time this condition
transitioned from one status to another.
format: date-time
type: string
message:
description: A Message containing details about this condition's
last transition from one status to another, if any.
type: string
reason:
description: A Reason for this condition's last transition from
one status to another.
type: string
status:
description: Status of this condition; is it currently True,
False, or Unknown
type: string
type:
description: Type of this condition. At most one of each condition
type may apply to a resource at any point in time.
type: string
required:
- lastTransitionTime
- reason
- status
- type
type: object
type: array
filesStatus:
description: FilesStatus contains the status to all files in VersionedDatasetSpec
items:
properties:
processCondition:
description: ProcessCondition records the status of data processing
properties:
lastSuccessfulTime:
description: LastSuccessfulTime is repository Last Successful
Update Time
format: date-time
type: string
lastTransitionTime:
description: LastTransitionTime is the last time this condition
transitioned from one status to another.
format: date-time
type: string
message:
description: A Message containing details about this condition's
last transition from one status to another, if any.
type: string
reason:
description: A Reason for this condition's last transition
from one status to another.
type: string
status:
description: Status of this condition; is it currently True,
False, or Unknown
type: string
type:
description: Type of this condition. At most one of each
condition type may apply to a resource at any point in
time.
type: string
required:
- lastTransitionTime
- reason
- status
- type
type: object
uploadCondition:
description: UploadCondition records the status of file upload
properties:
lastSuccessfulTime:
description: LastSuccessfulTime is repository Last Successful
Update Time
format: date-time
type: string
lastTransitionTime:
description: LastTransitionTime is the last time this condition
transitioned from one status to another.
format: date-time
type: string
message:
description: A Message containing details about this condition's
last transition from one status to another, if any.
type: string
reason:
description: A Reason for this condition's last transition
from one status to another.
type: string
status:
description: Status of this condition; is it currently True,
False, or Unknown
type: string
type:
description: Type of this condition. At most one of each
condition type may apply to a resource at any point in
time.
type: string
required:
- lastTransitionTime
- reason
- status
- type
type: object
type: object
type: array
type: object
type: object
served: true
storage: true
subresources:
status: {}
14 changes: 14 additions & 0 deletions charts/arcadia/templates/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: v1
data:
config: |
systemDatasource:
apiGroup: arcadia.kubeagi.k8s.com.cn/v1alpha1
kind: Datasource
name: '{{ .Release.Name }}-minio'
namespace: '{{ .Release.Namespace }}'
kind: ConfigMap
metadata:
labels:
control-plane: {{ .Release.Name }}-arcadia
name: {{ .Release.Name }}-config
namespace: {{ .Release.Namespace }}
13 changes: 13 additions & 0 deletions charts/arcadia/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,19 @@ spec:
containers:
- command:
- /manager
env:
- name: POD_NAME
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: metadata.name
- name: POD_NAMESPACE
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: metadata.namespace
- name: DEFAULT_CONFIG
value: {{ .Release.Name }}-config
image: {{ .Values.deployment.image }}
imagePullPolicy: {{ .Values.deployment.imagePullPolicy }}
name: manager
Expand Down
Loading

0 comments on commit 024c909

Please sign in to comment.