when I run the cronjob into Kubernetes, that time cron gives me to success the cron but not getting the desired result
apiVersion: batch/v1beta1
kind: CronJob
metadata:
name: {{ $.Values.appName }}
namespace: {{ $.Values.appName }}
spec:
schedule: "* * * * *"
concurrencyPolicy: Forbid
jobTemplate:
spec:
template:
spec:
containers:
- name: test
image: image
command: ["/bin/bash"]
args: [ "test.sh" ]
restartPolicy: OnFailure
also, I am sharing test.sh
#!/bin/sh
rm -rf /tmp/*.*
echo "remove done"
cronjob running successfully but when I checked the container the file is not getting deleted into /tmp directory