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

feat: add rag controller #622

Merged
merged 1 commit into from
Jan 30, 2024
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
21 changes: 21 additions & 0 deletions api/evaluation/v1alpha1/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ limitations under the License.
package v1alpha1

import (
"reflect"

batchv1 "k8s.io/api/batch/v1"
corev1 "k8s.io/api/core/v1"
)
Expand Down Expand Up @@ -134,3 +136,22 @@ func RagStatus(rag *RAG) (string, RAGPhase, string) {
}
return status, phase, phaseMsg
}

func RAGSpecChanged(a, b RAGSpec) bool {
if !reflect.DeepEqual(*a.Application, *b.Application) {
return true
}
if !reflect.DeepEqual(a.Datasets, b.Datasets) {
return true
}
if !reflect.DeepEqual(a.JudgeLLM, b.JudgeLLM) {
return true
}
if !reflect.DeepEqual(*a.Storage, *b.Storage) {
return true
}
if a.ServiceAccountName != b.ServiceAccountName {
return true
}
return false
}
12 changes: 12 additions & 0 deletions config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ rules:
- get
- list
- watch
- apiGroups:
- ""
resources:
- persistentvolumeclaims
verbs:
- '*'
- apiGroups:
- ""
resources:
Expand Down Expand Up @@ -408,6 +414,12 @@ rules:
- subjectaccessreviews
verbs:
- create
- apiGroups:
- batch
resources:
- jobs
verbs:
- '*'
- apiGroups:
- chain.arcadia.kubeagi.k8s.com.cn
resources:
Expand Down
Loading
Loading