From ed8042010ee1c955d45a667a38ea1ba5eee4b106 Mon Sep 17 00:00:00 2001 From: manuelbcd Date: Thu, 21 Nov 2024 17:53:52 +0000 Subject: [PATCH] Convert job in a cronjob --- .../Testers/Sysdig/sysdig-test-job.yaml | 41 ++++++++++--------- 1 file changed, 22 insertions(+), 19 deletions(-) diff --git a/eks-anywhere-common/Testers/Sysdig/sysdig-test-job.yaml b/eks-anywhere-common/Testers/Sysdig/sysdig-test-job.yaml index 42cd47cc..40899398 100644 --- a/eks-anywhere-common/Testers/Sysdig/sysdig-test-job.yaml +++ b/eks-anywhere-common/Testers/Sysdig/sysdig-test-job.yaml @@ -1,26 +1,29 @@ apiVersion: batch/v1 -kind: Job +kind: CronJob metadata: name: sysdig-agent-test namespace: sysdig spec: + schedule: "0 1 * * *" backoffLimit: 1 - template: + jobTemplate: spec: - containers: - - name: job - image: 'alpine/k8s:1.26.2' - imagePullPolicy: Always - command: - - /bin/test.sh - volumeMounts: - - name: sysdig-test-configmap-volume - mountPath: /bin/test.sh - readOnly: true - subPath: test.sh - volumes: - - name: sysdig-test-configmap-volume - configMap: - defaultMode: 0700 - name: sysdig-test-configmap - restartPolicy: Never + template: + activeDeadlineSeconds: 1000 + containers: + - name: job + image: 'alpine/k8s:1.26.2' + imagePullPolicy: Always + command: + - /bin/test.sh + volumeMounts: + - name: sysdig-test-configmap-volume + mountPath: /bin/test.sh + readOnly: true + subPath: test.sh + volumes: + - name: sysdig-test-configmap-volume + configMap: + defaultMode: 0700 + name: sysdig-test-configmap + restartPolicy: Never