Allocate new volumes remotely

This commit is contained in:
Mehran Kholdi
2020-04-24 16:18:09 +04:30
parent 73a618228b
commit 9de82a9b47
9 changed files with 199 additions and 10 deletions

37
templates/task.yaml Normal file
View File

@@ -0,0 +1,37 @@
apiVersion: v1
kind: Pod
metadata:
name: {name}
namespace: {namespace}
spec:
# FIXME: hardcoded
serviceAccount: rawfile-csi-controller
restartPolicy: Never
terminationGracePeriodSeconds: 0
tolerations:
- operator: Exists
volumes:
- name: data-dir
hostPath:
path: /var/csi/rawfile
type: DirectoryOrCreate
nodeSelector: {nodeSelector}
containers:
- name: task
# FIXME: use immutable tag
image: registry.hamdocker.ir/hamravesh/rawfile-csi:master
# FIXME: change to IfNotPresent
imagePullPolicy: Always
volumeMounts:
- name: data-dir
mountPath: /data
resources:
requests: &rsc
cpu: 100m
memory: 100Mi
limit: *rsc
command:
- /bin/sh
- -c
args:
- {cmd}