hydra bootstraping
This commit is contained in:
17
opencloud/charts/hydra/files/watch.sh
Normal file
17
opencloud/charts/hydra/files/watch.sh
Normal file
@@ -0,0 +1,17 @@
|
||||
set -Eeuo pipefail
|
||||
set -x
|
||||
|
||||
function rollOut() {
|
||||
DEPLOY=$(kubectl get deploy -n "${NAMESPACE}" -l "${1}" -o name)
|
||||
kubectl set env -n $NAMESPACE ${DEPLOY} sync=$(date "+%Y%m%d-%H%M%S")
|
||||
kubectl rollout status -n $NAMESPACE ${DEPLOY}
|
||||
}
|
||||
|
||||
while true; do
|
||||
# After change in the CM the symlink is recreated, so we need to restart the monitor
|
||||
inotifywait --event DELETE_SELF "${WATCH_FILE}" |
|
||||
while read path _ file; do
|
||||
echo "---> $path$file modified"
|
||||
rollOut "${LABEL_SELECTOR}"
|
||||
done
|
||||
done
|
||||
Reference in New Issue
Block a user