diff --git a/flytestdlib/resolver/k8s_resolver.go b/flytestdlib/resolver/k8s_resolver.go index 4b10efc437..07e1883b77 100644 --- a/flytestdlib/resolver/k8s_resolver.go +++ b/flytestdlib/resolver/k8s_resolver.go @@ -155,12 +155,14 @@ func (k *kResolver) resolve(e *v1.Endpoints) { func (k *kResolver) run() { k.wg.Add(1) defer k.wg.Done() - logger.Infof(k.ctx, "Starting k8s resolver for target: %s", k.target) + + logger.Infof(k.ctx, "Starting k8s resolver for target: [%s], service namespace: [%s], service name: [%s]", k.target, k.target.serviceNamespace, k.target.serviceName) + watcher, err := k.k8sClient.CoreV1().Endpoints(k.target.serviceNamespace).Watch(k.ctx, metav1.ListOptions{FieldSelector: "metadata.name=" + k.target.serviceName}) if err != nil { logger.Errorf( k.ctx, - "k8s resolver: failed to create watcher for target [%s]: namespace [%s], service [%s], error [%v]", + "k8s resolver: failed to create watcher for target [%s]: service namespace: [%s], service name: [%s], "+"error [%v]", k.target, k.target.serviceNamespace, k.target.serviceName, err, ) if statusErr, ok := err.(*errors.StatusError); ok { @@ -177,11 +179,7 @@ func (k *kResolver) run() { case <-k.ctx.Done(): return case event, ok := <-watcher.ResultChan(): - logger.Info(k.ctx, "k8s resolver watchet event response: [%v]", event) - logger.Info(k.ctx, "k8s resolver watchet event Object response: [%v]", event.Object) - if event.Object != nil { - logger.Info(k.ctx, "k8s resolver watchet event Object Kind: [%v]", event.Object.GetObjectKind()) - } + logger.Info(k.ctx, "k8s resolver watcher event response: [%v]", event) if !ok { logger.Debugf(k.ctx, "k8s resolver: watcher closed") return