forked from SAP-samples/btp-kyma-cap-multitenant-susaas
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Provide a sample for approuter restart
- Loading branch information
1 parent
3ef943b
commit f80d72a
Showing
2 changed files
with
64 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
63 changes: 63 additions & 0 deletions
63
docu/4-expert/onboard-automation-domain/code/deployment-restart.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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-prod-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-prod-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"] |