From 13ca19ea0f6fdaaf650b40800b50ca3f7d2ba167 Mon Sep 17 00:00:00 2001 From: Jason Gilfoil Date: Tue, 27 Feb 2024 03:04:30 +0000 Subject: [PATCH 1/2] add test deployments and organize them a bit more --- tests/storage/minio-client.yaml | 30 +++++++++++++++++++ tests/storage/restic-cli.yaml | 15 ++++++++++ .../test-openebs.yaml | 4 ++- tests/vpn/novpn-pod.yaml | 20 +++++++++++++ tests/vpn/vpn-routed-pod.yaml | 25 ++++++++++++++++ 5 files changed, 93 insertions(+), 1 deletion(-) create mode 100644 tests/storage/minio-client.yaml create mode 100644 tests/storage/restic-cli.yaml rename tests/{deployments => storage}/test-openebs.yaml (91%) create mode 100644 tests/vpn/novpn-pod.yaml create mode 100644 tests/vpn/vpn-routed-pod.yaml diff --git a/tests/storage/minio-client.yaml b/tests/storage/minio-client.yaml new file mode 100644 index 00000000..ff50f45d --- /dev/null +++ b/tests/storage/minio-client.yaml @@ -0,0 +1,30 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: s3-client + labels: + app: s3-client +spec: + replicas: 1 + selector: + matchLabels: + app: s3-client + template: + metadata: + labels: + app: s3-client + spec: + containers: + - name: s3-client + image: amazon/aws-cli + command: ["sleep"] + args: ["3600"] + env: + - name: AWS_ACCESS_KEY_ID + value: "your-access-key" + - name: AWS_SECRET_ACCESS_KEY + value: "your-secret-key" + - name: AWS_DEFAULT_REGION + value: "us-east-1" + - name: BUCKET_NAME + value: "your-bucket-name" diff --git a/tests/storage/restic-cli.yaml b/tests/storage/restic-cli.yaml new file mode 100644 index 00000000..d041e0c1 --- /dev/null +++ b/tests/storage/restic-cli.yaml @@ -0,0 +1,15 @@ +--- +apiVersion: v1 +kind: Pod +metadata: + name: "restic-shell" + namespace: "media" +spec: + restartPolicy: OnFailure + containers: + - name: list + image: docker.io/restic/restic:0.16.4 + command: ["/bin/sh", "-c", "while true; do sleep 99999; done"] + envFrom: + - secretRef: + name: "prowlarr-restic-secret" diff --git a/tests/deployments/test-openebs.yaml b/tests/storage/test-openebs.yaml similarity index 91% rename from tests/deployments/test-openebs.yaml rename to tests/storage/test-openebs.yaml index dc1b2193..22a2e0ea 100644 --- a/tests/deployments/test-openebs.yaml +++ b/tests/storage/test-openebs.yaml @@ -2,6 +2,7 @@ apiVersion: v1 kind: PersistentVolumeClaim metadata: name: test-pvc + namespace: media spec: accessModes: - ReadWriteOnce @@ -16,6 +17,7 @@ apiVersion: apps/v1 kind: Deployment metadata: name: busybox-deployment + namespace: media spec: selector: matchLabels: @@ -28,7 +30,7 @@ spec: spec: containers: - name: busybox - image: busybox + image: busybox:1.33 command: ['sh', '-c', 'echo The app is running! && sleep 3600'] volumeMounts: - mountPath: "/mnt/storage" diff --git a/tests/vpn/novpn-pod.yaml b/tests/vpn/novpn-pod.yaml new file mode 100644 index 00000000..67920ecd --- /dev/null +++ b/tests/vpn/novpn-pod.yaml @@ -0,0 +1,20 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: &name novpn + namespace: media +spec: + replicas: 1 + selector: + matchLabels: + app: *name + template: + metadata: + labels: + app: *name + spec: + containers: + - name: dnsutils + image: nicolaka/netshoot + command: ["/bin/bash", "-c", "--"] + args: ["while true; do sleep 30; done;"] diff --git a/tests/vpn/vpn-routed-pod.yaml b/tests/vpn/vpn-routed-pod.yaml new file mode 100644 index 00000000..3b595de4 --- /dev/null +++ b/tests/vpn/vpn-routed-pod.yaml @@ -0,0 +1,25 @@ +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: &name vpn-routed + namespace: media + annotations: + setGateway: "true" + labels: + setGateway: "true" +spec: + replicas: 1 + selector: + matchLabels: + app: *name + template: + metadata: + labels: + app: *name + spec: + containers: + - name: dnsutils + image: nicolaka/netshoot + command: ["/bin/bash", "-c", "--"] + args: ["while true; do sleep 30; done;"] From 3b1538a1309ecab6cae111e7d52dabe05410681a Mon Sep 17 00:00:00 2001 From: Jason Gilfoil Date: Tue, 27 Feb 2024 03:30:10 +0000 Subject: [PATCH 2/2] add intel gpu test --- tests/gpu/intelgpu-job.yaml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 tests/gpu/intelgpu-job.yaml diff --git a/tests/gpu/intelgpu-job.yaml b/tests/gpu/intelgpu-job.yaml new file mode 100644 index 00000000..ada6889f --- /dev/null +++ b/tests/gpu/intelgpu-job.yaml @@ -0,0 +1,23 @@ +--- +apiVersion: batch/v1 +kind: Job +metadata: + name: intelgpu-demo-job + labels: + jobgroup: intelgpu-demo +spec: + template: + metadata: + labels: + jobgroup: intelgpu-demo + spec: + restartPolicy: Never + containers: + - + name: intelgpu-demo-job-1 + image: lanyitin/intel-opencl-icd:latest + imagePullPolicy: IfNotPresent + command: [ "clinfo" ] + resources: + limits: + gpu.intel.com/i915: 1 \ No newline at end of file