From 4026fd9c9f945c41d84e8f264432ed54de621296 Mon Sep 17 00:00:00 2001 From: Stan Lagun <slagun@mirantis.com> Date: Sat, 10 Oct 2015 01:47:12 +0300 Subject: [PATCH] [Docker] Pod (RC) scaling was fixed Change-Id: I287cdbed1c3b8f8bad0a80219e108f445ad409b3 Closes-Bug: #1504644 --- .../KubernetesCluster/package/Classes/KubernetesCluster.yaml | 1 + Kubernetes/KubernetesCluster/package/Resources/ScaleRc.template | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Kubernetes/KubernetesCluster/package/Classes/KubernetesCluster.yaml b/Kubernetes/KubernetesCluster/package/Classes/KubernetesCluster.yaml index 6b980fd..779d1be 100644 --- a/Kubernetes/KubernetesCluster/package/Classes/KubernetesCluster.yaml +++ b/Kubernetes/KubernetesCluster/package/Classes/KubernetesCluster.yaml @@ -503,6 +503,7 @@ Methods: - newSize: Contract: $.int().notNull() Body: + - $resources: new(sys:Resources) - $template: $resources.yaml('ScaleRc.template').bind(dict( rcName => $rcName, newSize => $newSize diff --git a/Kubernetes/KubernetesCluster/package/Resources/ScaleRc.template b/Kubernetes/KubernetesCluster/package/Resources/ScaleRc.template index 0b7f3e3..8dcaa56 100644 --- a/Kubernetes/KubernetesCluster/package/Resources/ScaleRc.template +++ b/Kubernetes/KubernetesCluster/package/Resources/ScaleRc.template @@ -19,7 +19,7 @@ Parameters: newSize: $newSize Body: | - return scaleRc('{0} {1}'.format(args.rcName, args.newSize).stdout + return scaleRc('{0} {1}'.format(args.rcName, args.newSize)).stdout Scripts: scaleRc: