Fixing volume entry definitions

* According to
   http://kubernetes.io/docs/user-guide/volumes/#types-of-volumes
   and
   a1b5325011
   there is hostPath volume type instead of hostDir;
   And there is no 'source' keyword anymore.

 * Replacing 'kubectl update' on 'kubectl replace':
   kubectl update is deprecated, need to use 'replace':
   9b3d42c090

Closes-Bug: #1604766

Change-Id: I1029caeb2827fc9de271b457c7a61b043d0189cb
This commit is contained in:
Nikolay Mahotkin 2016-08-22 13:50:42 +03:00
parent 24c4a2d443
commit 5c680111b6
10 changed files with 15 additions and 14 deletions

View File

@ -24,7 +24,7 @@ Properties:
Methods:
getType:
Body:
Return: HostDir
Return: HostPath
getParameters:
Body:

View File

@ -3,4 +3,4 @@
# $1 - service name
# $2 - publicIPs JSON
/opt/bin/kubectl update service "$1" --patch="$2"
/opt/bin/kubectl replace service "$1" --patch="$2"

View File

@ -15,5 +15,5 @@ if [ "$1" == "True" ]; then
/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
/opt/bin/kubectl replace -f "${fileName}" >> /tmp/murano-kube.log
fi

View File

@ -3,6 +3,6 @@ if [ "$1" == "True" ]; then
echo "Creating a new Replication Controller" >> /tmp/murano-kube.log
/opt/bin/kubectl create -f /tmp/controller.json >> /tmp/murano-kube.log
else
echo "Updating a Replication Controller" >> /tmp/murano-kube.log
/opt/bin/kubectl update -f /tmp/controller.json >> /tmp/murano-kube.log
echo "Replacing a Replication Controller" >> /tmp/murano-kube.log
/opt/bin/kubectl replace -f /tmp/controller.json >> /tmp/murano-kube.log
fi

View File

@ -14,5 +14,5 @@ if [ "$1" == "True" ]; then
/opt/bin/kubectl create -f "${fileName}" >> /tmp/murano-kube.log
else
echo "Updating a Service" >> /tmp/murano-kube.log
/opt/bin/kubectl update -f "${fileName}" >> /tmp/murano-kube.log
/opt/bin/kubectl replace -f "${fileName}" >> /tmp/murano-kube.log
fi

View File

@ -20,5 +20,5 @@ if [ "$1" == "True" ]; then
/opt/bin/kubectl create -f /tmp/pod.json >> /tmp/murano-kube.log
else
echo "Updating a Pod" >> /tmp/murano-kube.log
/opt/bin/kubectl update -f /tmp/pod.json >> /tmp/murano-kube.log
/opt/bin/kubectl replace -f /tmp/pod.json >> /tmp/murano-kube.log
fi

View File

@ -16,5 +16,5 @@ if [ "$1" == "True" ]; then
/opt/bin/kubectl create -f /tmp/controller.json >> /tmp/murano-kube.log
else
echo "Updating a Replication Controller" >> /tmp/murano-kube.log
/opt/bin/kubectl update -f /tmp/controller.json >> /tmp/murano-kube.log
/opt/bin/kubectl replace -f /tmp/controller.json >> /tmp/murano-kube.log
fi

View File

@ -16,5 +16,5 @@ if [ "$1" == "True" ]; then
/opt/bin/kubectl create -f /tmp/service.json >> /tmp/murano-kube.log
else
echo "Updating a Service" >> /tmp/murano-kube.log
/opt/bin/kubectl update -f /tmp/service.json >> /tmp/murano-kube.log
/opt/bin/kubectl replace -f /tmp/service.json >> /tmp/murano-kube.log
fi

View File

@ -169,9 +169,9 @@ Methods:
- $type: $volume.getType()
- Value: $type
Match:
HostDir:
HostPath:
- $spec:
hostDir:
hostPath:
path: $volume.getParameters()
TempVolume:
- $spec:
@ -179,9 +179,10 @@ Methods:
Default:
- Throw: UnknownDockerVolumeType
Message: format('Unknown docker volume type {0}', $type)
- Return:
- $result:
name: $._generateVolumeName($name, $volume)
source: $spec
- Return: $result.mergeWith($spec)
_deleteContainer:

View File

@ -176,7 +176,7 @@ deploying both Kubernetes and it's nodes.
Check each port in applicationPorts and creates or updates it if the port
differs from what it was before (or did not exist). Calls
`kubectl update` or `kubectl create` on master node.
`kubectl replace` or `kubectl create` on master node.
`deleteServices(applicationName, podId)`
* `applicationName` a string holding application's name,