
UpdatePod execution plan was using field from Pod definition that was present in v1beta1 API but is no longer used in v1beta3 Change-Id: Ib57a0e5cc7104d5e1fa39b07644eab182a7fdf45 Closes-Bug: #1447594 (cherry picked from commit a680bf5899e006ff1e3ecf1ee3e3c7cce4a9bebb)
20 lines
490 B
Bash
20 lines
490 B
Bash
#!/bin/bash
|
|
|
|
# File with pod is /tmp/pod.json
|
|
# $1 new or update
|
|
DEFINITION_DIR=/var/run/murano-kubernetes
|
|
mkdir -p $DEFINITION_DIR
|
|
|
|
podId=$2
|
|
fileName=$3
|
|
echo "$podId Pod $fileName" >> $DEFINITION_DIR/elements.list
|
|
|
|
if [ "$1" == "True" ]; then
|
|
#new Pod
|
|
echo "Creating a new Pod" >> /tmp/murano-kube.log
|
|
/opt/bin/kubectl create -f $fileName >> /tmp/murano-kube.log
|
|
else
|
|
echo "Updating a Pod" >> /tmp/murano-kube.log
|
|
/opt/bin/kubectl update -f $fileName >> /tmp/murano-kube.log
|
|
fi
|