From 060c1222523f2fe1ca15877b560faaf8e4385a40 Mon Sep 17 00:00:00 2001 From: Beata Skiba Date: Thu, 22 Mar 2018 20:32:32 +0100 Subject: [PATCH] Fix for multi line KUBELET_ARGS --- cluster-autoscaler/cloudprovider/gce/templates.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cluster-autoscaler/cloudprovider/gce/templates.go b/cluster-autoscaler/cloudprovider/gce/templates.go index a270b22b926d..866766e0cc98 100644 --- a/cluster-autoscaler/cloudprovider/gce/templates.go +++ b/cluster-autoscaler/cloudprovider/gce/templates.go @@ -420,6 +420,8 @@ func extractAutoscalerVarFromKubeEnv(kubeEnv, name string) ([]string, error) { func extractFromKubeEnv(kubeEnv, resource string) ([]string, error) { result := make([]string, 0) + kubeEnv = strings.Replace(kubeEnv, "\n ", " ", -1) + for line, env := range strings.Split(kubeEnv, "\n") { env = strings.Trim(env, " ") if len(env) == 0 {