Fixing volume entry definitions
* According to http://kubernetes.io/docs/user-guide/volumes/#types-of-volumes anda1b5325011
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:
parent
24c4a2d443
commit
5c680111b6
@ -24,7 +24,7 @@ Properties:
|
||||
Methods:
|
||||
getType:
|
||||
Body:
|
||||
Return: HostDir
|
||||
Return: HostPath
|
||||
|
||||
getParameters:
|
||||
Body:
|
||||
|
@ -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"
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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:
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user