forked from SAP-samples/btp-cap-multitenant-saas
-
Notifications
You must be signed in to change notification settings - Fork 0
/
deployment-restart.yaml
63 lines (63 loc) · 1.66 KB
/
deployment-restart.yaml
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# These artifacts provide a workaround related to Application Router and Automated Credential Rotation
# ! A restart of Application Router will enforce a re-authentication of all active users !
# ! Please make sure to read the respective issue in the central README document first !
apiVersion: batch/v1
kind: CronJob
metadata:
name: restart-susaas-onboarding-router
namespace: default
spec:
concurrencyPolicy: Forbid
# Restart Deployment daily at 00:00 UCT
schedule: '0 0 * * *'
timeZone: "Etc/UTC"
jobTemplate:
spec:
backoffLimit: 1
activeDeadlineSeconds: 600
ttlSecondsAfterFinished: 10
template:
metadata:
annotations:
sidecar.istio.io/inject: "false"
spec:
serviceAccountName: deployment-restart
restartPolicy: Never
containers:
- name: kubectl
image: bitnami/kubectl
command:
- 'kubectl'
- 'rollout'
- 'restart'
- 'deployment/susaas-onboarding-router'
---
kind: ServiceAccount
apiVersion: v1
metadata:
name: deployment-restart
namespace: default
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: deployment-restart
namespace: default
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: deployment-restart
subjects:
- kind: ServiceAccount
name: deployment-restart
namespace: default
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: deployment-restart
namespace: default
rules:
- apiGroups: ["apps", "extensions"]
resources: ["deployments"]
verbs: ["get", "patch", "list", "watch"]