From 49b938dfa7341b8e0d621338ee066e79dead17de Mon Sep 17 00:00:00 2001 From: Spencer Hance Date: Tue, 3 Dec 2019 14:27:16 -0800 Subject: [PATCH] Fix default backend port bug for neg ilb Fixes a bug where we create a neg for the default backend with the wrong port --- cmd/glbc/app/init.go | 1 + pkg/context/context.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/glbc/app/init.go b/cmd/glbc/app/init.go index e548eb3861..0244c3204d 100644 --- a/cmd/glbc/app/init.go +++ b/cmd/glbc/app/init.go @@ -72,6 +72,7 @@ func servicePortForDefaultService(svc *v1.Service, svcPort intstr.IntOrString, n Port: svcPort, }, TargetPort: port.TargetPort.StrVal, + Port: port.Port, } } } diff --git a/pkg/context/context.go b/pkg/context/context.go index 9ced4afe00..97e4f9e9ea 100644 --- a/pkg/context/context.go +++ b/pkg/context/context.go @@ -134,7 +134,7 @@ func NewControllerContext( // Init inits the Context, so that we can defers some config until the main thread enter actually get the leader lock. func (ctx *ControllerContext) Init() { - klog.V(2).Infof("Controller Context initializing with %v", ctx.ControllerContextConfig) + klog.V(2).Infof("Controller Context initializing with %+v", ctx.ControllerContextConfig) // Initialize controller context internals based on ASMConfigMap if ctx.EnableASMConfigMap { configMapInformer := informerv1.NewConfigMapInformer(ctx.KubeClient, ctx.Namespace, ctx.ResyncPeriod, utils.NewNamespaceIndexer())