You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
1.0 KiB
Smarty
38 lines
1.0 KiB
Smarty
3 years ago
|
apiVersion: batch/v1
|
||
4 years ago
|
kind: CronJob
|
||
|
metadata:
|
||
|
name: {{.Name}}
|
||
|
namespace: {{.Namespace}}
|
||
|
spec:
|
||
|
successfulJobsHistoryLimit: {{.SuccessfulJobsHistoryLimit}}
|
||
|
schedule: "{{.Schedule}}"
|
||
|
jobTemplate:
|
||
|
spec:
|
||
|
template:
|
||
3 years ago
|
spec:{{if .ServiceAccount}}
|
||
|
serviceAccountName: {{.ServiceAccount}}{{end}}
|
||
|
{{end}}containers:
|
||
4 years ago
|
- name: {{.Name}}
|
||
|
image: # todo image url
|
||
|
resources:
|
||
|
requests:
|
||
|
cpu: {{.RequestCpu}}m
|
||
|
memory: {{.RequestMem}}Mi
|
||
|
limits:
|
||
|
cpu: {{.LimitCpu}}m
|
||
|
memory: {{.LimitMem}}Mi
|
||
|
command:
|
||
|
- ./{{.ServiceName}}
|
||
|
- -f
|
||
|
- ./{{.Name}}.yaml
|
||
|
volumeMounts:
|
||
|
- name: timezone
|
||
|
mountPath: /etc/localtime
|
||
|
imagePullSecrets:
|
||
|
- name: # registry secret, if no, remove this
|
||
|
restartPolicy: OnFailure
|
||
|
volumes:
|
||
|
- name: timezone
|
||
|
hostPath:
|
||
|
path: /usr/share/zoneinfo/Asia/Shanghai
|