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

chore: support for selecting llm with different namespace #397

Merged
merged 1 commit into from
Jan 17, 2024
Merged

chore: support for selecting llm with different namespace #397

merged 1 commit into from
Jan 17, 2024

Conversation

0xff-dev
Copy link
Collaborator

@0xff-dev 0xff-dev commented Jan 9, 2024

What type of PR is this?

/kind feature

What this PR does / why we need it

chore: support for selecting llm with different namespace

Which issue(s) this PR fixes

Fixes #

Special notes for your reviewer

# rating
apiVersion: core.kubebb.k8s.com.cn/v1alpha1
kind: Rating
metadata:
  annotations:
    kubectl.kubernetes.io/last-applied-configuration: |
      {"apiVersion":"core.kubebb.k8s.com.cn/v1alpha1","kind":"Rating","metadata":{"annotations":{},"name":"two-dimension-rating","namespace":"kubebb-system"},"spec":{"componentName":"kubebb.kubebb-core","evaluator":{"llm":{"kind":"LLM","name":"zhipuai","namespace":"kubebb-system"}},"pipelineParams":[{"dimension":"reliability","params":[{"name":"URL","value":{"arrayVal":[],"objectVal":{},"stringVal":"https://github.com/kubebb/components/releases/download/kubebb-core-v0.1.10/kubebb-core-v0.1.10.tgz","type":"string"}},{"name":"COMPONENT_NAME","value":{"stringVal":"kubebb-core","type":"string"}},{"name":"VERSION","value":{"stringVal":"v0.1.10","type":"string"}},{"name":"REPOSITORY_NAME","value":{"stringVal":"repository-kubebb","type":"string"}}],"pipelineName":"kubebb-core-reliability"},{"dimension":"security","params":[{"name":"URL","value":{"arrayVal":[],"objectVal":{},"stringVal":"https://github.com/kubebb/components/releases/download/kubebb-core-v0.1.10/kubebb-core-v0.1.10.tgz","type":"string"}},{"name":"COMPONENT_NAME","value":{"stringVal":"kubebb-core","type":"string"}},{"name":"VERSION","value":{"stringVal":"v0.1.10","type":"string"}},{"name":"REPOSITORY_NAME","value":{"stringVal":"kubebb-core","type":"string"}}],"pipelineName":"kubebb-core-security"}]}}
  creationTimestamp: "2024-01-09T15:27:41Z"
  generation: 2
  labels:
    rating.component: kubebb.kubebb-core
    rating.repository: kubebb
  name: two-dimension-rating
  namespace: kubebb-system
  resourceVersion: "215673777"
  uid: 3d86168f-e868-417b-98a1-76793a840de3
spec:
  componentName: kubebb.kubebb-core
  evaluator:
    llm:
      kind: LLM
      name: zhipuai
      namespace: kubebb-system
  pipelineParams:
  - dimension: reliability
    params:
    - name: URL
      value:
        stringVal: https://github.com/kubebb/components/releases/download/kubebb-core-v0.1.10/kubebb-core-v0.1.10.tgz
        type: string
    - name: COMPONENT_NAME
      value:
        stringVal: kubebb-core
        type: string
    - name: VERSION
      value:
        stringVal: v0.1.10
        type: string
    - name: REPOSITORY_NAME
      value:
        stringVal: repository-kubebb
        type: string
    pipelineName: kubebb-core-reliability
  - dimension: security
    params:
    - name: URL
      value:
        stringVal: https://github.com/kubebb/components/releases/download/kubebb-core-v0.1.10/kubebb-core-v0.1.10.tgz
        type: string
    - name: COMPONENT_NAME
      value:
        stringVal: kubebb-core
        type: string
    - name: VERSION
      value:
        stringVal: v0.1.10
        type: string
    - name: REPOSITORY_NAME
      value:
        stringVal: kubebb-core
        type: string
    pipelineName: kubebb-core-security
status:
  conditions:
  - lastTransitionTime: "2024-01-09T15:27:59Z"
    message: Evaluation succeeded
    reason: EvaluationSucceeded
    status: "True"
    type: Ready
  evaluations:
    reliability:
      conditions:
      - lastTransitionTime: "2024-01-09T15:26:20Z"
        message: Finished CallLLM
        reason: ReconcileSuccess
        status: "True"
        type: Done
      prompt: two-dimension-rating-reliability
    security:
      conditions:
      - lastTransitionTime: "2024-01-09T15:26:28Z"
        message: Finished CallLLM
        reason: ReconcileSuccess
        status: "True"
        type: Done
      prompt: two-dimension-rating-security
  pipelineRuns:
    reliability:
      conditions:
      - lastTransitionTime: "2024-01-09T15:27:48Z"
        message: 'Tasks Completed: 1 (Failed: 0, Cancelled 0), Skipped: 0'
        reason: Succeeded
        status: "True"
        type: Succeeded
      pipelineName: kubebb-core-reliability
      pipelinerunName: two-dimension-rating.reliability
      tasks:
      - conditions:
        - lastTransitionTime: "2024-01-09T15:27:48Z"
          message: All Steps have completed executing
          reason: Succeeded
          status: "True"
          type: Succeeded
        description: ""
        name: kubebb-core-helm-lint
        taskRunName: two-dimension-rating.reliability-kubebb-core-helm-lint
    security:
      conditions:
      - lastTransitionTime: "2024-01-09T15:27:51Z"
        message: 'Tasks Completed: 1 (Failed: 0, Cancelled 0), Skipped: 0'
        reason: Succeeded
        status: "True"
        type: Succeeded
      pipelineName: kubebb-core-security
      pipelinerunName: two-dimension-rating.security
      tasks:
      - conditions:
        - lastTransitionTime: "2024-01-09T15:27:51Z"
          message: All Steps have completed executing
          reason: Succeeded
          status: "True"
          type: Succeeded
        description: ""
        name: kubebb-core-rback
        taskRunName: two-dimension-rating.security-kubebb-core-rback
[root@kubebb-master rating]# kubectl get prompt -nkubebb-system
NAME                               AGE
two-dimension-rating-reliability   4m13s
two-dimension-rating-security      4m10s
[root@kubebb-master rating]# kubectl get po -nkubebb-system
NAME                                                         READY   STATUS      RESTARTS   AGE
chartmuseum-784f45dc4f-bqtdf                                 1/1     Running     0          82d
kubebb-core-677d66fcf4-sfmp5                                 1/1     Running     0          15m
two-dimension-rating.reliability-kubebb-core-helm-lint-pod   0/1     Completed   0          4m34s
two-dimension-rating.security-kubebb-core-rback-pod          0/1     Completed   0          4m34s
[root@kubebb-master rating]# kubectl get pipelinerun -nkubebb-system
NAME                               SUCCEEDED   REASON      STARTTIME   COMPLETIONTIME
two-dimension-rating.reliability   True        Succeeded   4m42s       4m35s
two-dimension-rating.security      True        Succeeded   4m42s       4m32s

86F1AC8A-E3BE-4E30-AC79-171E48AE9E7E

Copy link

codecov bot commented Jan 10, 2024

Codecov Report

Attention: 4 lines in your changes are missing coverage. Please review.

Comparison is base (1ea3af8) 26.57% compared to head (5743cb9) 26.56%.

Files Patch % Lines
controllers/rating_controller.go 0.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #397      +/-   ##
==========================================
- Coverage   26.57%   26.56%   -0.02%     
==========================================
  Files          37       37              
  Lines        4636     4638       +2     
==========================================
  Hits         1232     1232              
- Misses       3301     3303       +2     
  Partials      103      103              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Dockerfile Outdated Show resolved Hide resolved
Abirdcfly
Abirdcfly previously approved these changes Jan 17, 2024
.github/workflows/example_test.yaml Show resolved Hide resolved
@bjwswang bjwswang merged commit 2426d25 into kubebb:main Jan 17, 2024
19 of 20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants