rawfile-localpv/templates/task.yaml
Mehran Kholdi 46bd3565a0 Use immutable tags for running tasks
This way we can run tasks with `IfNotPresent` and be sure it works as intended.
2020-05-29 21:04:40 +04:30

36 lines
718 B
YAML

apiVersion: v1
kind: Pod
metadata:
name: {name}
namespace: {namespace}
spec:
restartPolicy: Never
terminationGracePeriodSeconds: 0
tolerations:
- operator: Exists
volumes:
- name: data-dir
hostPath:
path: /var/csi/rawfile
type: DirectoryOrCreate
nodeSelector: {nodeSelector}
containers:
- name: task
image: {image_repository}:{image_tag}
imagePullPolicy: IfNotPresent
volumeMounts:
- name: data-dir
mountPath: /data
resources:
requests: &rsc
cpu: 10m
memory: 100Mi
limit:
cpu: 100m
memory: 100Mi
command:
- /bin/sh
- -c
args:
- {cmd}