28 lines
695 B
YAML
28 lines
695 B
YAML
---
|
|
apiVersion: batch/v1
|
|
kind: CronJob
|
|
metadata:
|
|
name: "restart-zuul-web"
|
|
spec:
|
|
successfulJobsHistoryLimit: 1
|
|
failedJobsHistoryLimit: 2
|
|
concurrencyPolicy: Forbid
|
|
schedule: '0 0 * * *'
|
|
jobTemplate:
|
|
spec:
|
|
backoffLimit: 2
|
|
activeDeadlineSeconds: 600
|
|
template:
|
|
spec:
|
|
serviceAccountName: "restart-deployment"
|
|
restartPolicy: Never
|
|
containers:
|
|
- name: "kubectl"
|
|
image: "bitnami/kubectl"
|
|
command:
|
|
- "bash"
|
|
- "-c"
|
|
- >-
|
|
kubectl rollout restart deployment/zuul-web &&
|
|
kubectl rollout status deployment/zuul-web
|