Skip to content

Commit

Permalink
Use kloader 1.5.1 and check config before starting runit. (#140)
Browse files Browse the repository at this point in the history
  • Loading branch information
tamalsaha committed Jun 2, 2017
1 parent b00fe77 commit dd107b0
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion hack/docker/haproxy/1.7.2/setup.sh
Expand Up @@ -16,7 +16,7 @@ TAG=1.7.2-$TAG

build() {
pushd $(dirname "${BASH_SOURCE}")
wget -O kloader https://cdn.appscode.com/binaries/kloader/1.5.0/kloader-linux-amd64
wget -O kloader https://cdn.appscode.com/binaries/kloader/1.5.1/kloader-linux-amd64
chmod +x kloader
local cmd="docker build -t appscode/$IMG:$TAG ."
echo $cmd; $cmd
Expand Down
6 changes: 6 additions & 0 deletions hack/docker/haproxy/1.7.5/runit.sh
Expand Up @@ -23,5 +23,11 @@ do
cat $dir/tls.key >> $CERT_DIR/$secret.pem
done

echo "Checking HAProxy configuration ..."
cmd="exec /kloader check $KLOADER_ARGS"
echo $cmd
$cmd
rc=$?; if [[ $rc != 0 ]]; then exit $rc; fi

echo "Starting runit..."
exec /usr/sbin/runsvdir-start
2 changes: 1 addition & 1 deletion hack/docker/haproxy/1.7.5/setup.sh
Expand Up @@ -16,7 +16,7 @@ TAG=1.7.5-$TAG

build() {
pushd $(dirname "${BASH_SOURCE}")
wget -O kloader https://cdn.appscode.com/binaries/kloader/1.5.0/kloader-linux-amd64
wget -O kloader https://cdn.appscode.com/binaries/kloader/1.5.1/kloader-linux-amd64
chmod +x kloader
local cmd="docker build -t appscode/$IMG:$TAG ."
echo $cmd; $cmd
Expand Down
2 changes: 1 addition & 1 deletion hack/docker/haproxy/1.7.5/sv/reloader/run
Expand Up @@ -4,6 +4,6 @@ exec 2> >(logger -s -p daemon.error -t ${PWD##*/})
source /etc/envvars

echo "Starting HAProxy configuration watcher and reloader ..."
cmd="exec /kloader $KLOADER_ARGS"
cmd="exec /kloader run $KLOADER_ARGS"
echo $cmd
$cmd

0 comments on commit dd107b0

Please sign in to comment.