From 3585f15a50065eb80a95bcf9f375bc68a10404bc Mon Sep 17 00:00:00 2001 From: David Dollar Date: Mon, 23 Dec 2019 19:25:38 -0500 Subject: [PATCH] use node name for instances (#55) --- provider/k8s/instance.go | 3 +-- provider/k8s/process.go | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/provider/k8s/instance.go b/provider/k8s/instance.go index 8471abb..d3d9919 100644 --- a/provider/k8s/instance.go +++ b/provider/k8s/instance.go @@ -4,7 +4,6 @@ import ( "fmt" "io" - "github.com/convox/convox/pkg/common" "github.com/convox/convox/pkg/structs" ac "k8s.io/api/core/v1" am "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -56,7 +55,7 @@ func (p *Provider) InstanceList() (structs.Instances, error) { } is = append(is, structs.Instance{ - Id: common.CoalesceString(n.Spec.ProviderID, n.ObjectMeta.Name), + Id: n.ObjectMeta.Name, PrivateIp: private, Processes: len(pds.Items), PublicIp: public, diff --git a/provider/k8s/process.go b/provider/k8s/process.go index 77e8b85..cd51072 100644 --- a/provider/k8s/process.go +++ b/provider/k8s/process.go @@ -564,7 +564,7 @@ func processFromPod(pd ac.Pod) (*structs.Process, error) { Command: shellquote.Join(cs[0].Args...), Host: "", Image: cs[0].Image, - Instance: "", + Instance: pd.Spec.NodeName, Name: pd.ObjectMeta.Labels["service"], Release: pd.ObjectMeta.Labels["release"], Started: pd.CreationTimestamp.Time,