cronjob.yaml 763 B

12345678910111213141516171819202122232425262728293031323334
  1. apiVersion: batch/v1
  2. kind: CronJob
  3. metadata:
  4. name: $1
  5. spec:
  6. schedule: "0 0 * * *" # every day
  7. jobTemplate:
  8. spec:
  9. backoffLimit: 0
  10. template:
  11. metadata:
  12. labels:
  13. app.kubernetes.io/name: $1
  14. app.kubernetes.io/part-of: $2
  15. spec:
  16. restartPolicy: Never
  17. containers:
  18. - name: $1
  19. image: $3
  20. # ports:
  21. # - containerPort: 6080
  22. # name: http
  23. # protocol: TCP
  24. # env:
  25. # - name: $1
  26. # value: "$2:5900"
  27. resources:
  28. limits:
  29. cpu: 2000m
  30. memory: 1024Mi
  31. requests:
  32. cpu: 1000m
  33. memory: 512Mi