Valerii Kovalchuk 3c3371f270 [kubernetes] Create actions to recreate pods and restart containers
This patch adds actions to KubernetesPod class which allow to
recreate a pod (delete it and create new one) and to restart docker
containers on minion nodes.

Change-Id: Ia03b27d72662700fb302960adba9dae20203b597
Closes-bug: #1466359
2016-06-10 19:19:36 +03:00

8 lines
171 B
Bash

#!/bin/bash
# $1 - POD NAME AS A PART OF CONTAINER NAME
CONTAINERS=$(docker ps -q --filter "name=_$1-")
if (( ${#CONTAINERS} > 0 )); then
docker restart $CONTAINERS
fi