missing updates #5
@@ -2,7 +2,6 @@ package discovery
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"log"
|
|
||||||
|
|
||||||
v1 "k8s.io/api/core/v1"
|
v1 "k8s.io/api/core/v1"
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
@@ -56,7 +55,7 @@ func (k *K8sDiscovery) Watch() (<-chan HostChange, error) {
|
|||||||
for event := range watcher.ResultChan() {
|
for event := range watcher.ResultChan() {
|
||||||
|
|
||||||
pod := event.Object.(*v1.Pod)
|
pod := event.Object.(*v1.Pod)
|
||||||
log.Printf("pod change %v", pod.Status)
|
// log.Printf("pod change %+v", pod.Status.Phase == v1.PodRunning)
|
||||||
ch <- HostChange{
|
ch <- HostChange{
|
||||||
Host: pod.Status.PodIP,
|
Host: pod.Status.PodIP,
|
||||||
Type: event.Type,
|
Type: event.Type,
|
||||||
|
|||||||
Reference in New Issue
Block a user