use node name for instances (#55)

This commit is contained in:
David Dollar 2019-12-23 19:25:38 -05:00 committed by GitHub
parent 92241422b0
commit 3585f15a50
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 3 deletions

View File

@ -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,

View File

@ -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,