Action "exportConfig" removed from KubernetesCluster package
Change-Id: I9cb5366afca2d08c9e39808aa308f628d9bd0766
This commit is contained in:
parent
ce64434d6a
commit
1dcc9914dc
@ -509,17 +509,6 @@ Methods:
|
||||
- $._environment.reporter.report($this, 'No gateway nodes that can be removed')
|
||||
|
||||
|
||||
exportConfig:
|
||||
Usage: Action
|
||||
Body:
|
||||
- $._environment.reporter.report($this, 'Action exportConfig called')
|
||||
- $resources: new(sys:Resources)
|
||||
- $template: $resources.yaml('ExportConfig.template')
|
||||
- $result: $.masterNode.instance.agent.call($template, $resources)
|
||||
- $._environment.reporter.report($this, 'Got archive from Kubernetes')
|
||||
- Return: new(std:File, base64Content => $result.content,
|
||||
filename => 'application.tar.gz')
|
||||
|
||||
|
||||
scaleRc:
|
||||
Arguments:
|
||||
|
@ -1,35 +0,0 @@
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
FormatVersion: 2.0.0
|
||||
Version: 1.0.0
|
||||
Name: Export Config
|
||||
|
||||
Parameters:
|
||||
name: $name
|
||||
|
||||
Body: |
|
||||
log=setup('{0}'.format(args.name)).stdout
|
||||
filename='/var/run/murano-kubernetes/application.tgz.b64'
|
||||
with open(filename,'r') as f:
|
||||
content=f.read()
|
||||
return {'log': log, 'content': content}
|
||||
|
||||
Scripts:
|
||||
setup:
|
||||
Type: Application
|
||||
Version: 1.0.0
|
||||
EntryPoint: exportConfig.sh
|
||||
Files: []
|
||||
Options:
|
||||
captureStdout: true
|
||||
captureStderr: true
|
@ -1,19 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
DEFINITION_DIR=/var/run/murano-kubernetes
|
||||
cd $DEFINITION_DIR
|
||||
rm /tmp/application.tgz
|
||||
rm ./application.tgz.b64
|
||||
|
||||
echo "#!/bin/bash" > setup.sh
|
||||
while read line
|
||||
do
|
||||
name=`echo $line | cut -d' ' -f1`
|
||||
kind=`echo $line | cut -d' ' -f2`
|
||||
file=`basename $(echo $line | cut -d' ' -f3)`
|
||||
echo "echo 'Creating $kind $name'" >> setup.sh
|
||||
echo "/opt/bin/kubectl create -f $file" >> setup.sh
|
||||
done < ./elements.list
|
||||
|
||||
tar czf /tmp/application.tgz * --exclude=*.list
|
||||
base64 /tmp/application.tgz > ./application.tgz.b64
|
@ -124,10 +124,6 @@ KubernetesCluster provides the following actions:
|
||||
* `scaleNodesDown`: decrease the number of worker nodes by 1.
|
||||
* `scaleGatewaysUp`: increase the number of gateway nodes by 1.
|
||||
* `scaleGatewaysDown`: decrease the number of gateway nodes by 1.
|
||||
* `exportConfig`: returns an archive file containing shell script and data
|
||||
files. Use the script to manually recreate Kubernetes entities (pods,
|
||||
replication controllers and services) on another Kubernetes installation.
|
||||
This is an experimental feature.
|
||||
|
||||
KubernetesPod has the following actions:
|
||||
|
||||
@ -216,12 +212,6 @@ deploying both Kubernetes and it's nodes.
|
||||
and call `.deploy()`.
|
||||
Can be used as an Action.
|
||||
|
||||
`exportConfig()`
|
||||
Return current configuration as an `application.tar.gz` file.
|
||||
For each Pod and Service configured `/opt/bin/kubectl create -f` is called,
|
||||
storing the results in a shell script.
|
||||
Can be used as an Action.
|
||||
|
||||
KubernetesNode
|
||||
~~~~~~~~~~~~~~
|
||||
Base class for all Kubernetes nodes.
|
||||
|
Loading…
x
Reference in New Issue
Block a user