From d785e633a9c01bae74dc4047dac5f5713564297b Mon Sep 17 00:00:00 2001 From: Emad Alashi Date: Thu, 31 Oct 2019 04:02:32 +1100 Subject: [PATCH] Don't fail resolving env if could'nt read a value (#404) --- pkg/handler/scale_handler.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/handler/scale_handler.go b/pkg/handler/scale_handler.go index cc7342c32ec..34c63533842 100644 --- a/pkg/handler/scale_handler.go +++ b/pkg/handler/scale_handler.go @@ -408,7 +408,8 @@ func (h *ScaleHandler) resolveEnv(container *core_v1.Container, namespace string namespace) } } else { - return nil, fmt.Errorf("cannot resolve env %s to a value. fieldRef and resourceFieldRef env are skipped", envVar.Name) + log.Warningf("cannot resolve env %s to a value. fieldRef and resourceFieldRef env are skipped", envVar.Name) + continue } }