From ca2000c2df13969193528e3dd3b110b6129bc954 Mon Sep 17 00:00:00 2001 From: Nathan Date: Wed, 8 Feb 2023 16:33:19 +0000 Subject: [PATCH] job and pvc --- youtubedl-job.yaml | 37 +++++++++++++++++++++++++++++++++++++ youtubedl-pvc.yaml | 12 ++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 youtubedl-job.yaml create mode 100644 youtubedl-pvc.yaml 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