mirror of
https://github.com/go-micro/go-micro.git
synced 2025-05-19 21:23:04 +02:00
parent
86d8d8f07e
commit
ed44e9acc3
@ -191,7 +191,7 @@ func (c *kregistry) GetService(name string, opts ...registry.GetOption) ([]*regi
|
|||||||
|
|
||||||
// loop through items
|
// loop through items
|
||||||
for _, pod := range pods.Items {
|
for _, pod := range pods.Items {
|
||||||
if pod.Status.Phase != podRunning || pod.Meta.DeletionTimestamp != "" {
|
if pod.Status.Phase != podRunning || pod.Metadata.DeletionTimestamp != "" {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
// get serialised service from annotation
|
// get serialised service from annotation
|
||||||
@ -235,7 +235,7 @@ func (c *kregistry) ListServices(opts ...registry.ListOption) ([]*registry.Servi
|
|||||||
svcs := make(map[string]bool)
|
svcs := make(map[string]bool)
|
||||||
|
|
||||||
for _, pod := range pods.Items {
|
for _, pod := range pods.Items {
|
||||||
if pod.Status.Phase != podRunning || pod.Meta.DeletionTimestamp != "" {
|
if pod.Status.Phase != podRunning || pod.Metadata.DeletionTimestamp != "" {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
for k, v := range pod.Metadata.Annotations {
|
for k, v := range pod.Metadata.Annotations {
|
||||||
|
@ -155,7 +155,7 @@ func (k *k8sWatcher) handleEvent(event watch.Event) {
|
|||||||
|
|
||||||
for _, result := range results {
|
for _, result := range results {
|
||||||
// pod isnt running
|
// pod isnt running
|
||||||
if pod.Status.Phase != podRunning || pod.Meta.DeletionTimestamp != "" {
|
if pod.Status.Phase != podRunning || pod.Metadata.DeletionTimestamp != "" {
|
||||||
result.Action = "delete"
|
result.Action = "delete"
|
||||||
}
|
}
|
||||||
k.next <- result
|
k.next <- result
|
||||||
|
Loading…
x
Reference in New Issue
Block a user