aboutsummaryrefslogtreecommitdiff
path: root/kube/alrest/palworld/cronjob/cronjob.yaml
blob: 9998a54928eab1f3b732a491eebd487e94cfa875 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
---
apiVersion: batch/v1
kind: CronJob
metadata:
  name: restart-deployment
spec:
  concurrencyPolicy: Forbid
  schedule: '30 9 * * *'
  jobTemplate:
    spec:
      backoffLimit: 1
      activeDeadlineSeconds: 600
      template:
        spec:
          serviceAccountName: palworld-restart
          restartPolicy: Never
          containers:
            - name: kubectl
              image: bitnami/kubectl
              command:
                - /bin/sh
                - -c
                - /restart-script/restart-deployment.sh
              volumeMounts:
                - name: restart-script
                  mountPath: "/restart-script"
                  readOnly: true
          volumes:
            - name: restart-script
              configMap:
                name: restart-deployment-configmap
                defaultMode: 0777
                items:
                  - key: "restart-deployment.sh"
                    path: "restart-deployment.sh"