diff --git a/proto/topo.proto b/proto/topo.proto index 59c1757e..4af374c7 100644 --- a/proto/topo.proto +++ b/proto/topo.proto @@ -87,6 +87,10 @@ message Node { // Any host constraints required by the node. These may not be required by a // vendor, but it can be used to provide requirements for the node. repeated HostConstraint host_constraints = 13; + // Assigned by KNE. + // Cluster-internal IP assigned by Kubernetes for the pod. + // This IP comes from the worker node's IP pool. + string pod_ip = 14; } // HostConstraint is a constraint on the host where the node is running. diff --git a/proto/topo/topo.pb.go b/proto/topo/topo.pb.go index c489ca40..057831f5 100644 --- a/proto/topo/topo.pb.go +++ b/proto/topo/topo.pb.go @@ -349,6 +349,10 @@ type Node struct { // Any host constraints required by the node. These may not be required by a // vendor, but it can be used to provide requirements for the node. HostConstraints []*HostConstraint `protobuf:"bytes,13,rep,name=host_constraints,json=hostConstraints,proto3" json:"host_constraints,omitempty"` + // Assigned by KNE. + // Cluster-internal IP assigned by Kubernetes for the pod. + // This IP comes from the worker node's IP pool. + PodIp string `protobuf:"bytes,14,opt,name=pod_ip,json=podIp,proto3" json:"pod_ip,omitempty"` } func (x *Node) Reset() { @@ -468,6 +472,13 @@ func (x *Node) GetHostConstraints() []*HostConstraint { return nil } +func (x *Node) GetPodIp() string { + if x != nil { + return x.PodIp + } + return "" +} + // HostConstraint is a constraint on the host where the node is running. type HostConstraint struct { state protoimpl.MessageState @@ -1310,7 +1321,7 @@ var file_topo_proto_rawDesc = []byte{ 0x6f, 0x70, 0x6f, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x20, 0x0a, 0x05, 0x6c, 0x69, 0x6e, 0x6b, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0a, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x2e, 0x4c, 0x69, 0x6e, 0x6b, 0x52, 0x05, 0x6c, 0x69, 0x6e, 0x6b, - 0x73, 0x22, 0xe9, 0x07, 0x0a, 0x04, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, + 0x73, 0x22, 0x80, 0x08, 0x0a, 0x04, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x27, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0f, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x42, 0x02, 0x18, @@ -1341,155 +1352,156 @@ var file_topo_proto_rawDesc = []byte{ 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x52, 0x0f, 0x68, 0x6f, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, - 0x61, 0x69, 0x6e, 0x74, 0x73, 0x1a, 0x39, 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, - 0x1a, 0x4a, 0x0a, 0x0d, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x03, - 0x6b, 0x65, 0x79, 0x12, 0x23, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3e, 0x0a, 0x10, - 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, - 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x4e, 0x0a, 0x0f, - 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, - 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, - 0x79, 0x12, 0x25, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x0f, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, - 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xd8, 0x01, 0x0a, - 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, - 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x48, 0x4f, 0x53, 0x54, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, - 0x41, 0x52, 0x49, 0x53, 0x54, 0x41, 0x5f, 0x43, 0x45, 0x4f, 0x53, 0x10, 0x02, 0x12, 0x10, 0x0a, - 0x0c, 0x4a, 0x55, 0x4e, 0x49, 0x50, 0x45, 0x52, 0x5f, 0x43, 0x45, 0x56, 0x4f, 0x10, 0x03, 0x12, - 0x0d, 0x0a, 0x09, 0x43, 0x49, 0x53, 0x43, 0x4f, 0x5f, 0x43, 0x58, 0x52, 0x10, 0x04, 0x12, 0x0a, - 0x0a, 0x06, 0x51, 0x55, 0x41, 0x47, 0x47, 0x41, 0x10, 0x05, 0x12, 0x07, 0x0a, 0x03, 0x46, 0x52, - 0x52, 0x10, 0x06, 0x12, 0x0f, 0x0a, 0x0b, 0x4a, 0x55, 0x4e, 0x49, 0x50, 0x45, 0x52, 0x5f, 0x56, - 0x4d, 0x58, 0x10, 0x07, 0x12, 0x0d, 0x0a, 0x09, 0x43, 0x49, 0x53, 0x43, 0x4f, 0x5f, 0x43, 0x53, - 0x52, 0x10, 0x08, 0x12, 0x0d, 0x0a, 0x09, 0x4e, 0x4f, 0x4b, 0x49, 0x41, 0x5f, 0x53, 0x52, 0x4c, - 0x10, 0x09, 0x12, 0x0b, 0x0a, 0x07, 0x49, 0x58, 0x49, 0x41, 0x5f, 0x54, 0x47, 0x10, 0x0a, 0x12, - 0x09, 0x0a, 0x05, 0x47, 0x4f, 0x42, 0x47, 0x50, 0x10, 0x0b, 0x12, 0x0d, 0x0a, 0x09, 0x43, 0x49, - 0x53, 0x43, 0x4f, 0x5f, 0x58, 0x52, 0x44, 0x10, 0x0c, 0x12, 0x0f, 0x0a, 0x0b, 0x43, 0x49, 0x53, - 0x43, 0x4f, 0x5f, 0x45, 0x38, 0x30, 0x30, 0x30, 0x10, 0x0d, 0x12, 0x0b, 0x0a, 0x07, 0x4c, 0x45, - 0x4d, 0x4d, 0x49, 0x4e, 0x47, 0x10, 0x0e, 0x4a, 0x04, 0x08, 0x03, 0x10, 0x04, 0x22, 0x60, 0x0a, - 0x0e, 0x48, 0x6f, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x12, - 0x40, 0x0a, 0x11, 0x6b, 0x65, 0x72, 0x6e, 0x65, 0x6c, 0x5f, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, - 0x61, 0x69, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x74, 0x6f, 0x70, - 0x6f, 0x2e, 0x4b, 0x65, 0x72, 0x6e, 0x65, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x48, 0x00, 0x52, - 0x10, 0x6b, 0x65, 0x72, 0x6e, 0x65, 0x6c, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, - 0x74, 0x42, 0x0c, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x22, - 0x74, 0x0a, 0x0b, 0x4b, 0x65, 0x72, 0x6e, 0x65, 0x6c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x12, 0x12, + 0x61, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x15, 0x0a, 0x06, 0x70, 0x6f, 0x64, 0x5f, 0x69, 0x70, 0x18, + 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x6f, 0x64, 0x49, 0x70, 0x1a, 0x39, 0x0a, 0x0b, + 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, + 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x4a, 0x0a, 0x0d, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x23, 0x0a, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x74, 0x6f, 0x70, 0x6f, + 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, + 0x02, 0x38, 0x01, 0x1a, 0x3e, 0x0a, 0x10, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, + 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, + 0x02, 0x38, 0x01, 0x1a, 0x4e, 0x0a, 0x0f, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, + 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x25, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x2e, 0x49, + 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, + 0x02, 0x38, 0x01, 0x22, 0xd8, 0x01, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, + 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x48, 0x4f, 0x53, + 0x54, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x41, 0x52, 0x49, 0x53, 0x54, 0x41, 0x5f, 0x43, 0x45, + 0x4f, 0x53, 0x10, 0x02, 0x12, 0x10, 0x0a, 0x0c, 0x4a, 0x55, 0x4e, 0x49, 0x50, 0x45, 0x52, 0x5f, + 0x43, 0x45, 0x56, 0x4f, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x43, 0x49, 0x53, 0x43, 0x4f, 0x5f, + 0x43, 0x58, 0x52, 0x10, 0x04, 0x12, 0x0a, 0x0a, 0x06, 0x51, 0x55, 0x41, 0x47, 0x47, 0x41, 0x10, + 0x05, 0x12, 0x07, 0x0a, 0x03, 0x46, 0x52, 0x52, 0x10, 0x06, 0x12, 0x0f, 0x0a, 0x0b, 0x4a, 0x55, + 0x4e, 0x49, 0x50, 0x45, 0x52, 0x5f, 0x56, 0x4d, 0x58, 0x10, 0x07, 0x12, 0x0d, 0x0a, 0x09, 0x43, + 0x49, 0x53, 0x43, 0x4f, 0x5f, 0x43, 0x53, 0x52, 0x10, 0x08, 0x12, 0x0d, 0x0a, 0x09, 0x4e, 0x4f, + 0x4b, 0x49, 0x41, 0x5f, 0x53, 0x52, 0x4c, 0x10, 0x09, 0x12, 0x0b, 0x0a, 0x07, 0x49, 0x58, 0x49, + 0x41, 0x5f, 0x54, 0x47, 0x10, 0x0a, 0x12, 0x09, 0x0a, 0x05, 0x47, 0x4f, 0x42, 0x47, 0x50, 0x10, + 0x0b, 0x12, 0x0d, 0x0a, 0x09, 0x43, 0x49, 0x53, 0x43, 0x4f, 0x5f, 0x58, 0x52, 0x44, 0x10, 0x0c, + 0x12, 0x0f, 0x0a, 0x0b, 0x43, 0x49, 0x53, 0x43, 0x4f, 0x5f, 0x45, 0x38, 0x30, 0x30, 0x30, 0x10, + 0x0d, 0x12, 0x0b, 0x0a, 0x07, 0x4c, 0x45, 0x4d, 0x4d, 0x49, 0x4e, 0x47, 0x10, 0x0e, 0x4a, 0x04, + 0x08, 0x03, 0x10, 0x04, 0x22, 0x60, 0x0a, 0x0e, 0x48, 0x6f, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x73, + 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x12, 0x40, 0x0a, 0x11, 0x6b, 0x65, 0x72, 0x6e, 0x65, 0x6c, + 0x5f, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x11, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x2e, 0x4b, 0x65, 0x72, 0x6e, 0x65, 0x6c, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x48, 0x00, 0x52, 0x10, 0x6b, 0x65, 0x72, 0x6e, 0x65, 0x6c, 0x43, 0x6f, + 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x42, 0x0c, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x73, + 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x22, 0x74, 0x0a, 0x0b, 0x4b, 0x65, 0x72, 0x6e, 0x65, 0x6c, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3f, 0x0a, 0x0f, 0x62, 0x6f, 0x75, + 0x6e, 0x64, 0x65, 0x64, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x2e, 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x65, + 0x64, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, 0x48, 0x00, 0x52, 0x0e, 0x62, 0x6f, 0x75, 0x6e, + 0x64, 0x65, 0x64, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, 0x42, 0x10, 0x0a, 0x0e, 0x43, 0x6f, + 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x22, 0x4a, 0x0a, 0x0e, + 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x65, 0x64, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, 0x12, 0x1b, + 0x0a, 0x09, 0x6d, 0x61, 0x78, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x08, 0x6d, 0x61, 0x78, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x6d, + 0x69, 0x6e, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, + 0x6d, 0x69, 0x6e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xcd, 0x02, 0x0a, 0x09, 0x49, 0x6e, 0x74, + 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x69, 0x6e, + 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x69, 0x6e, + 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x74, 0x75, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0d, 0x52, 0x03, 0x6d, 0x74, 0x75, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x65, 0x65, 0x72, 0x5f, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x65, 0x65, 0x72, + 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x22, 0x0a, 0x0d, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x74, + 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x65, 0x65, + 0x72, 0x49, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x75, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x67, 0x72, + 0x6f, 0x75, 0x70, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, + 0x12, 0x31, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, + 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x2e, + 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, + 0x79, 0x70, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x70, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x69, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x22, 0x44, 0x0a, 0x0d, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x54, + 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, + 0x12, 0x0c, 0x0a, 0x08, 0x4c, 0x4f, 0x4f, 0x50, 0x42, 0x41, 0x43, 0x4b, 0x10, 0x01, 0x12, 0x0e, + 0x0a, 0x0a, 0x4d, 0x41, 0x4e, 0x41, 0x47, 0x45, 0x4d, 0x45, 0x4e, 0x54, 0x10, 0x02, 0x12, 0x08, + 0x0a, 0x04, 0x44, 0x41, 0x54, 0x41, 0x10, 0x03, 0x22, 0x5e, 0x0a, 0x04, 0x4c, 0x69, 0x6e, 0x6b, + 0x12, 0x15, 0x0a, 0x06, 0x61, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x61, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x13, 0x0a, 0x05, 0x61, 0x5f, 0x69, 0x6e, 0x74, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x61, 0x49, 0x6e, 0x74, 0x12, 0x15, 0x0a, 0x06, + 0x7a, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x7a, 0x4e, + 0x6f, 0x64, 0x65, 0x12, 0x13, 0x0a, 0x05, 0x7a, 0x5f, 0x69, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x7a, 0x49, 0x6e, 0x74, 0x22, 0xe5, 0x03, 0x0a, 0x06, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x12, 0x0a, + 0x04, 0x61, 0x72, 0x67, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x61, 0x72, 0x67, + 0x73, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x27, 0x0a, 0x03, 0x65, 0x6e, 0x76, 0x18, 0x04, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x2e, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x2e, 0x45, 0x6e, 0x76, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x03, 0x65, 0x6e, 0x76, + 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, + 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x43, 0x6f, + 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, + 0x70, 0x61, 0x74, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x50, 0x61, 0x74, 0x68, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x6c, 0x65, 0x65, 0x70, + 0x18, 0x08, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x73, 0x6c, 0x65, 0x65, 0x70, 0x12, 0x28, 0x0a, + 0x04, 0x63, 0x65, 0x72, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x74, 0x6f, + 0x70, 0x6f, 0x2e, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x43, 0x66, + 0x67, 0x52, 0x04, 0x63, 0x65, 0x72, 0x74, 0x12, 0x14, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, + 0x65, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x14, 0x0a, + 0x04, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x66, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x66, + 0x69, 0x6c, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x6e, 0x69, 0x74, 0x5f, 0x69, 0x6d, 0x61, 0x67, + 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x69, 0x6e, 0x69, 0x74, 0x49, 0x6d, 0x61, + 0x67, 0x65, 0x12, 0x35, 0x0a, 0x0b, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x5f, 0x64, 0x61, 0x74, + 0x61, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0a, 0x76, + 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x44, 0x61, 0x74, 0x61, 0x1a, 0x36, 0x0a, 0x08, 0x45, 0x6e, 0x76, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, + 0x01, 0x42, 0x0d, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x64, 0x61, 0x74, 0x61, + 0x22, 0x56, 0x0a, 0x0e, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x43, + 0x66, 0x67, 0x12, 0x3a, 0x0a, 0x0b, 0x73, 0x65, 0x6c, 0x66, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x65, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x2e, 0x53, + 0x65, 0x6c, 0x66, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x43, 0x65, 0x72, 0x74, 0x43, 0x66, 0x67, + 0x48, 0x00, 0x52, 0x0a, 0x73, 0x65, 0x6c, 0x66, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x42, 0x08, + 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x87, 0x01, 0x0a, 0x11, 0x53, 0x65, 0x6c, + 0x66, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x43, 0x65, 0x72, 0x74, 0x43, 0x66, 0x67, 0x12, 0x1b, + 0x0a, 0x09, 0x63, 0x65, 0x72, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x63, 0x65, 0x72, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x6b, + 0x65, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6b, + 0x65, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x5f, 0x73, 0x69, + 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x6b, 0x65, 0x79, 0x53, 0x69, 0x7a, + 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4e, 0x61, + 0x6d, 0x65, 0x22, 0xbe, 0x01, 0x0a, 0x07, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x12, 0x3f, 0x0a, 0x0f, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x65, 0x64, 0x5f, 0x69, 0x6e, - 0x74, 0x65, 0x67, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x74, 0x6f, - 0x70, 0x6f, 0x2e, 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x65, 0x64, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x65, - 0x72, 0x48, 0x00, 0x52, 0x0e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x65, 0x64, 0x49, 0x6e, 0x74, 0x65, - 0x67, 0x65, 0x72, 0x42, 0x10, 0x0a, 0x0e, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, - 0x74, 0x54, 0x79, 0x70, 0x65, 0x22, 0x4a, 0x0a, 0x0e, 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x65, 0x64, - 0x49, 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x78, 0x5f, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x6d, 0x61, 0x78, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x69, 0x6e, 0x5f, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x6d, 0x69, 0x6e, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x22, 0xcd, 0x02, 0x0a, 0x09, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x12, - 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x69, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x10, - 0x0a, 0x03, 0x6d, 0x74, 0x75, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x03, 0x6d, 0x74, 0x75, - 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x65, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x22, 0x0a, - 0x0d, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x65, 0x65, 0x72, 0x49, 0x6e, 0x74, 0x4e, 0x61, 0x6d, - 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, - 0x75, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x07, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x31, 0x0a, 0x04, 0x74, 0x79, 0x70, - 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x2e, 0x49, - 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, - 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1d, 0x0a, 0x0a, - 0x69, 0x70, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x09, 0x69, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x44, 0x0a, 0x0d, 0x49, - 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, - 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x4c, 0x4f, 0x4f, - 0x50, 0x42, 0x41, 0x43, 0x4b, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x4d, 0x41, 0x4e, 0x41, 0x47, - 0x45, 0x4d, 0x45, 0x4e, 0x54, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x44, 0x41, 0x54, 0x41, 0x10, - 0x03, 0x22, 0x5e, 0x0a, 0x04, 0x4c, 0x69, 0x6e, 0x6b, 0x12, 0x15, 0x0a, 0x06, 0x61, 0x5f, 0x6e, - 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x4e, 0x6f, 0x64, 0x65, - 0x12, 0x13, 0x0a, 0x05, 0x61, 0x5f, 0x69, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x61, 0x49, 0x6e, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x7a, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x7a, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x13, 0x0a, 0x05, - 0x7a, 0x5f, 0x69, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x7a, 0x49, 0x6e, - 0x74, 0x22, 0xe5, 0x03, 0x0a, 0x06, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x18, 0x0a, 0x07, - 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x63, - 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x61, 0x72, 0x67, 0x73, 0x18, 0x02, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x61, 0x72, 0x67, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6d, - 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, - 0x12, 0x27, 0x0a, 0x03, 0x65, 0x6e, 0x76, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, - 0x74, 0x6f, 0x70, 0x6f, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x45, 0x6e, 0x76, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x52, 0x03, 0x65, 0x6e, 0x76, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x6e, 0x74, - 0x72, 0x79, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0c, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x1f, - 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x50, 0x61, 0x74, 0x68, 0x12, - 0x1f, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x07, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x46, 0x69, 0x6c, 0x65, - 0x12, 0x14, 0x0a, 0x05, 0x73, 0x6c, 0x65, 0x65, 0x70, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0d, 0x52, - 0x05, 0x73, 0x6c, 0x65, 0x65, 0x70, 0x12, 0x28, 0x0a, 0x04, 0x63, 0x65, 0x72, 0x74, 0x18, 0x09, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x2e, 0x43, 0x65, 0x72, 0x74, - 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x43, 0x66, 0x67, 0x52, 0x04, 0x63, 0x65, 0x72, 0x74, - 0x12, 0x14, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x65, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, - 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x14, 0x0a, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x66, - 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x1d, 0x0a, 0x0a, - 0x69, 0x6e, 0x69, 0x74, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x09, 0x69, 0x6e, 0x69, 0x74, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x35, 0x0a, 0x0b, 0x76, - 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0a, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x44, 0x61, - 0x74, 0x61, 0x1a, 0x36, 0x0a, 0x08, 0x45, 0x6e, 0x76, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, - 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, - 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x0d, 0x0a, 0x0b, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x22, 0x56, 0x0a, 0x0e, 0x43, 0x65, 0x72, - 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x43, 0x66, 0x67, 0x12, 0x3a, 0x0a, 0x0b, 0x73, - 0x65, 0x6c, 0x66, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x17, 0x2e, 0x74, 0x6f, 0x70, 0x6f, 0x2e, 0x53, 0x65, 0x6c, 0x66, 0x53, 0x69, 0x67, 0x6e, - 0x65, 0x64, 0x43, 0x65, 0x72, 0x74, 0x43, 0x66, 0x67, 0x48, 0x00, 0x52, 0x0a, 0x73, 0x65, 0x6c, - 0x66, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x42, 0x08, 0x0a, 0x06, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x22, 0x87, 0x01, 0x0a, 0x11, 0x53, 0x65, 0x6c, 0x66, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, - 0x43, 0x65, 0x72, 0x74, 0x43, 0x66, 0x67, 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x65, 0x72, 0x74, 0x5f, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x65, 0x72, 0x74, - 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6b, 0x65, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, - 0x19, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0d, 0x52, 0x07, 0x6b, 0x65, 0x79, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6f, - 0x6d, 0x6d, 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0xbe, 0x01, 0x0a, 0x07, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x69, - 0x6e, 0x73, 0x69, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x69, 0x6e, 0x73, - 0x69, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6f, 0x75, 0x74, 0x73, 0x69, 0x64, 0x65, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x6f, 0x75, 0x74, 0x73, 0x69, 0x64, 0x65, 0x12, 0x1d, 0x0a, - 0x0a, 0x6f, 0x75, 0x74, 0x73, 0x69, 0x64, 0x65, 0x5f, 0x69, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x09, 0x6f, 0x75, 0x74, 0x73, 0x69, 0x64, 0x65, 0x49, 0x70, 0x12, 0x1b, 0x0a, 0x09, - 0x69, 0x6e, 0x73, 0x69, 0x64, 0x65, 0x5f, 0x69, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x08, 0x69, 0x6e, 0x73, 0x69, 0x64, 0x65, 0x49, 0x70, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x6f, 0x64, - 0x65, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x6e, 0x6f, - 0x64, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, - 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x2a, 0xb4, 0x01, 0x0a, - 0x06, 0x56, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, - 0x57, 0x4e, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x48, 0x4f, 0x53, 0x54, 0x10, 0x01, 0x12, 0x0a, - 0x0a, 0x06, 0x41, 0x52, 0x49, 0x53, 0x54, 0x41, 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x43, 0x49, - 0x53, 0x43, 0x4f, 0x10, 0x03, 0x12, 0x0b, 0x0a, 0x07, 0x4a, 0x55, 0x4e, 0x49, 0x50, 0x45, 0x52, - 0x10, 0x04, 0x12, 0x0c, 0x0a, 0x08, 0x4b, 0x45, 0x59, 0x53, 0x49, 0x47, 0x48, 0x54, 0x10, 0x05, - 0x12, 0x07, 0x0a, 0x03, 0x46, 0x52, 0x52, 0x10, 0x06, 0x12, 0x0a, 0x0a, 0x06, 0x51, 0x55, 0x41, - 0x47, 0x47, 0x41, 0x10, 0x07, 0x12, 0x09, 0x0a, 0x05, 0x47, 0x4f, 0x42, 0x47, 0x50, 0x10, 0x08, - 0x12, 0x09, 0x0a, 0x05, 0x4e, 0x4f, 0x4b, 0x49, 0x41, 0x10, 0x09, 0x12, 0x0e, 0x0a, 0x0a, 0x4f, - 0x50, 0x45, 0x4e, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x47, 0x10, 0x0a, 0x12, 0x0a, 0x0a, 0x06, 0x41, - 0x4c, 0x50, 0x49, 0x4e, 0x45, 0x10, 0x0b, 0x12, 0x0d, 0x0a, 0x09, 0x44, 0x52, 0x49, 0x56, 0x45, - 0x4e, 0x45, 0x54, 0x53, 0x10, 0x0c, 0x12, 0x0b, 0x0a, 0x07, 0x46, 0x4f, 0x52, 0x57, 0x41, 0x52, - 0x44, 0x10, 0x0d, 0x42, 0x26, 0x5a, 0x24, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x6b, 0x6e, 0x65, - 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x6f, 0x70, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, + 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x6e, 0x73, 0x69, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0d, 0x52, 0x06, 0x69, 0x6e, 0x73, 0x69, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6f, 0x75, + 0x74, 0x73, 0x69, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x6f, 0x75, 0x74, + 0x73, 0x69, 0x64, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x6f, 0x75, 0x74, 0x73, 0x69, 0x64, 0x65, 0x5f, + 0x69, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x75, 0x74, 0x73, 0x69, 0x64, + 0x65, 0x49, 0x70, 0x12, 0x1b, 0x0a, 0x09, 0x69, 0x6e, 0x73, 0x69, 0x64, 0x65, 0x5f, 0x69, 0x70, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x69, 0x6e, 0x73, 0x69, 0x64, 0x65, 0x49, 0x70, + 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x0d, 0x52, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x14, 0x0a, + 0x05, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x61, + 0x6d, 0x65, 0x73, 0x2a, 0xb4, 0x01, 0x0a, 0x06, 0x56, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x12, 0x0b, + 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x48, + 0x4f, 0x53, 0x54, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x41, 0x52, 0x49, 0x53, 0x54, 0x41, 0x10, + 0x02, 0x12, 0x09, 0x0a, 0x05, 0x43, 0x49, 0x53, 0x43, 0x4f, 0x10, 0x03, 0x12, 0x0b, 0x0a, 0x07, + 0x4a, 0x55, 0x4e, 0x49, 0x50, 0x45, 0x52, 0x10, 0x04, 0x12, 0x0c, 0x0a, 0x08, 0x4b, 0x45, 0x59, + 0x53, 0x49, 0x47, 0x48, 0x54, 0x10, 0x05, 0x12, 0x07, 0x0a, 0x03, 0x46, 0x52, 0x52, 0x10, 0x06, + 0x12, 0x0a, 0x0a, 0x06, 0x51, 0x55, 0x41, 0x47, 0x47, 0x41, 0x10, 0x07, 0x12, 0x09, 0x0a, 0x05, + 0x47, 0x4f, 0x42, 0x47, 0x50, 0x10, 0x08, 0x12, 0x09, 0x0a, 0x05, 0x4e, 0x4f, 0x4b, 0x49, 0x41, + 0x10, 0x09, 0x12, 0x0e, 0x0a, 0x0a, 0x4f, 0x50, 0x45, 0x4e, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x47, + 0x10, 0x0a, 0x12, 0x0a, 0x0a, 0x06, 0x41, 0x4c, 0x50, 0x49, 0x4e, 0x45, 0x10, 0x0b, 0x12, 0x0d, + 0x0a, 0x09, 0x44, 0x52, 0x49, 0x56, 0x45, 0x4e, 0x45, 0x54, 0x53, 0x10, 0x0c, 0x12, 0x0b, 0x0a, + 0x07, 0x46, 0x4f, 0x52, 0x57, 0x41, 0x52, 0x44, 0x10, 0x0d, 0x42, 0x26, 0x5a, 0x24, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x2f, 0x6b, 0x6e, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x74, 0x6f, + 0x70, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/topo/topo.go b/topo/topo.go index 42199643..41a91292 100644 --- a/topo/topo.go +++ b/topo/topo.go @@ -382,6 +382,11 @@ func (m *Manager) Show(ctx context.Context) (*cpb.ShowTopologyResponse, error) { return nil, err } for _, n := range m.topo.Nodes { + pods, ok := r.Pods[n.Name] + if !ok || len(pods) == 0 { + return nil, fmt.Errorf("pods for node %s not found", n.Name) + } + n.PodIp = pods[0].Status.PodIP if len(n.Services) == 0 { continue } diff --git a/topo/topo_test.go b/topo/topo_test.go index b4004fd5..a94b2c32 100644 --- a/topo/topo_test.go +++ b/topo/topo_test.go @@ -1032,11 +1032,13 @@ func TestShow(t *testing.T) { } wantTopo := proto.Clone(topo).(*tpb.Topology) + wantTopo.Nodes[0].PodIp = "10.0.1.1" wantTopo.Nodes[0].Services[22].Inside = 22 wantTopo.Nodes[0].Services[22].InsideIp = "10.1.1.1" wantTopo.Nodes[0].Services[22].Outside = 22 wantTopo.Nodes[0].Services[22].OutsideIp = "192.168.16.50" wantTopo.Nodes[0].Services[22].NodePort = 20001 + wantTopo.Nodes[1].PodIp = "10.0.1.2" wantTopo.Nodes[1].Services[9337].Inside = 9337 wantTopo.Nodes[1].Services[9337].InsideIp = "10.1.1.2" wantTopo.Nodes[1].Services[9337].Outside = 9337 @@ -1047,12 +1049,15 @@ func TestShow(t *testing.T) { wantTopo.Nodes[1].Services[9339].Outside = 9339 wantTopo.Nodes[1].Services[9339].OutsideIp = "192.168.16.51" wantTopo.Nodes[1].Services[9339].NodePort = 20003 + wantTopo.Nodes[2].PodIp = "10.0.1.3" topoRemapPorts := proto.Clone(wantTopo).(*tpb.Topology) topoRemapPorts.Nodes[1].Services[9337].Inside = 9339 - wantTopoRemapPorts := proto.Clone(topoRemapPorts).(*tpb.Topology) + wantTopoPodUnhealthy := proto.Clone(wantTopo).(*tpb.Topology) + wantTopoPodUnhealthy.Nodes[0].PodIp = "" + tests := []struct { desc string k8sObjects []runtime.Object @@ -1072,6 +1077,7 @@ func TestShow(t *testing.T) { Namespace: "test", }, Status: corev1.PodStatus{ + PodIP: "10.0.1.1", Phase: corev1.PodRunning, Conditions: []corev1.PodCondition{{Type: corev1.PodReady, Status: corev1.ConditionTrue}}, }, @@ -1082,6 +1088,7 @@ func TestShow(t *testing.T) { Namespace: "test", }, Status: corev1.PodStatus{ + PodIP: "10.0.1.2", Phase: corev1.PodRunning, Conditions: []corev1.PodCondition{{Type: corev1.PodReady, Status: corev1.ConditionTrue}}, }, @@ -1092,6 +1099,7 @@ func TestShow(t *testing.T) { Namespace: "test", }, Status: corev1.PodStatus{ + PodIP: "10.0.1.3", Phase: corev1.PodRunning, Conditions: []corev1.PodCondition{{Type: corev1.PodReady, Status: corev1.ConditionTrue}}, }, @@ -1169,6 +1177,7 @@ func TestShow(t *testing.T) { Namespace: "test", }, Status: corev1.PodStatus{ + PodIP: "10.0.1.1", Phase: corev1.PodRunning, Conditions: []corev1.PodCondition{{Type: corev1.PodReady, Status: corev1.ConditionTrue}}, }, @@ -1179,6 +1188,7 @@ func TestShow(t *testing.T) { Namespace: "test", }, Status: corev1.PodStatus{ + PodIP: "10.0.1.2", Phase: corev1.PodRunning, Conditions: []corev1.PodCondition{{Type: corev1.PodReady, Status: corev1.ConditionTrue}}, }, @@ -1189,6 +1199,7 @@ func TestShow(t *testing.T) { Namespace: "test", }, Status: corev1.PodStatus{ + PodIP: "10.0.1.3", Phase: corev1.PodRunning, Conditions: []corev1.PodCondition{{Type: corev1.PodReady, Status: corev1.ConditionTrue}}, }, @@ -1335,6 +1346,7 @@ func TestShow(t *testing.T) { Namespace: "test", }, Status: corev1.PodStatus{ + PodIP: "10.0.1.2", Phase: corev1.PodRunning, Conditions: []corev1.PodCondition{{Type: corev1.PodReady, Status: corev1.ConditionTrue}}, }, @@ -1345,6 +1357,7 @@ func TestShow(t *testing.T) { Namespace: "test", }, Status: corev1.PodStatus{ + PodIP: "10.0.1.3", Phase: corev1.PodRunning, Conditions: []corev1.PodCondition{{Type: corev1.PodReady, Status: corev1.ConditionTrue}}, }, @@ -1406,7 +1419,7 @@ func TestShow(t *testing.T) { }, want: &cpb.ShowTopologyResponse{ State: cpb.TopologyState_TOPOLOGY_STATE_CREATING, - Topology: wantTopo, + Topology: wantTopoPodUnhealthy, }, }, { desc: "success - unhealthy", @@ -1429,6 +1442,7 @@ func TestShow(t *testing.T) { Namespace: "test", }, Status: corev1.PodStatus{ + PodIP: "10.0.1.2", Phase: corev1.PodRunning, Conditions: []corev1.PodCondition{{Type: corev1.PodReady, Status: corev1.ConditionTrue}}, }, @@ -1439,6 +1453,7 @@ func TestShow(t *testing.T) { Namespace: "test", }, Status: corev1.PodStatus{ + PodIP: "10.0.1.3", Phase: corev1.PodRunning, Conditions: []corev1.PodCondition{{Type: corev1.PodReady, Status: corev1.ConditionTrue}}, }, @@ -1500,7 +1515,7 @@ func TestShow(t *testing.T) { }, want: &cpb.ShowTopologyResponse{ State: cpb.TopologyState_TOPOLOGY_STATE_ERROR, - Topology: wantTopo, + Topology: wantTopoPodUnhealthy, }, }} for _, tt := range tests {