Skip to content
This repository has been archived by the owner on Feb 9, 2024. It is now read-only.

Commit

Permalink
Merge pull request #405 from gravitational/sergei/wait_for_readyness_…
Browse files Browse the repository at this point in the history
…gravity_site_55x

[5.5.x] Use postUpdate hook to check gravity site status after upgrade
  • Loading branch information
UnderGreen authored May 16, 2019
2 parents e802ae8 + af6b7ba commit fcbfa7e
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion assets/site-app/images/hook/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/sh
set -e
set -ex

echo "Assuming changeset from the environment: $RIG_CHANGESET"
# note that rig does not take explicit changeset ID
Expand Down
16 changes: 16 additions & 0 deletions assets/site-app/resources/app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,22 @@ hooks:
- name: hook
image: site-app-hook:0.0.1
args: ["update"]
postUpdate:
job: |
apiVersion: batch/v1
kind: Job
metadata:
name: site-app-post-update
spec:
template:
metadata:
name: site-app-post-update
spec:
restartPolicy: OnFailure
containers:
- name: post-update-hook
image: quay.io/gravitational/debian-tall:stretch
command: ["/opt/bin/gravity", "site", "status"]
rollback:
job: |
apiVersion: batch/v1
Expand Down

0 comments on commit fcbfa7e

Please sign in to comment.