add crd example

Signed-off-by: Thor-wl <1187526662@qq.com>
This commit is contained in:
Thor-wl 2021-03-16 20:47:08 +08:00
parent c188f0b9ea
commit 1292ded0ed
No known key found for this signature in database
GPG Key ID: 9B111DA8C8605D2C
3 changed files with 52 additions and 0 deletions

11
artifacts/podgroup.yaml Normal file
View File

@ -0,0 +1,11 @@
apiVersion: scheduling.volcano.sh/v1beta1
kind: PodGroup
metadata:
name: test-pg
namespace: default
spec:
minMember: 1
minResources:
cpu: "1000m"
memory: "2G"
queue: default

10
artifacts/queue.yaml Normal file
View File

@ -0,0 +1,10 @@
apiVersion: scheduling.volcano.sh/v1beta1
kind: Queue
metadata:
name: default
spec:
reclaimable: true
weight: 1
capability:
cpu: 2000m
memory: 4G

31
artifacts/vcjob.yaml Normal file
View File

@ -0,0 +1,31 @@
apiVersion: batch.volcano.sh/v1alpha1
kind: Job
metadata:
name: test-job
spec:
minAvailable: 3
schedulerName: volcano
policies:
- event: PodEvicted
action: RestartJob
plugins:
ssh: []
env: []
svc: []
maxRetry: 5
queue: default
tasks:
- replicas: 6
name: "default-nginx"
template:
metadata:
name: web
spec:
containers:
- image: nginx
imagePullPolicy: IfNotPresent
name: nginx
resources:
requests:
cpu: "1"
restartPolicy: OnFailure