Skip to content

Commit

Permalink
Merge pull request #123 from zqq454224016/test
Browse files Browse the repository at this point in the history
feat: sync kubebb-core chart
  • Loading branch information
bjwswang authored Sep 14, 2023
2 parents 138ebfa + cdd33fa commit e34ce03
Show file tree
Hide file tree
Showing 5 changed files with 165 additions and 20 deletions.
4 changes: 2 additions & 2 deletions charts/kubebb-core/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ annotations:
core.kubebb.k8s.com.cn/displayname: "内核"
description: Kubebb Core provides core implementations on Component Lifecycle Management.Our design and development follows operator pattern which extends kubernetes APIs.
type: application
version: 0.1.15
appVersion: v0.1.4
version: 0.1.16
appVersion: v0.1.5
icon: https://avatars.githubusercontent.com/u/85277200
keywords:
- repository
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ spec:
type: object
spec:
description: ComponentSpec defines the desired state of Component
properties:
creator:
type: string
type: object
status:
description: ComponentStatus defines the observed state of Component
Expand Down
95 changes: 78 additions & 17 deletions charts/kubebb-core/crds/core.kubebb.k8s.com.cn_ratings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,25 @@ spec:
componentName:
description: ComponentName Each Rating corresponds to a component
type: string
evaluator:
description: Evaluator defines the configuration when evaluating the
component
properties:
llm:
description: LLM defines the LLM to be used when evaluating the
component
type: string
type: object
pipelineParams:
description: PipelineParams List of parameters defined in the pipeline
If mulitple PipelineParams contains same dimension,only the 1st
one shall be used
items:
properties:
dimension:
description: Dimension of this pipelinerun
pattern: ^[A-Za-z]+$
type: string
params:
description: Params List of parameters defined in the pipeline
items:
Expand Down Expand Up @@ -84,29 +100,72 @@ spec:
description: PipelineName the name of pipeline
type: string
required:
- dimension
- pipelineName
type: object
type: array
required:
- componentName
- evaluator
- pipelineParams
type: object
status:
properties:
actualWeight:
description: ActualWeight The sum of all successful task weights.
type: integer
expectWeight:
description: ExpectWeight Each pipeline contains multiple tasks. The
default weight of each task is 1. This field describes the sum of
the weights of all tasks included in the pipeline defined in Rating.
type: integer
evaluations:
additionalProperties:
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
finalRating:
description: 'FinalRating from this evaluation TODO: add the
final rating'
type: string
prompt:
type: string
type: object
description: Evaluations contains the evaluator status with the `Dimension`
as the key
type: object
pipelineRuns:
additionalProperties:
properties:
actualWeight:
description: ActualWeight The sum of all successful task weights.
type: integer
conditions:
description: Conditions of the resource.
items:
Expand Down Expand Up @@ -146,14 +205,10 @@ spec:
- type
type: object
type: array
expectWeight:
description: ExpectWeight Each pipeline contains multiple tasks.
The default weight of each task is 1. This field describes
the sum of the weights of all tasks included in the pipeline
defined in Rating.
type: integer
pipelineName:
type: string
pipelinerunName:
type: string
tasks:
items:
properties:
Expand Down Expand Up @@ -198,19 +253,25 @@ spec:
- type
type: object
type: array
description:
type: string
name:
type: string
taskRunName:
type: string
type:
type: string
required:
- description
- name
type: object
type: array
required:
- pipelineName
- pipelinerunName
type: object
description: PipelineRuns contains the pipelinerun status with the
`Dimension` as the key
type: object
type: object
type: object
Expand Down
81 changes: 81 additions & 0 deletions charts/kubebb-core/templates/webhook_manifests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,26 @@ metadata:
annotations:
cert-manager.io/inject-ca-from: {{ .Release.Namespace }}/{{ .Release.Name }}
webhooks:
- admissionReviewVersions:
- v1
clientConfig:
service:
name: {{ .Release.Name }}-webhook-svc
namespace: {{ .Release.Namespace }}
path: /mutate-core-kubebb-k8s-com-cn-v1alpha1-component
failurePolicy: Fail
name: component.kb.io
rules:
- apiGroups:
- core.kubebb.k8s.com.cn
apiVersions:
- v1alpha1
operations:
- CREATE
- UPDATE
resources:
- components
sideEffects: None
- admissionReviewVersions:
- v1
clientConfig:
Expand All @@ -28,6 +48,26 @@ webhooks:
resources:
- componentplans
sideEffects: None
- admissionReviewVersions:
- v1
clientConfig:
service:
name: {{ .Release.Name }}-webhook-svc
namespace: {{ .Release.Namespace }}
path: /mutate-core-kubebb-k8s-com-cn-v1alpha1-portal
failurePolicy: Fail
name: mportal.kb.io
rules:
- apiGroups:
- core.kubebb.k8s.com.cn
apiVersions:
- v1alpha1
operations:
- CREATE
- UPDATE
resources:
- portals
sideEffects: None
- admissionReviewVersions:
- v1
clientConfig:
Expand All @@ -48,6 +88,26 @@ webhooks:
resources:
- subscriptions
sideEffects: None
- admissionReviewVersions:
- v1
clientConfig:
service:
name: {{ .Release.Name }}-webhook-svc
namespace: {{ .Release.Namespace }}
path: /mutate-core-kubebb-k8s-com-cn-v1alpha1-repository
failurePolicy: Fail
name: mrepository.kb.io
rules:
- apiGroups:
- core.kubebb.k8s.com.cn
apiVersions:
- v1alpha1
operations:
- CREATE
- UPDATE
resources:
- repositories
sideEffects: None
---
apiVersion: admissionregistration.k8s.io/v1
kind: ValidatingWebhookConfiguration
Expand Down Expand Up @@ -78,6 +138,27 @@ webhooks:
resources:
- componentplans
sideEffects: None
- admissionReviewVersions:
- v1
clientConfig:
service:
name: {{ .Release.Name }}-webhook-svc
namespace: {{ .Release.Namespace }}
path: /validate-core-kubebb-k8s-com-cn-v1alpha1-portal
failurePolicy: Fail
name: vportal.kb.io
rules:
- apiGroups:
- core.kubebb.k8s.com.cn
apiVersions:
- v1alpha1
operations:
- CREATE
- UPDATE
- DELETE
resources:
- portals
sideEffects: None
- admissionReviewVersions:
- v1
clientConfig:
Expand Down
2 changes: 1 addition & 1 deletion charts/kubebb-core/values.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
deployment:
rating_enable: false
image: kubebb/core:v0.1.4
image: kubebb/core:v0.1.5
imagePullPolcy: IfNotPresent
resources:
limits:
Expand Down

0 comments on commit e34ce03

Please sign in to comment.