Skip to content

Commit

Permalink
Redeploy bb-terminus deployment in lifecycle env
Browse files Browse the repository at this point in the history
The lifecycle test env redeployed pods and services.

Introduce redeployment of entire deployments. Also introduce TLS.

Part of #43.

Signed-off-by: Andrew Seigner <[email protected]>
  • Loading branch information
siggy committed Jul 3, 2018
1 parent e47e5b9 commit e237345
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lifecycle/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ kubectl create clusterrolebinding cluster-admin-binding-$USER \
Deploy 5 lifecycle namespaces:

```bash
conduit install --conduit-namespace conduit-lifecycle | kubectl apply -f -
conduit install --conduit-namespace conduit-lifecycle --tls optional | kubectl apply -f -
bin/deploy 5
```

Expand Down
2 changes: 1 addition & 1 deletion lifecycle/bin/deploy
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ do
echo "\nDeploying $NS..."
kubectl create ns $NS
cat lifecycle.yml |
conduit inject --conduit-namespace conduit-lifecycle - |
conduit inject --conduit-namespace conduit-lifecycle --tls optional - |
kubectl -n $NS apply -f -
done
11 changes: 8 additions & 3 deletions lifecycle/lifecycle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ spec:
exec \
/out/bb terminus \
--grpc-server-port=9090 \
--response-text=BANANA
--response-text=BANANA0
ports:
- containerPort: 9090
name: bb-term-grpc
Expand Down Expand Up @@ -366,16 +366,21 @@ data:
if [ $(( NOW - LAST )) -gt 30 ]; then
echo "bouncing services..."
for i in `seq 1 10`; do
svc=$(kubectl -n $LIFECYCLE_NS get svc/bb-terminus$i -o json)
SVC=$(kubectl -n $LIFECYCLE_NS get svc/bb-terminus$i -o json)
kubectl -n $LIFECYCLE_NS delete svc/bb-terminus$i
echo $svc | kubectl -n $LIFECYCLE_NS apply -f -
echo $SVC | kubectl -n $LIFECYCLE_NS apply -f -
done
LAST=NOW
fi
echo "sleeping for ${SLEEP_TIME} seconds..."
sleep $SLEEP_TIME
done
# redeploy the whole bb-terminus deployment
echo "redeploying bb-terminus deployment"
DEPLOY=$(kubectl -n $LIFECYCLE_NS get deploy/bb-terminus -o json)
echo $DEPLOY | sed -E 's/BANANA[0-9]+/BANANA'$(date +'%s')'/g' | kubectl -n $LIFECYCLE_NS apply -f -
done
---
apiVersion: extensions/v1beta1
Expand Down

0 comments on commit e237345

Please sign in to comment.