job and pvc
commit
ca2000c2df
@ -0,0 +1,37 @@
|
|||||||
|
apiVersion: batch/v1
|
||||||
|
kind: Job
|
||||||
|
metadata:
|
||||||
|
name: youtubedl-download
|
||||||
|
spec:
|
||||||
|
ttlSecondsAfterFinished: 100
|
||||||
|
completions: 1
|
||||||
|
parallelism: 1
|
||||||
|
template:
|
||||||
|
spec:
|
||||||
|
affinity:
|
||||||
|
nodeAffinity:
|
||||||
|
requiredDuringSchedulingIgnoredDuringExecution:
|
||||||
|
nodeSelectorTerms:
|
||||||
|
- matchExpressions:
|
||||||
|
- key: kubernetes.io/arch
|
||||||
|
values:
|
||||||
|
- amd64
|
||||||
|
operator: In
|
||||||
|
restartPolicy: Never
|
||||||
|
containers:
|
||||||
|
- name: gatling-help
|
||||||
|
image: registry.local/youtubedl:withffmpeg
|
||||||
|
args: ["--cookies","/tmp/cookies-from-","-u", "username-here", "-p","password-here","-o","/tmp/output/%(title)s.%(ext)s", "-x", "--audio-format", "mp3", "url-here"]
|
||||||
|
volumeMounts:
|
||||||
|
- mountPath: /tmp/output/
|
||||||
|
name: result-volume
|
||||||
|
- mountPath: /tmp/
|
||||||
|
name: cookies
|
||||||
|
volumes:
|
||||||
|
- name: result-volume
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: youtubedl-pvc
|
||||||
|
- name: cookies
|
||||||
|
configMap:
|
||||||
|
name: cookies
|
||||||
|
optional: false
|
@ -0,0 +1,12 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: youtubedl-pvc
|
||||||
|
namespace: youtubedl
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteMany
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 20Gi
|
||||||
|
storageClassName: managed-nfs-storage
|
Loading…
Reference in New Issue