Skip to content

Commit

Permalink
Merge pull request #741 from bskiba/fix-kube-env
Browse files Browse the repository at this point in the history
Fix for multi line KUBELET_ARGS
  • Loading branch information
mwielgus authored Mar 22, 2018
2 parents e8aeb60 + 060c122 commit d3cbc86
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cluster-autoscaler/cloudprovider/gce/templates.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit d3cbc86

Please sign in to comment.