I have a cronjob that I want to execute twice a day, at 7h and 19h.
Here is the definition.
apiVersion: batch/v1beta1
kind: CronJob
metadata:
name: pamela
namespace: influx
spec:
schedule: "* 7,19 * * *"
concurrencyPolicy: Replace
jobTemplate:
spec:
template:
spec:
containers:
- image: registry.gitlab.com/xxx/pamela:latest
envFrom:
- secretRef:
name: pamela-env
name: pamela
resources:
volumeMounts:
- mountPath: /raw
name: pamela-claim
subPath: raw
- mountPath: /log
name: pamela-claim
subPath: log
restartPolicy: Never
volumes:
- name: pamela-claim
persistentVolumeClaim:
claimName: pamela-claim
nodeSelector:
kops.k8s.io/instancegroup: nodes
imagePullSecrets:
- name: gitlab-registry
Thing is when it runs, it runs 3 times :
- at 2021-01-06T07:57:00Z
- at 2021-01-06T07:58:00Z
- at 2021-01-06T07:59:00Z
It is to be mentioned that my job execution time is about 22sec
Why is it happening ?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…