Add regenerate controller pod script

When developing using containerized mode, you'd need to go over the
steps on [1] quite a few times. This script just automates the process
for ease of development.

[1] https://docs.openstack.org/kuryr-kubernetes/latest/installation/devstack/containerized.html

Change-Id: I034b1d79941e1f986dd7c4991c7c971bb202bf75
This commit is contained in:
Daniel Mellado 2018-07-11 09:51:10 -04:00
parent 3e1f3e03ac
commit 6f097561e5
1 changed files with 17 additions and 0 deletions

View File

@ -0,0 +1,17 @@
#!/bin/bash
set -o errexit
KURYR_DIR=${KURYR_DIR:-/opt/stack/kuryr-kubernetes}
KURYR_CONTROLLER_NAME=${KURYR_CONTROLLER_NAME:-kuryr-controller}
function build_tagged_container {
docker build -t kuryr/controller -f $KURYR_DIR/controller.Dockerfile $KURYR_DIR
}
function recreate_controller {
kubectl delete pods -n kube-system -l name=$KURYR_CONTROLLER_NAME
}
build_tagged_container
recreate_controller