diff --git a/Docker/Kubernetes/KubernetesCluster/package/Classes/KubernetesCluster.yaml b/Docker/Kubernetes/KubernetesCluster/package/Classes/KubernetesCluster.yaml index 58492e6e..3fbca370 100644 --- a/Docker/Kubernetes/KubernetesCluster/package/Classes/KubernetesCluster.yaml +++ b/Docker/Kubernetes/KubernetesCluster/package/Classes/KubernetesCluster.yaml @@ -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: diff --git a/Docker/Kubernetes/KubernetesCluster/package/Resources/ExportConfig.template b/Docker/Kubernetes/KubernetesCluster/package/Resources/ExportConfig.template deleted file mode 100644 index a1e34f34..00000000 --- a/Docker/Kubernetes/KubernetesCluster/package/Resources/ExportConfig.template +++ /dev/null @@ -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 diff --git a/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/exportConfig.sh b/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/exportConfig.sh deleted file mode 100644 index c4c9a1a6..00000000 --- a/Docker/Kubernetes/KubernetesCluster/package/Resources/scripts/exportConfig.sh +++ /dev/null @@ -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 diff --git a/Docker/Kubernetes/README.rst b/Docker/Kubernetes/README.rst index 86497a01..d03b20ea 100644 --- a/Docker/Kubernetes/README.rst +++ b/Docker/Kubernetes/README.rst @@ -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.