添加任务校验

Former-commit-id: f496fcbe25f56a6eed64d8fbd5c9659e988906a8
This commit is contained in:
zhangwei 2023-09-25 17:28:05 +08:00
parent 2674a18ad6
commit 11bfa2cbc5
5 changed files with 90 additions and 0 deletions

View File

@ -0,0 +1,16 @@
package validate
type cloud struct {
participantId int64
namespace string
name string
kind string
}
type IValidate interface {
Validate()
}
func (c *cloud) Validate() {
}

View File

@ -0,0 +1,12 @@
description: modelArts
strategy: 策略
synergy: 协同状态
name: modelArts
tasks:
- serviceName: modelArts
metadata:
projectId: 0a62ffb0d48026c12fbfc011b8d23f0b
name: demo3
command: echo hello;sleep 100;echo hello;sleep 100;echo hello
flavorId: modelarts.p3.large.public.free
imageUrl: jcce/nginx:v1

33
examples/cloud/nginx.yaml Normal file
View File

@ -0,0 +1,33 @@
description: 0901
strategy: 策略
synergy: 协同状态
name: myapp-0901
tasks:
- taskType: cloud
participantId: 1694303450734530560
matchLabels:
nudt: hpc
metadata:
apiVersion: apps/v1
kind: Deployment
metadata:
name: myapp-0901
namespace: zw
spec:
replicas: 2
selector:
matchLabels:
app: myapp
version: v1
template:
metadata:
labels:
app: myapp
version: v1
spec:
containers:
- image: nginx
imagePullPolicy: IfNotPresent
name: myapp
ports:
- containerPort: 80

21
examples/hpc/ac.yaml Normal file
View File

@ -0,0 +1,21 @@
description: ac_01
strategy: 策略
synergy: 协同状态
name: ac_01
tasks:
- taskType: hpc
matchLabels:
hpc: shuguang
metadata:
cardCount: 1
name: ac_01
workDir: /public/home/zhijiang/test/testjob1
wallTime: 00:10:00
cmdScript: sleep 300
appType: BASIC
appName: BASE
queue: debug2
nNode: "1"
submitType: cmd
stdOutFile: /public/home/zhijiang/test/testjob1/std.out.%j
stdErrFile: /public/home/zhijiang/test/testjob1/std.err.%j

8
examples/hpc/th.yaml Normal file
View File

@ -0,0 +1,8 @@
description: th1 task
name: th1 demo
tasks:
- serviceName: th
metadata:
cardCount: 1
name: tianhe1 demo
cmdScript: srun sleep 500