commit ca2000c2df13969193528e3dd3b110b6129bc954 Author: Nathan Date: Wed Feb 8 16:33:19 2023 +0000 job and pvc diff --git a/youtubedl-job.yaml b/youtubedl-job.yaml new file mode 100644 index 0000000..9703730 --- /dev/null +++ b/youtubedl-job.yaml @@ -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 diff --git a/youtubedl-pvc.yaml b/youtubedl-pvc.yaml new file mode 100644 index 0000000..a0397e2 --- /dev/null +++ b/youtubedl-pvc.yaml @@ -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