refactor: Move logs to machined
This moves Logs endpoint to machined to reduce the mount footprint of osd. Signed-off-by: Brad Beam <brad.beam@talos-systems.com>
This commit is contained in:
parent
a4e1479b07
commit
41a4741bca
@ -49,9 +49,6 @@ type ContainerResponse = os.ContainerResponse
|
||||
// ContainersReply from public import os/os.proto
|
||||
type ContainersReply = os.ContainersReply
|
||||
|
||||
// LogsRequest from public import os/os.proto
|
||||
type LogsRequest = os.LogsRequest
|
||||
|
||||
// ProcessesRequest from public import os/os.proto
|
||||
type ProcessesRequest = os.ProcessesRequest
|
||||
|
||||
@ -85,15 +82,6 @@ type StatsReply = os.StatsReply
|
||||
// Stat from public import os/os.proto
|
||||
type Stat = os.Stat
|
||||
|
||||
// ContainerDriver from public import os/os.proto
|
||||
type ContainerDriver = os.ContainerDriver
|
||||
|
||||
var ContainerDriver_name = os.ContainerDriver_name
|
||||
var ContainerDriver_value = os.ContainerDriver_value
|
||||
|
||||
const ContainerDriver_CONTAINERD = ContainerDriver(os.ContainerDriver_CONTAINERD)
|
||||
const ContainerDriver_CRI = ContainerDriver(os.ContainerDriver_CRI)
|
||||
|
||||
// RebootResponse from public import machine/machine.proto
|
||||
type RebootResponse = machine.RebootResponse
|
||||
|
||||
@ -208,6 +196,9 @@ type VersionReply = machine.VersionReply
|
||||
// VersionInfo from public import machine/machine.proto
|
||||
type VersionInfo = machine.VersionInfo
|
||||
|
||||
// LogsRequest from public import machine/machine.proto
|
||||
type LogsRequest = machine.LogsRequest
|
||||
|
||||
// TimeRequest from public import time/time.proto
|
||||
type TimeRequest = time.TimeRequest
|
||||
|
||||
@ -295,6 +286,15 @@ type DataResponse = common.DataResponse
|
||||
// DataReply from public import common/common.proto
|
||||
type DataReply = common.DataReply
|
||||
|
||||
// ContainerDriver from public import common/common.proto
|
||||
type ContainerDriver = common.ContainerDriver
|
||||
|
||||
var ContainerDriver_name = common.ContainerDriver_name
|
||||
var ContainerDriver_value = common.ContainerDriver_value
|
||||
|
||||
const ContainerDriver_CONTAINERD = ContainerDriver(common.ContainerDriver_CONTAINERD)
|
||||
const ContainerDriver_CRI = ContainerDriver(common.ContainerDriver_CRI)
|
||||
|
||||
// Empty from public import google/protobuf/empty.proto
|
||||
type Empty = empty.Empty
|
||||
|
||||
@ -1085,15 +1085,6 @@ func (r *Registrator) Dmesg(ctx context.Context, in *empty.Empty) (*common.DataR
|
||||
return r.OSClient.Dmesg(ctx, in)
|
||||
}
|
||||
|
||||
func (r *Registrator) Logs(in *os.LogsRequest, srv os.OS_LogsServer) error {
|
||||
client, err := r.OSClient.Logs(srv.Context(), in)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
var msg common.Data
|
||||
return copyClientServer(&msg, client, srv)
|
||||
}
|
||||
|
||||
func (r *Registrator) Processes(ctx context.Context, in *empty.Empty) (*os.ProcessesReply, error) {
|
||||
return r.OSClient.Processes(ctx, in)
|
||||
}
|
||||
@ -1133,6 +1124,15 @@ func (r *Registrator) LS(in *machine.LSRequest, srv machine.Machine_LSServer) er
|
||||
return copyClientServer(&msg, client, srv)
|
||||
}
|
||||
|
||||
func (r *Registrator) Logs(in *machine.LogsRequest, srv machine.Machine_LogsServer) error {
|
||||
client, err := r.MachineClient.Logs(srv.Context(), in)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
var msg common.Data
|
||||
return copyClientServer(&msg, client, srv)
|
||||
}
|
||||
|
||||
func (r *Registrator) Mounts(ctx context.Context, in *empty.Empty) (*machine.MountsReply, error) {
|
||||
return r.MachineClient.Mounts(ctx, in)
|
||||
}
|
||||
@ -1221,10 +1221,6 @@ func (c *LocalOSClient) Dmesg(ctx context.Context, in *empty.Empty, opts ...grpc
|
||||
return c.OSClient.Dmesg(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (c *LocalOSClient) Logs(ctx context.Context, in *os.LogsRequest, opts ...grpc.CallOption) (os.OS_LogsClient, error) {
|
||||
return c.OSClient.Logs(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (c *LocalOSClient) Processes(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*os.ProcessesReply, error) {
|
||||
return c.OSClient.Processes(ctx, in, opts...)
|
||||
}
|
||||
@ -1265,6 +1261,10 @@ func (c *LocalMachineClient) LS(ctx context.Context, in *machine.LSRequest, opts
|
||||
return c.MachineClient.LS(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (c *LocalMachineClient) Logs(ctx context.Context, in *machine.LogsRequest, opts ...grpc.CallOption) (machine.Machine_LogsClient, error) {
|
||||
return c.MachineClient.Logs(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (c *LocalMachineClient) Mounts(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*machine.MountsReply, error) {
|
||||
return c.MachineClient.Mounts(ctx, in, opts...)
|
||||
}
|
||||
|
@ -21,6 +21,31 @@ var _ = math.Inf
|
||||
// proto package needs to be updated.
|
||||
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
|
||||
|
||||
type ContainerDriver int32
|
||||
|
||||
const (
|
||||
ContainerDriver_CONTAINERD ContainerDriver = 0
|
||||
ContainerDriver_CRI ContainerDriver = 1
|
||||
)
|
||||
|
||||
var ContainerDriver_name = map[int32]string{
|
||||
0: "CONTAINERD",
|
||||
1: "CRI",
|
||||
}
|
||||
|
||||
var ContainerDriver_value = map[string]int32{
|
||||
"CONTAINERD": 0,
|
||||
"CRI": 1,
|
||||
}
|
||||
|
||||
func (x ContainerDriver) String() string {
|
||||
return proto.EnumName(ContainerDriver_name, int32(x))
|
||||
}
|
||||
|
||||
func (ContainerDriver) EnumDescriptor() ([]byte, []int) {
|
||||
return fileDescriptor_8f954d82c0b891f6, []int{0}
|
||||
}
|
||||
|
||||
// Common metadata message nested in all reply message types
|
||||
type NodeMetadata struct {
|
||||
Hostname string `protobuf:"bytes,1,opt,name=hostname,proto3" json:"hostname,omitempty"`
|
||||
@ -204,6 +229,7 @@ func (m *DataReply) GetResponse() []*DataResponse {
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterEnum("common.ContainerDriver", ContainerDriver_name, ContainerDriver_value)
|
||||
proto.RegisterType((*NodeMetadata)(nil), "common.NodeMetadata")
|
||||
proto.RegisterType((*Data)(nil), "common.Data")
|
||||
proto.RegisterType((*DataResponse)(nil), "common.DataResponse")
|
||||
@ -213,19 +239,21 @@ func init() {
|
||||
func init() { proto.RegisterFile("common/common.proto", fileDescriptor_8f954d82c0b891f6) }
|
||||
|
||||
var fileDescriptor_8f954d82c0b891f6 = []byte{
|
||||
// 213 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x4c, 0x90, 0x39, 0x4f, 0xc4, 0x30,
|
||||
0x10, 0x85, 0x15, 0x8e, 0xd5, 0xee, 0xe0, 0xca, 0x6c, 0xb1, 0x42, 0x14, 0x91, 0x2b, 0x0e, 0x91,
|
||||
0x20, 0xa8, 0x69, 0x10, 0x2d, 0x14, 0x2e, 0xe9, 0x1c, 0x62, 0x91, 0x48, 0x71, 0xc6, 0xca, 0x0c,
|
||||
0x45, 0xfe, 0x3d, 0xf2, 0x91, 0x28, 0x95, 0xf5, 0xe4, 0x4f, 0xef, 0x1b, 0x3d, 0xb8, 0xfe, 0x41,
|
||||
0xe7, 0x70, 0xac, 0xd3, 0x53, 0xf9, 0x09, 0x19, 0xe5, 0x2e, 0x25, 0xf5, 0x00, 0xe2, 0x0b, 0x5b,
|
||||
0xfb, 0x69, 0xd9, 0xb4, 0x86, 0x8d, 0xbc, 0x81, 0x7d, 0x87, 0xc4, 0xa3, 0x71, 0xf6, 0x54, 0x94,
|
||||
0xc5, 0xdd, 0x41, 0xaf, 0x59, 0xdd, 0xc2, 0xc5, 0x47, 0x60, 0x8e, 0x70, 0xd9, 0xcc, 0x6c, 0x29,
|
||||
0x02, 0x42, 0xa7, 0xa0, 0x5a, 0x10, 0xe1, 0x57, 0x5b, 0xf2, 0x38, 0x92, 0x95, 0xcf, 0xb0, 0x77,
|
||||
0xb9, 0x35, 0x82, 0x57, 0x2f, 0xc7, 0x2a, 0x9f, 0xb0, 0x35, 0xea, 0x95, 0x92, 0x6a, 0xe9, 0x3d,
|
||||
0x8b, 0xb8, 0x58, 0xf0, 0x58, 0x9b, 0x2d, 0x6f, 0x70, 0x48, 0x16, 0x3f, 0xcc, 0x41, 0x31, 0x65,
|
||||
0xdd, 0xa9, 0x28, 0xcf, 0xb7, 0x8a, 0xed, 0x29, 0x7a, 0xa5, 0xde, 0x1f, 0xbf, 0xef, 0x7f, 0x7b,
|
||||
0xee, 0xfe, 0x9a, 0xc0, 0xd5, 0x6c, 0x06, 0xa4, 0x27, 0x9a, 0x89, 0xad, 0xa3, 0x94, 0x6a, 0xe3,
|
||||
0xfb, 0xbc, 0x54, 0xb3, 0x8b, 0x53, 0xbd, 0xfe, 0x07, 0x00, 0x00, 0xff, 0xff, 0xa8, 0xa6, 0x20,
|
||||
0x8e, 0x41, 0x01, 0x00, 0x00,
|
||||
// 254 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x4c, 0x90, 0xc1, 0x4b, 0xf3, 0x30,
|
||||
0x18, 0xc6, 0xbf, 0x7e, 0xd3, 0xb9, 0xbd, 0x16, 0x1d, 0x71, 0x87, 0x21, 0x1e, 0x46, 0x4f, 0x5a,
|
||||
0x71, 0x15, 0x3d, 0x7b, 0xd0, 0xd6, 0xc3, 0x0e, 0x56, 0x08, 0x9e, 0xbc, 0xa5, 0x36, 0xb8, 0xc2,
|
||||
0x92, 0xb7, 0x24, 0xaf, 0x42, 0xff, 0x7b, 0x69, 0x92, 0x95, 0x9e, 0xc2, 0x43, 0x7e, 0x3c, 0xbf,
|
||||
0x97, 0x07, 0x2e, 0xbe, 0x50, 0x29, 0xd4, 0x99, 0x7f, 0x36, 0xad, 0x41, 0x42, 0x36, 0xf5, 0x29,
|
||||
0x49, 0x21, 0x2e, 0xb1,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message DataResponse {
|
||||
message DataReply {
|
||||
repeated DataResponse response = 1;
|
||||
}
|
||||
|
||||
enum ContainerDriver {
|
||||
CONTAINERD = 0;
|
||||
CRI = 1;
|
||||
}
|
||||
|
@ -1961,6 +1961,68 @@ func (m *VersionInfo) GetArch() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
// rpc logs
|
||||
// The request message containing the process name.
|
||||
type LogsRequest struct {
|
||||
Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"`
|
||||
Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
|
||||
// driver might be default "containerd" or "cri"
|
||||
Driver common.ContainerDriver `protobuf:"varint,3,opt,name=driver,proto3,enum=common.ContainerDriver" json:"driver,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *LogsRequest) Reset() { *m = LogsRequest{} }
|
||||
func (m *LogsRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*LogsRequest) ProtoMessage() {}
|
||||
func (*LogsRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_84b4f59d98cc997c, []int{38}
|
||||
}
|
||||
|
||||
func (m *LogsRequest) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_LogsRequest.Unmarshal(m, b)
|
||||
}
|
||||
|
||||
func (m *LogsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_LogsRequest.Marshal(b, m, deterministic)
|
||||
}
|
||||
|
||||
func (m *LogsRequest) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_LogsRequest.Merge(m, src)
|
||||
}
|
||||
|
||||
func (m *LogsRequest) XXX_Size() int {
|
||||
return xxx_messageInfo_LogsRequest.Size(m)
|
||||
}
|
||||
|
||||
func (m *LogsRequest) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_LogsRequest.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_LogsRequest proto.InternalMessageInfo
|
||||
|
||||
func (m *LogsRequest) GetNamespace() string {
|
||||
if m != nil {
|
||||
return m.Namespace
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *LogsRequest) GetId() string {
|
||||
if m != nil {
|
||||
return m.Id
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *LogsRequest) GetDriver() common.ContainerDriver {
|
||||
if m != nil {
|
||||
return m.Driver
|
||||
}
|
||||
return common.ContainerDriver_CONTAINERD
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*RebootResponse)(nil), "machine.RebootResponse")
|
||||
proto.RegisterType((*RebootReply)(nil), "machine.RebootReply")
|
||||
@ -2000,99 +2062,104 @@ func init() {
|
||||
proto.RegisterType((*VersionResponse)(nil), "machine.VersionResponse")
|
||||
proto.RegisterType((*VersionReply)(nil), "machine.VersionReply")
|
||||
proto.RegisterType((*VersionInfo)(nil), "machine.VersionInfo")
|
||||
proto.RegisterType((*LogsRequest)(nil), "machine.LogsRequest")
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("machine/machine.proto", fileDescriptor_84b4f59d98cc997c) }
|
||||
|
||||
var fileDescriptor_84b4f59d98cc997c = []byte{
|
||||
// 1388 bytes of a gzipped FileDescriptorProto
|
||||
// 1456 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x58, 0xe9, 0x6e, 0x1b, 0x37,
|
||||
0x10, 0x86, 0x24, 0xeb, 0x1a, 0xd9, 0x72, 0x42, 0x1f, 0x55, 0x14, 0xe7, 0xda, 0xa4, 0x4d, 0x10,
|
||||
0xc0, 0x72, 0xe0, 0x1c, 0xc8, 0xd1, 0x06, 0x89, 0xe3, 0x04, 0x29, 0x62, 0x3b, 0xc1, 0xaa, 0xe9,
|
||||
0x8f, 0xb6, 0xa8, 0x40, 0x49, 0xb4, 0x44, 0x64, 0x77, 0xb9, 0x5d, 0x52, 0x0e, 0x54, 0xf4, 0x01,
|
||||
0x8a, 0xfe, 0xed, 0x13, 0x14, 0x7d, 0x99, 0x3e, 0x56, 0xc1, 0x63, 0x29, 0x6a, 0x65, 0x39, 0x81,
|
||||
0x9d, 0x5f, 0x22, 0x87, 0xb3, 0x33, 0xdf, 0xc7, 0x19, 0x0e, 0x87, 0x82, 0xb5, 0x10, 0xf7, 0x86,
|
||||
0x34, 0x22, 0x5b, 0xe6, 0xb7, 0x15, 0x27, 0x4c, 0x30, 0x54, 0x36, 0xd3, 0xe6, 0xc5, 0x01, 0x63,
|
||||
0x83, 0x80, 0x6c, 0x29, 0x71, 0x77, 0x74, 0xb8, 0x45, 0xc2, 0x58, 0x8c, 0xb5, 0x56, 0xf3, 0x4a,
|
||||
0x76, 0x51, 0xd0, 0x90, 0x70, 0x81, 0xc3, 0xd8, 0x28, 0xac, 0xf4, 0x58, 0x18, 0xb2, 0x68, 0x4b,
|
||||
0xff, 0x68, 0xa1, 0xb7, 0x03, 0x75, 0x9f, 0x74, 0x19, 0x13, 0x3e, 0xe1, 0x31, 0x8b, 0x38, 0x41,
|
||||
0x77, 0xa0, 0x12, 0x12, 0x81, 0xfb, 0x58, 0xe0, 0x46, 0xee, 0x6a, 0xee, 0x56, 0x6d, 0x7b, 0xb5,
|
||||
0x65, 0x3e, 0x39, 0x60, 0x7d, 0xb2, 0x6f, 0xd6, 0x7c, 0xab, 0xe5, 0xed, 0x40, 0x2d, 0xb5, 0x11,
|
||||
0x07, 0x63, 0x74, 0x17, 0x2a, 0x89, 0x31, 0xd6, 0xc8, 0x5d, 0x2d, 0xdc, 0xaa, 0x6d, 0x7f, 0xd5,
|
||||
0x4a, 0x09, 0x4d, 0xfb, 0xf2, 0xad, 0xa2, 0xf7, 0x1c, 0x96, 0x7c, 0xc2, 0xc9, 0x59, 0x60, 0x3c,
|
||||
0x03, 0x30, 0x26, 0x24, 0x8a, 0xed, 0x19, 0x14, 0xeb, 0x0e, 0x0a, 0xc7, 0x93, 0x03, 0x62, 0x17,
|
||||
0xce, 0xb5, 0x87, 0x23, 0xd1, 0x67, 0x1f, 0xa3, 0x33, 0xe0, 0x78, 0x05, 0x4b, 0x13, 0x2b, 0x12,
|
||||
0xca, 0xfd, 0x19, 0x28, 0x17, 0x2c, 0x94, 0xac, 0x3f, 0x07, 0xcd, 0x37, 0x50, 0x7f, 0x1f, 0x0f,
|
||||
0x12, 0xdc, 0x27, 0x3e, 0xf9, 0x6d, 0x44, 0xb8, 0x40, 0xab, 0x50, 0xa4, 0x21, 0x1e, 0x10, 0x05,
|
||||
0xa4, 0xea, 0xeb, 0x89, 0xf7, 0x1e, 0x96, 0xad, 0xde, 0x69, 0x41, 0xa3, 0x73, 0x50, 0xc0, 0xbd,
|
||||
0x0f, 0x8d, 0xbc, 0x32, 0x2c, 0x87, 0xde, 0x2e, 0x2c, 0x5a, 0xb3, 0x92, 0xc5, 0xbd, 0x19, 0x16,
|
||||
0x0d, 0xcb, 0x22, 0xe3, 0xdf, 0x21, 0x31, 0x86, 0x95, 0x36, 0x49, 0x8e, 0x68, 0x8f, 0xec, 0x51,
|
||||
0x7e, 0x86, 0xe8, 0xca, 0x2f, 0xb8, 0x36, 0xc4, 0x1b, 0x79, 0xe5, 0x7e, 0x75, 0xb2, 0x89, 0x7a,
|
||||
0xe1, 0xfb, 0xe8, 0x90, 0xf9, 0x56, 0xcb, 0xdb, 0x83, 0x73, 0x53, 0xae, 0x25, 0x89, 0x87, 0x33,
|
||||
0x24, 0x36, 0xb2, 0x56, 0x5c, 0x9c, 0x0e, 0x91, 0xbf, 0x73, 0x50, 0x73, 0xfc, 0xa0, 0x3a, 0xe4,
|
||||
0x69, 0xdf, 0x04, 0x22, 0x4f, 0xfb, 0x32, 0x36, 0x5c, 0x60, 0x41, 0xcc, 0x16, 0xea, 0x09, 0x6a,
|
||||
0x41, 0x89, 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 0x63, 0xef, 0x00, 0xce, 0x4f, 0x5b, 0x97, 0x39, 0xfb, 0x68, 0x26, 0x67, 0x2f, 0x65, 0x83,
|
||||
0x3a, 0x85, 0xc5, 0x49, 0xda, 0x1b, 0x80, 0xac, 0x06, 0x8b, 0xe7, 0x71, 0xfa, 0xd9, 0xa1, 0x2e,
|
||||
0xb5, 0xbe, 0x28, 0xa5, 0xc9, 0x29, 0xd4, 0xc6, 0x3f, 0xf3, 0x14, 0xba, 0x48, 0x1c, 0x42, 0x37,
|
||||
0x61, 0xcd, 0x28, 0xf8, 0x32, 0x86, 0xf3, 0xe3, 0xf4, 0x2b, 0xac, 0x67, 0x15, 0xbf, 0x28, 0x2d,
|
||||
0xdf, 0xee, 0x99, 0xb5, 0x2f, 0x99, 0x3d, 0x99, 0x61, 0x76, 0x25, 0xcb, 0x2c, 0x83, 0xc7, 0x21,
|
||||
0xe7, 0xc1, 0xe2, 0x49, 0xb9, 0xf7, 0x38, 0xdf, 0xc8, 0x79, 0x37, 0x00, 0x9c, 0xd4, 0x48, 0x91,
|
||||
0xe5, 0x26, 0xc8, 0x94, 0xd6, 0x35, 0xa8, 0x9d, 0x10, 0x70, 0xa5, 0x72, 0x1d, 0xaa, 0x93, 0x80,
|
||||
0xcc, 0xb3, 0xf3, 0x1d, 0x2c, 0xb5, 0x45, 0x42, 0x70, 0x48, 0xa3, 0xc1, 0xae, 0xdc, 0x8a, 0x55,
|
||||
0x28, 0x76, 0xc7, 0x82, 0x70, 0xa5, 0xb9, 0xe8, 0xeb, 0x09, 0x5a, 0x87, 0x12, 0x49, 0x12, 0x96,
|
||||
0x70, 0xb3, 0x45, 0x66, 0xe6, 0x6d, 0x42, 0xfd, 0x05, 0x8b, 0xc7, 0x6f, 0x47, 0x96, 0xd2, 0x45,
|
||||
0xa8, 0x26, 0x8c, 0x89, 0x4e, 0x8c, 0xc5, 0xd0, 0x78, 0xab, 0x48, 0xc1, 0x3b, 0x2c, 0x86, 0x5e,
|
||||
0x17, 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 0xcb,
|
||||
0x26, 0x2f, 0xf5, 0xf6, 0xa9, 0x26, 0x6f, 0x1a, 0x95, 0x93, 0xe0, 0x7f, 0x40, 0xd5, 0xda, 0x45,
|
||||
0x97, 0x01, 0x0e, 0x69, 0x40, 0xf8, 0x98, 0x0b, 0x12, 0x9a, 0x10, 0x38, 0x92, 0xa9, 0x40, 0x2c,
|
||||
0x98, 0x40, 0x6c, 0x40, 0x15, 0x1f, 0x61, 0x1a, 0xe0, 0x6e, 0xa0, 0xa3, 0xb1, 0xe0, 0x4f, 0x04,
|
||||
0xe8, 0x12, 0x40, 0x28, 0xcd, 0x93, 0x7e, 0x87, 0x45, 0x2a, 0x28, 0x55, 0xbf, 0x6a, 0x24, 0x6f,
|
||||
0x23, 0x8f, 0xc3, 0xf2, 0x8f, 0x44, 0xa5, 0xc2, 0x19, 0x36, 0xac, 0x05, 0xe5, 0x23, 0x6d, 0x44,
|
||||
0x01, 0x73, 0xbb, 0x10, 0x63, 0x5c, 0x75, 0x21, 0xa9, 0x92, 0xec, 0xa2, 0xac, 0xd3, 0x4f, 0x75,
|
||||
0x51, 0x19, 0x74, 0xce, 0xc6, 0xfd, 0x95, 0x83, 0x9a, 0x63, 0x5e, 0x5e, 0xd3, 0x02, 0xdb, 0x6b,
|
||||
0x5a, 0xe0, 0x81, 0x94, 0xf0, 0x21, 0x4e, 0xfb, 0x37, 0x3e, 0xd4, 0x47, 0x75, 0x44, 0x03, 0x61,
|
||||
0x6e, 0x4a, 0x3d, 0x91, 0x7b, 0x34, 0x60, 0x9d, 0x94, 0x82, 0xd9, 0xa3, 0x01, 0x33, 0xc6, 0x65,
|
||||
0xa5, 0x60, 0x5c, 0x65, 0x6d, 0xd5, 0xcf, 0x33, 0x2e, 0x83, 0x80, 0x93, 0xde, 0xd0, 0x64, 0xac,
|
||||
0x1a, 0x6f, 0xff, 0x53, 0x86, 0xf2, 0xbe, 0x86, 0x8c, 0xbe, 0x85, 0xb2, 0x39, 0xe1, 0x68, 0x12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67, 0x35, 0xd7, 0x66, 0x17,
|
||||
0x74, 0xdb, 0x52, 0xd4, 0x1b, 0xe0, 0x34, 0xd5, 0x2e, 0xf3, 0x95, 0xac, 0x38, 0x0e, 0xc6, 0x5e,
|
||||
0xe1, 0xcf, 0x7c, 0x0e, 0xdd, 0x87, 0x05, 0x45, 0xd8, 0x79, 0xb2, 0x38, 0x4c, 0x51, 0x46, 0x6a,
|
||||
0x3f, 0x7b, 0x08, 0xe5, 0xf4, 0x60, 0xce, 0xa3, 0xb9, 0x36, 0x5b, 0x3d, 0xe2, 0x60, 0xbc, 0xf3,
|
||||
0x06, 0x96, 0x7b, 0x2c, 0xb4, 0x6b, 0x38, 0xa6, 0x3b, 0x60, 0xce, 0xec, 0xf3, 0x98, 0xbe, 0xcb,
|
||||
0xfd, 0x74, 0x7b, 0x40, 0xc5, 0x70, 0xd4, 0x95, 0xd5, 0x6e, 0x4b, 0xe0, 0x80, 0xf1, 0x4d, 0x5d,
|
||||
0x76, 0xb9, 0x9e, 0x6d, 0xe1, 0x98, 0xa6, 0xff, 0x42, 0x74, 0x4b, 0xca, 0xe7, 0xdd, 0xff, 0x03,
|
||||
0x00, 0x00, 0xff, 0xff, 0x35, 0x80, 0xc3, 0xe3, 0x9f, 0x10, 0x00, 0x00,
|
||||
0x10, 0x86, 0x64, 0x5b, 0xc7, 0x48, 0x96, 0x13, 0xfa, 0x88, 0xa2, 0x38, 0xd7, 0x26, 0x6d, 0x82,
|
||||
0xa0, 0x96, 0x02, 0xe7, 0x40, 0x8e, 0x36, 0x48, 0x1c, 0x27, 0x48, 0x11, 0xdb, 0x09, 0x56, 0x4d,
|
||||
0x7f, 0xb4, 0x45, 0x05, 0x4a, 0xa2, 0x25, 0x22, 0xbb, 0xcb, 0xed, 0x92, 0x72, 0xa0, 0xa2, 0x0f,
|
||||
0x50, 0xf4, 0x6f, 0x1f, 0xa1, 0x2f, 0xd3, 0x7f, 0x7d, 0xa5, 0x82, 0xc7, 0x52, 0xd4, 0xca, 0x72,
|
||||
0x82, 0x38, 0xbf, 0x44, 0x0e, 0x67, 0x67, 0xbe, 0x6f, 0x38, 0x1c, 0x0e, 0x05, 0xeb, 0x21, 0xee,
|
||||
0x0d, 0x69, 0x44, 0x5a, 0xe6, 0xb7, 0x19, 0x27, 0x4c, 0x30, 0x54, 0x34, 0xd3, 0xc6, 0x85, 0x01,
|
||||
0x63, 0x83, 0x80, 0xb4, 0x94, 0xb8, 0x3b, 0x3a, 0x6c, 0x91, 0x30, 0x16, 0x63, 0xad, 0xd5, 0xb8,
|
||||
0x9c, 0x5d, 0x14, 0x34, 0x24, 0x5c, 0xe0, 0x30, 0x36, 0x0a, 0xab, 0x3d, 0x16, 0x86, 0x2c, 0x6a,
|
||||
0xe9, 0x1f, 0x2d, 0xf4, 0x76, 0xa0, 0xe6, 0x93, 0x2e, 0x63, 0xc2, 0x27, 0x3c, 0x66, 0x11, 0x27,
|
||||
0xe8, 0x36, 0x94, 0x42, 0x22, 0x70, 0x1f, 0x0b, 0x5c, 0xcf, 0x5d, 0xc9, 0xdd, 0xac, 0x6c, 0xaf,
|
||||
0x35, 0xcd, 0x27, 0x07, 0xac, 0x4f, 0xf6, 0xcd, 0x9a, 0x6f, 0xb5, 0xbc, 0x1d, 0xa8, 0xa4, 0x36,
|
||||
0xe2, 0x60, 0x8c, 0xee, 0x40, 0x29, 0x31, 0xc6, 0xea, 0xb9, 0x2b, 0x0b, 0x37, 0x2b, 0xdb, 0xe7,
|
||||
0x9a, 0x29, 0xa1, 0x69, 0x5f, 0xbe, 0x55, 0xf4, 0x9e, 0xc1, 0xb2, 0x4f, 0x38, 0x39, 0x0d, 0x8c,
|
||||
0xa7, 0x00, 0xc6, 0x84, 0x44, 0xb1, 0x3d, 0x83, 0x62, 0xc3, 0x41, 0xe1, 0x78, 0x72, 0x40, 0xec,
|
||||
0xc2, 0x99, 0xf6, 0x70, 0x24, 0xfa, 0xec, 0x43, 0x74, 0x0a, 0x1c, 0x2f, 0x61, 0x79, 0x62, 0x45,
|
||||
0x42, 0xb9, 0x37, 0x03, 0xe5, 0xbc, 0x85, 0x92, 0xf5, 0xe7, 0xa0, 0xf9, 0x1a, 0x6a, 0xef, 0xe2,
|
||||
0x41, 0x82, 0xfb, 0xc4, 0x27, 0xbf, 0x8d, 0x08, 0x17, 0x68, 0x0d, 0x96, 0x68, 0x88, 0x07, 0x44,
|
||||
0x01, 0x29, 0xfb, 0x7a, 0xe2, 0xbd, 0x83, 0x15, 0xab, 0xf7, 0xb9, 0xa0, 0xd1, 0x19, 0x58, 0xc0,
|
||||
0xbd, 0xf7, 0xf5, 0xbc, 0x32, 0x2c, 0x87, 0xde, 0x2e, 0x54, 0xad, 0x59, 0xc9, 0xe2, 0xee, 0x0c,
|
||||
0x8b, 0xba, 0x65, 0x91, 0xf1, 0xef, 0x90, 0x18, 0xc3, 0x6a, 0x9b, 0x24, 0x47, 0xb4, 0x47, 0xf6,
|
||||
0x28, 0x3f, 0xc5, 0xee, 0xca, 0x2f, 0xb8, 0x36, 0xc4, 0xeb, 0x79, 0xe5, 0x7e, 0x6d, 0x12, 0x44,
|
||||
0xbd, 0xf0, 0x7d, 0x74, 0xc8, 0x7c, 0xab, 0xe5, 0xed, 0xc1, 0x99, 0x29, 0xd7, 0x92, 0xc4, 0x83,
|
||||
0x19, 0x12, 0x9b, 0x59, 0x2b, 0x2e, 0x4e, 0x87, 0xc8, 0xdf, 0x39, 0xa8, 0x38, 0x7e, 0x50, 0x0d,
|
||||
0xf2, 0xb4, 0x6f, 0x36, 0x22, 0x4f, 0xfb, 0x72, 0x6f, 0xb8, 0xc0, 0x82, 0x98, 0x10, 0xea, 0x09,
|
||||
0x6a, 0x42, 0x81, 0x1c, 0x91, 0x48, 0xf0, 0xfa, 0x82, 0x62, 0xb9, 0x91, 0xf5, 0xf6, 0x42, 0xad,
|
||||
0xfa, 0x46, 0x4b, 0xea, 0x0f, 0x09, 0x0e, 0xc4, 0xb0, 0xbe, 0x78, 0xbc, 0xfe, 0x2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e3, 0xf4, 0xb3, 0x43,
|
||||
0x5d, 0x6a, 0x7d, 0x51, 0x4a, 0x93, 0x53, 0xa8, 0x8d, 0x7f, 0xe2, 0x29, 0x74, 0x91, 0x38, 0x84,
|
||||
0x6e, 0xc0, 0xba, 0x51, 0xf0, 0xe5, 0x1e, 0xce, 0xdf, 0xa7, 0x5f, 0x61, 0x23, 0xab, 0xf8, 0x45,
|
||||
0x69, 0xf9, 0x36, 0x66, 0xd6, 0xbe, 0x64, 0xf6, 0x78, 0x86, 0xd9, 0xe5, 0x2c, 0xb3, 0x0c, 0x1e,
|
||||
0x87, 0x9c, 0x07, 0xd5, 0x93, 0x72, 0xef, 0x51, 0xbe, 0x9e, 0xf3, 0xae, 0x03, 0x38, 0xa9, 0x91,
|
||||
0x22, 0xcb, 0x4d, 0x90, 0x29, 0xad, 0xab, 0x50, 0x39, 0x61, 0xc3, 0x95, 0xca, 0x35, 0x28, 0x4f,
|
||||
0x36, 0x64, 0x9e, 0x9d, 0xef, 0x60, 0xb9, 0x2d, 0x12, 0x82, 0x43, 0x1a, 0x0d, 0x76, 0x65, 0x28,
|
||||
0xd6, 0x60, 0xa9, 0x3b, 0x16, 0x84, 0x2b, 0xcd, 0xaa, 0xaf, 0x27, 0x68, 0x03, 0x0a, 0x24, 0x49,
|
||||
0x58, 0xc2, 0x4d, 0x88, 0xcc, 0xcc, 0xdb, 0x82, 0xda, 0x73, 0x16, 0x8f, 0xdf, 0x8c, 0x2c, 0xa5,
|
||||
0x0b, 0x50, 0x4e, 0x18, 0x13, 0x9d, 0x18, 0x8b, 0xa1, 0xf1, 0x56, 0x92, 0x82, 0xb7, 0x58, 0x0c,
|
||||
0xbd, 0x2e, 0x94, 0xf7, 0xda, 0xa9, 0xa6, 0x84, 0xc4, 0x98, 0xb0, 0x90, 0x18, 0x13, 0xb2, 0x3a,
|
||||
0x24, 0xa4, 0x37, 0x4a, 0x38, 0x49, 0xab, 0x83, 0x99, 0xa2, 0x1b, 0xb0, 0xa2,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9, 0x02, 0x47, 0x32, 0xb5,
|
||||
0x11, 0x8b, 0x66, 0x23, 0x36, 0xa1, 0x8c, 0x8f, 0x30, 0x0d, 0x70, 0x37, 0xd0, 0xbb, 0xb1, 0xe8,
|
||||
0x4f, 0x04, 0xe8, 0x22, 0x40, 0x28, 0xcd, 0x93, 0x7e, 0x87, 0x45, 0x6a, 0x53, 0xca, 0x7e, 0xd9,
|
||||
0x48, 0xde, 0x44, 0x1e, 0x87, 0x95, 0x1f, 0x89, 0x4a, 0x85, 0x53, 0x04, 0xac, 0x09, 0xc5, 0x23,
|
||||
0x6d, 0x44, 0x01, 0x73, 0xbb, 0x10, 0x63, 0x5c, 0x75, 0x21, 0xa9, 0x92, 0xec, 0xa2, 0xac, 0xd3,
|
||||
0x8f, 0x75, 0x51, 0x19, 0x74, 0x4e, 0xe0, 0xfe, 0xca, 0x41, 0xc5, 0x31, 0x2f, 0xaf, 0x69, 0x81,
|
||||
0xed, 0x35, 0x2d, 0xf0, 0x40, 0x4a, 0xf8, 0x10, 0xa7, 0xfd, 0x1b, 0x1f, 0xea, 0xa3, 0x3a, 0xa2,
|
||||
0x81, 0x30, 0x37, 0xa5, 0x9e, 0xc8, 0x18, 0x0d, 0x58, 0x27, 0xa5, 0x60, 0x62, 0x34, 0x60, 0xc6,
|
||||
0xb8, 0xac, 0x14, 0x8c, 0xab, 0xac, 0x2d, 0xfb, 0x79, 0xc6, 0xe5, 0x26, 0xe0, 0xa4, 0x37, 0x34,
|
||||
0x19, 0xab, 0xc6, 0x5e, 0x00, 0x95, 0x3d, 0x36, 0xe0, 0xe9, 0x41, 0xdd, 0x84, 0xb2, 0x4c, 0x51,
|
||||
0x1e, 0xe3, 0x5e, 0x7a, 0x92, 0x26, 0x02, 0x53, 0x7a, 0xf2, 0xb6, 0x4d, 0x6a, 0x41, 0xa1, 0x9f,
|
||||
0xd0, 0x23, 0x92, 0x28, 0x58, 0xb5, 0xed, 0x73, 0x69, 0xbc, 0x9f, 0xb3, 0x48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2, 0x0b, 0xcb, 0x4d, 0xde, 0x8b,
|
||||
0xe8, 0xc2, 0xf1, 0x1d, 0x89, 0xb6, 0x73, 0xfe, 0xf8, 0x45, 0x69, 0xe6, 0x11, 0x94, 0xd2, 0x37,
|
||||
0xdd, 0xa7, 0xe4, 0xd8, 0xd4, 0x43, 0xf1, 0x21, 0x14, 0xcd, 0x4b, 0xca, 0xc9, 0xef, 0xe9, 0x37,
|
||||
0x60, 0x63, 0x7d, 0x76, 0x41, 0xb7, 0x54, 0x4b, 0x3a, 0x00, 0x4e, 0xc3, 0xef, 0x32, 0x5f, 0xcd,
|
||||
0x8a, 0xe3, 0x60, 0xec, 0x2d, 0xfc, 0x99, 0xcf, 0xa1, 0x7b, 0xb0, 0xa8, 0x08, 0x3b, 0xcf, 0x29,
|
||||
0x87, 0x29, 0xca, 0x48, 0xed, 0x67, 0x0f, 0xa0, 0x98, 0x16, 0x8d, 0x79, 0x34, 0xd7, 0x67, 0x2b,
|
||||
0x5b, 0x1c, 0x8c, 0x77, 0x5e, 0xc3, 0x4a, 0x8f, 0x85, 0x76, 0x0d, 0xc7, 0x74, 0x07, 0xcc, 0x09,
|
||||
0x7f, 0x16, 0xd3, 0xb7, 0xb9, 0x9f, 0x6e, 0x0d, 0xa8, 0x18, 0x8e, 0xba, 0xf2, 0x84, 0xb4, 0x04,
|
||||
0x0e, 0x18, 0xdf, 0xd2, 0x57, 0x02, 0xd7, 0xb3, 0x16, 0x8e, 0x69, 0xfa, 0x0f, 0x49, 0xb7, 0xa0,
|
||||
0x7c, 0xde, 0xf9, 0x3f, 0x00, 0x00, 0xff, 0xff, 0xbc, 0xfc, 0x75, 0x2d, 0x3b, 0x11, 0x00, 0x00,
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
@ -2110,6 +2177,7 @@ type MachineClient interface {
|
||||
CopyOut(ctx context.Context, in *CopyOutRequest, opts ...grpc.CallOption) (Machine_CopyOutClient, error)
|
||||
Kubeconfig(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (Machine_KubeconfigClient, error)
|
||||
LS(ctx context.Context, in *LSRequest, opts ...grpc.CallOption) (Machine_LSClient, error)
|
||||
Logs(ctx context.Context, in *LogsRequest, opts ...grpc.CallOption) (Machine_LogsClient, error)
|
||||
Mounts(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*MountsReply, error)
|
||||
Reboot(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*RebootReply, error)
|
||||
Reset(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*ResetReply, error)
|
||||
@ -2228,6 +2296,38 @@ func (x *machineLSClient) Recv() (*FileInfo, error) {
|
||||
return m, nil
|
||||
}
|
||||
|
||||
func (c *machineClient) Logs(ctx context.Context, in *LogsRequest, opts ...grpc.CallOption) (Machine_LogsClient, error) {
|
||||
stream, err := c.cc.NewStream(ctx, &_Machine_serviceDesc.Streams[3], "/machine.Machine/Logs", opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
x := &machineLogsClient{stream}
|
||||
if err := x.ClientStream.SendMsg(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err := x.ClientStream.CloseSend(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return x, nil
|
||||
}
|
||||
|
||||
type Machine_LogsClient interface {
|
||||
Recv() (*common.Data, error)
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
type machineLogsClient struct {
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
func (x *machineLogsClient) Recv() (*common.Data, error) {
|
||||
m := new(common.Data)
|
||||
if err := x.ClientStream.RecvMsg(m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
|
||||
func (c *machineClient) Mounts(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*MountsReply, error) {
|
||||
out := new(MountsReply)
|
||||
err := c.cc.Invoke(ctx, "/machine.Machine/Mounts", in, out, opts...)
|
||||
@ -2343,6 +2443,7 @@ type MachineServer interface {
|
||||
CopyOut(*CopyOutRequest, Machine_CopyOutServer) error
|
||||
Kubeconfig(*empty.Empty, Machine_KubeconfigServer) error
|
||||
LS(*LSRequest, Machine_LSServer) error
|
||||
Logs(*LogsRequest, Machine_LogsServer) error
|
||||
Mounts(context.Context, *empty.Empty) (*MountsReply, error)
|
||||
Reboot(context.Context, *empty.Empty) (*RebootReply, error)
|
||||
Reset(context.Context, *empty.Empty) (*ResetReply, error)
|
||||
@ -2424,6 +2525,27 @@ func (x *machineLSServer) Send(m *FileInfo) error {
|
||||
return x.ServerStream.SendMsg(m)
|
||||
}
|
||||
|
||||
func _Machine_Logs_Handler(srv interface{}, stream grpc.ServerStream) error {
|
||||
m := new(LogsRequest)
|
||||
if err := stream.RecvMsg(m); err != nil {
|
||||
return err
|
||||
}
|
||||
return srv.(MachineServer).Logs(m, &machineLogsServer{stream})
|
||||
}
|
||||
|
||||
type Machine_LogsServer interface {
|
||||
Send(*common.Data) error
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
type machineLogsServer struct {
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
func (x *machineLogsServer) Send(m *common.Data) error {
|
||||
return x.ServerStream.SendMsg(m)
|
||||
}
|
||||
|
||||
func _Machine_Mounts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(empty.Empty)
|
||||
if err := dec(in); err != nil {
|
||||
@ -2709,6 +2831,11 @@ var _Machine_serviceDesc = grpc.ServiceDesc{
|
||||
Handler: _Machine_LS_Handler,
|
||||
ServerStreams: true,
|
||||
},
|
||||
{
|
||||
StreamName: "Logs",
|
||||
Handler: _Machine_Logs_Handler,
|
||||
ServerStreams: true,
|
||||
},
|
||||
},
|
||||
Metadata: "machine/machine.proto",
|
||||
}
|
||||
|
@ -16,6 +16,7 @@ service Machine {
|
||||
rpc CopyOut(CopyOutRequest) returns (stream StreamingData);
|
||||
rpc Kubeconfig(google.protobuf.Empty) returns (stream StreamingData);
|
||||
rpc LS(LSRequest) returns (stream FileInfo);
|
||||
rpc Logs(LogsRequest) returns (stream common.Data);
|
||||
rpc Mounts(google.protobuf.Empty) returns (MountsReply);
|
||||
rpc Reboot(google.protobuf.Empty) returns (RebootReply);
|
||||
rpc Reset(google.protobuf.Empty) returns (ResetReply);
|
||||
@ -246,3 +247,12 @@ message VersionInfo {
|
||||
string os = 5;
|
||||
string arch = 6;
|
||||
}
|
||||
|
||||
// rpc logs
|
||||
// The request message containing the process name.
|
||||
message LogsRequest {
|
||||
string namespace = 1;
|
||||
string id = 2;
|
||||
// driver might be default "containerd" or "cri"
|
||||
common.ContainerDriver driver = 3;
|
||||
}
|
||||
|
315
api/os/os.pb.go
315
api/os/os.pb.go
@ -26,39 +26,13 @@ var _ = math.Inf
|
||||
// proto package needs to be updated.
|
||||
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
|
||||
|
||||
// The request message containing the containerd namespace.
|
||||
type ContainerDriver int32
|
||||
|
||||
const (
|
||||
ContainerDriver_CONTAINERD ContainerDriver = 0
|
||||
ContainerDriver_CRI ContainerDriver = 1
|
||||
)
|
||||
|
||||
var ContainerDriver_name = map[int32]string{
|
||||
0: "CONTAINERD",
|
||||
1: "CRI",
|
||||
}
|
||||
|
||||
var ContainerDriver_value = map[string]int32{
|
||||
"CONTAINERD": 0,
|
||||
"CRI": 1,
|
||||
}
|
||||
|
||||
func (x ContainerDriver) String() string {
|
||||
return proto.EnumName(ContainerDriver_name, int32(x))
|
||||
}
|
||||
|
||||
func (ContainerDriver) EnumDescriptor() ([]byte, []int) {
|
||||
return fileDescriptor_b20a722d09fd3254, []int{0}
|
||||
}
|
||||
|
||||
type ContainersRequest struct {
|
||||
Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"`
|
||||
// driver might be default "containerd" or "cri"
|
||||
Driver ContainerDriver `protobuf:"varint,2,opt,name=driver,proto3,enum=os.ContainerDriver" json:"driver,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
Driver common.ContainerDriver `protobuf:"varint,2,opt,name=driver,proto3,enum=common.ContainerDriver" json:"driver,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *ContainersRequest) Reset() { *m = ContainersRequest{} }
|
||||
@ -97,11 +71,11 @@ func (m *ContainersRequest) GetNamespace() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *ContainersRequest) GetDriver() ContainerDriver {
|
||||
func (m *ContainersRequest) GetDriver() common.ContainerDriver {
|
||||
if m != nil {
|
||||
return m.Driver
|
||||
}
|
||||
return ContainerDriver_CONTAINERD
|
||||
return common.ContainerDriver_CONTAINERD
|
||||
}
|
||||
|
||||
// The response message containing the requested containers.
|
||||
@ -291,67 +265,6 @@ func (m *ContainersReply) GetResponse() []*ContainerResponse {
|
||||
return nil
|
||||
}
|
||||
|
||||
// The request message containing the process name.
|
||||
type LogsRequest struct {
|
||||
Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"`
|
||||
Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
|
||||
// driver might be default "containerd" or "cri"
|
||||
Driver ContainerDriver `protobuf:"varint,3,opt,name=driver,proto3,enum=os.ContainerDriver" json:"driver,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *LogsRequest) Reset() { *m = LogsRequest{} }
|
||||
func (m *LogsRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*LogsRequest) ProtoMessage() {}
|
||||
func (*LogsRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_b20a722d09fd3254, []int{4}
|
||||
}
|
||||
|
||||
func (m *LogsRequest) XXX_Unmarshal(b []byte) error {
|
||||
return xxx_messageInfo_LogsRequest.Unmarshal(m, b)
|
||||
}
|
||||
|
||||
func (m *LogsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
return xxx_messageInfo_LogsRequest.Marshal(b, m, deterministic)
|
||||
}
|
||||
|
||||
func (m *LogsRequest) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_LogsRequest.Merge(m, src)
|
||||
}
|
||||
|
||||
func (m *LogsRequest) XXX_Size() int {
|
||||
return xxx_messageInfo_LogsRequest.Size(m)
|
||||
}
|
||||
|
||||
func (m *LogsRequest) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_LogsRequest.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_LogsRequest proto.InternalMessageInfo
|
||||
|
||||
func (m *LogsRequest) GetNamespace() string {
|
||||
if m != nil {
|
||||
return m.Namespace
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *LogsRequest) GetId() string {
|
||||
if m != nil {
|
||||
return m.Id
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *LogsRequest) GetDriver() ContainerDriver {
|
||||
if m != nil {
|
||||
return m.Driver
|
||||
}
|
||||
return ContainerDriver_CONTAINERD
|
||||
}
|
||||
|
||||
// rpc processes
|
||||
type ProcessesRequest struct {
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
@ -363,7 +276,7 @@ func (m *ProcessesRequest) Reset() { *m = ProcessesRequest{} }
|
||||
func (m *ProcessesRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*ProcessesRequest) ProtoMessage() {}
|
||||
func (*ProcessesRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_b20a722d09fd3254, []int{5}
|
||||
return fileDescriptor_b20a722d09fd3254, []int{4}
|
||||
}
|
||||
|
||||
func (m *ProcessesRequest) XXX_Unmarshal(b []byte) error {
|
||||
@ -399,7 +312,7 @@ func (m *ProcessesReply) Reset() { *m = ProcessesReply{} }
|
||||
func (m *ProcessesReply) String() string { return proto.CompactTextString(m) }
|
||||
func (*ProcessesReply) ProtoMessage() {}
|
||||
func (*ProcessesReply) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_b20a722d09fd3254, []int{6}
|
||||
return fileDescriptor_b20a722d09fd3254, []int{5}
|
||||
}
|
||||
|
||||
func (m *ProcessesReply) XXX_Unmarshal(b []byte) error {
|
||||
@ -443,7 +356,7 @@ func (m *ProcessResponse) Reset() { *m = ProcessResponse{} }
|
||||
func (m *ProcessResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*ProcessResponse) ProtoMessage() {}
|
||||
func (*ProcessResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_b20a722d09fd3254, []int{7}
|
||||
return fileDescriptor_b20a722d09fd3254, []int{6}
|
||||
}
|
||||
|
||||
func (m *ProcessResponse) XXX_Unmarshal(b []byte) error {
|
||||
@ -502,7 +415,7 @@ func (m *Process) Reset() { *m = Process{} }
|
||||
func (m *Process) String() string { return proto.CompactTextString(m) }
|
||||
func (*Process) ProtoMessage() {}
|
||||
func (*Process) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_b20a722d09fd3254, []int{8}
|
||||
return fileDescriptor_b20a722d09fd3254, []int{7}
|
||||
}
|
||||
|
||||
func (m *Process) XXX_Unmarshal(b []byte) error {
|
||||
@ -603,17 +516,17 @@ type RestartRequest struct {
|
||||
Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"`
|
||||
Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
|
||||
// driver might be default "containerd" or "cri"
|
||||
Driver ContainerDriver `protobuf:"varint,3,opt,name=driver,proto3,enum=os.ContainerDriver" json:"driver,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
Driver common.ContainerDriver `protobuf:"varint,3,opt,name=driver,proto3,enum=common.ContainerDriver" json:"driver,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *RestartRequest) Reset() { *m = RestartRequest{} }
|
||||
func (m *RestartRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*RestartRequest) ProtoMessage() {}
|
||||
func (*RestartRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_b20a722d09fd3254, []int{9}
|
||||
return fileDescriptor_b20a722d09fd3254, []int{8}
|
||||
}
|
||||
|
||||
func (m *RestartRequest) XXX_Unmarshal(b []byte) error {
|
||||
@ -652,11 +565,11 @@ func (m *RestartRequest) GetId() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *RestartRequest) GetDriver() ContainerDriver {
|
||||
func (m *RestartRequest) GetDriver() common.ContainerDriver {
|
||||
if m != nil {
|
||||
return m.Driver
|
||||
}
|
||||
return ContainerDriver_CONTAINERD
|
||||
return common.ContainerDriver_CONTAINERD
|
||||
}
|
||||
|
||||
type RestartResponse struct {
|
||||
@ -670,7 +583,7 @@ func (m *RestartResponse) Reset() { *m = RestartResponse{} }
|
||||
func (m *RestartResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*RestartResponse) ProtoMessage() {}
|
||||
func (*RestartResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_b20a722d09fd3254, []int{10}
|
||||
return fileDescriptor_b20a722d09fd3254, []int{9}
|
||||
}
|
||||
|
||||
func (m *RestartResponse) XXX_Unmarshal(b []byte) error {
|
||||
@ -714,7 +627,7 @@ func (m *RestartReply) Reset() { *m = RestartReply{} }
|
||||
func (m *RestartReply) String() string { return proto.CompactTextString(m) }
|
||||
func (*RestartReply) ProtoMessage() {}
|
||||
func (*RestartReply) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_b20a722d09fd3254, []int{11}
|
||||
return fileDescriptor_b20a722d09fd3254, []int{10}
|
||||
}
|
||||
|
||||
func (m *RestartReply) XXX_Unmarshal(b []byte) error {
|
||||
@ -750,17 +663,17 @@ func (m *RestartReply) GetResponse() []*RestartResponse {
|
||||
type StatsRequest struct {
|
||||
Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"`
|
||||
// driver might be default "containerd" or "cri"
|
||||
Driver ContainerDriver `protobuf:"varint,2,opt,name=driver,proto3,enum=os.ContainerDriver" json:"driver,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
Driver common.ContainerDriver `protobuf:"varint,2,opt,name=driver,proto3,enum=common.ContainerDriver" json:"driver,omitempty"`
|
||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||
XXX_unrecognized []byte `json:"-"`
|
||||
XXX_sizecache int32 `json:"-"`
|
||||
}
|
||||
|
||||
func (m *StatsRequest) Reset() { *m = StatsRequest{} }
|
||||
func (m *StatsRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*StatsRequest) ProtoMessage() {}
|
||||
func (*StatsRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_b20a722d09fd3254, []int{12}
|
||||
return fileDescriptor_b20a722d09fd3254, []int{11}
|
||||
}
|
||||
|
||||
func (m *StatsRequest) XXX_Unmarshal(b []byte) error {
|
||||
@ -792,11 +705,11 @@ func (m *StatsRequest) GetNamespace() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *StatsRequest) GetDriver() ContainerDriver {
|
||||
func (m *StatsRequest) GetDriver() common.ContainerDriver {
|
||||
if m != nil {
|
||||
return m.Driver
|
||||
}
|
||||
return ContainerDriver_CONTAINERD
|
||||
return common.ContainerDriver_CONTAINERD
|
||||
}
|
||||
|
||||
// The response message containing the requested stats.
|
||||
@ -812,7 +725,7 @@ func (m *StatsResponse) Reset() { *m = StatsResponse{} }
|
||||
func (m *StatsResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*StatsResponse) ProtoMessage() {}
|
||||
func (*StatsResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_b20a722d09fd3254, []int{13}
|
||||
return fileDescriptor_b20a722d09fd3254, []int{12}
|
||||
}
|
||||
|
||||
func (m *StatsResponse) XXX_Unmarshal(b []byte) error {
|
||||
@ -862,7 +775,7 @@ func (m *StatsReply) Reset() { *m = StatsReply{} }
|
||||
func (m *StatsReply) String() string { return proto.CompactTextString(m) }
|
||||
func (*StatsReply) ProtoMessage() {}
|
||||
func (*StatsReply) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_b20a722d09fd3254, []int{14}
|
||||
return fileDescriptor_b20a722d09fd3254, []int{13}
|
||||
}
|
||||
|
||||
func (m *StatsReply) XXX_Unmarshal(b []byte) error {
|
||||
@ -911,7 +824,7 @@ func (m *Stat) Reset() { *m = Stat{} }
|
||||
func (m *Stat) String() string { return proto.CompactTextString(m) }
|
||||
func (*Stat) ProtoMessage() {}
|
||||
func (*Stat) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_b20a722d09fd3254, []int{15}
|
||||
return fileDescriptor_b20a722d09fd3254, []int{14}
|
||||
}
|
||||
|
||||
func (m *Stat) XXX_Unmarshal(b []byte) error {
|
||||
@ -979,12 +892,10 @@ func (m *Stat) GetName() string {
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterEnum("os.ContainerDriver", ContainerDriver_name, ContainerDriver_value)
|
||||
proto.RegisterType((*ContainersRequest)(nil), "os.ContainersRequest")
|
||||
proto.RegisterType((*Container)(nil), "os.Container")
|
||||
proto.RegisterType((*ContainerResponse)(nil), "os.ContainerResponse")
|
||||
proto.RegisterType((*ContainersReply)(nil), "os.ContainersReply")
|
||||
proto.RegisterType((*LogsRequest)(nil), "os.LogsRequest")
|
||||
proto.RegisterType((*ProcessesRequest)(nil), "os.ProcessesRequest")
|
||||
proto.RegisterType((*ProcessesReply)(nil), "os.ProcessesReply")
|
||||
proto.RegisterType((*ProcessResponse)(nil), "os.ProcessResponse")
|
||||
@ -1001,60 +912,57 @@ func init() {
|
||||
func init() { proto.RegisterFile("os/os.proto", fileDescriptor_b20a722d09fd3254) }
|
||||
|
||||
var fileDescriptor_b20a722d09fd3254 = []byte{
|
||||
// 839 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x55, 0x51, 0x8f, 0xdb, 0x44,
|
||||
0x10, 0xc6, 0x4e, 0x1c, 0xc7, 0x93, 0x3b, 0x27, 0xb7, 0xd7, 0x56, 0x26, 0x45, 0x55, 0xb0, 0x54,
|
||||
0x35, 0x2d, 0xba, 0xb8, 0x84, 0x07, 0x90, 0x40, 0x42, 0xd7, 0xa4, 0x0f, 0x27, 0xd1, 0xbb, 0x6a,
|
||||
0x5b, 0x1e, 0xe0, 0x81, 0x68, 0x13, 0x2f, 0x39, 0x8b, 0xd8, 0xbb, 0x78, 0xd7, 0x15, 0xf9, 0x27,
|
||||
0xbc, 0xf1, 0xc2, 0x0f, 0xe0, 0x27, 0xa2, 0xdd, 0xb5, 0x1d, 0x27, 0x2d, 0xf4, 0x38, 0x89, 0x3e,
|
||||
0xd9, 0xfb, 0xcd, 0xec, 0xcc, 0xce, 0x37, 0xdf, 0xce, 0x42, 0x8f, 0x89, 0x88, 0x89, 0x09, 0xcf,
|
||||
0x99, 0x64, 0xc8, 0x66, 0x62, 0x78, 0x7f, 0xcd, 0xd8, 0x7a, 0x43, 0x23, 0x8d, 0x2c, 0x8b, 0x9f,
|
||||
0x23, 0x9a, 0x72, 0xb9, 0x35, 0x0e, 0xc3, 0xd3, 0x15, 0x4b, 0x53, 0x96, 0x45, 0xe6, 0x63, 0xc0,
|
||||
0xf0, 0x27, 0x38, 0x99, 0xb1, 0x4c, 0x92, 0x24, 0xa3, 0xb9, 0xc0, 0xf4, 0xd7, 0x82, 0x0a, 0x89,
|
||||
0x3e, 0x01, 0x2f, 0x23, 0x29, 0x15, 0x9c, 0xac, 0x68, 0x60, 0x8d, 0xac, 0xb1, 0x87, 0x77, 0x00,
|
||||
0xfa, 0x0c, 0x3a, 0x71, 0x9e, 0xbc, 0xa1, 0x79, 0x60, 0x8f, 0xac, 0xb1, 0x3f, 0x3d, 0x9d, 0x30,
|
||||
0x31, 0xa9, 0x83, 0xcc, 0xb5, 0x09, 0x97, 0x2e, 0xe1, 0x9f, 0x16, 0x78, 0xb5, 0xed, 0x3d, 0x81,
|
||||
0x7d, 0xb0, 0x93, 0x58, 0x07, 0xf5, 0xb0, 0x9d, 0xc4, 0xe8, 0x0e, 0x38, 0x49, 0x4a, 0xd6, 0x34,
|
||||
0x68, 0x69, 0xc8, 0x2c, 0xd0, 0x00, 0x5a, 0x3c, 0x89, 0x83, 0xf6, 0xc8, 0x1a, 0x1f, 0x63, 0xf5,
|
||||
0x8b, 0xee, 0x41, 0x47, 0x48, 0x22, 0x0b, 0x11, 0x38, 0xda, 0xb1, 0x5c, 0xa1, 0xbb, 0xd0, 0xe1,
|
||||
0x2c, 0x5e, 0x24, 0x71, 0xd0, 0x31, 0x01, 0x38, 0x8b, 0x2f, 0x62, 0x84, 0xa0, 0xad, 0x72, 0x06,
|
||||
0xae, 0x06, 0xf5, 0x7f, 0x28, 0x1b, 0x34, 0x60, 0x2a, 0x38, 0xcb, 0x04, 0x45, 0x4f, 0xa1, 0x9b,
|
||||
0x52, 0x49, 0x62, 0x22, 0x89, 0x3e, 0x6c, 0x6f, 0x7a, 0x67, 0x52, 0x92, 0x77, 0xc9, 0x62, 0xfa,
|
||||
0xa2, 0xb4, 0xe1, 0xda, 0x0b, 0x9d, 0x01, 0xac, 0x6a, 0x36, 0x03, 0x7b, 0xd4, 0x1a, 0x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0xe8, 0x11, 0xf4, 0x73,
|
||||
0x2a, 0x92, 0x98, 0x66, 0xb2, 0xf2, 0x73, 0xb5, 0x9f, 0x5f, 0xc1, 0xa5, 0x63, 0x00, 0xae, 0x22,
|
||||
0x86, 0x64, 0x71, 0xd0, 0xd5, 0x87, 0xab, 0x96, 0xe8, 0x01, 0x00, 0xfd, 0x8d, 0xae, 0x0a, 0x49,
|
||||
0x96, 0x1b, 0x1a, 0x78, 0xda, 0xd8, 0x40, 0x54, 0xa1, 0x24, 0x5f, 0x8b, 0x00, 0xcc, 0x3d, 0x50,
|
||||
0xff, 0xe1, 0x2f, 0xe0, 0x63, 0x2a, 0x24, 0xc9, 0xe5, 0x07, 0x90, 0xd3, 0x0c, 0xfa, 0x75, 0xb2,
|
||||
0xdb, 0xf6, 0x3d, 0xfc, 0x16, 0x8e, 0xea, 0x20, 0xff, 0xa2, 0xbe, 0x83, 0x44, 0x0d, 0xf5, 0xfd,
|
||||
0x00, 0x47, 0xaf, 0x24, 0x91, 0xff, 0xc7, 0xf0, 0x23, 0x70, 0x5c, 0x86, 0xbe, 0xb5, 0xac, 0x1f,
|
||||
0x18, 0xe5, 0x55, 0x92, 0xee, 0xaa, 0x74, 0x2a, 0xa6, 0xd1, 0xa0, 0x08, 0xbf, 0x06, 0x28, 0x53,
|
||||
0xa8, 0xe2, 0xcf, 0xde, 0x2a, 0xfe, 0xa4, 0xda, 0xf0, 0xae, 0x8b, 0xf7, 0x87, 0x05, 0x6d, 0x65,
|
||||
0xfb, 0x8f, 0x4d, 0xfe, 0x14, 0x8e, 0x8c, 0x24, 0x17, 0x85, 0x50, 0xe3, 0xb9, 0xad, 0x85, 0xd9,
|
||||
0x33, 0xd8, 0xf7, 0x0a, 0x42, 0xf7, 0xc1, 0x53, 0x17, 0xc0, 0xd8, 0x1d, 0x6d, 0x57, 0x37, 0xc2,
|
||||
0x18, 0x6f, 0x3e, 0x97, 0x9f, 0x3c, 0x69, 0x4c, 0x48, 0x43, 0x2e, 0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xf8, 0x3b, 0x00, 0x00, 0xff, 0xff, 0x53,
|
||||
0xad, 0xbd, 0x10, 0x87, 0x08, 0x00, 0x00,
|
||||
// 785 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x55, 0xcd, 0x6e, 0xdb, 0x38,
|
||||
0x10, 0x86, 0x64, 0xcb, 0xb6, 0xc6, 0xf1, 0x4f, 0x98, 0x9f, 0xd5, 0x3a, 0x8b, 0xc0, 0x2b, 0x20,
|
||||
0x58, 0xe7, 0x10, 0x6b, 0xd7, 0x7b, 0xd8, 0x05, 0x5a, 0xa0, 0x48, 0xe2, 0x1e, 0x7a, 0x48, 0x13,
|
||||
0x28, 0xed, 0xa5, 0x40, 0x61, 0xd0, 0x16, 0xeb, 0x08, 0xb0, 0x44, 0x56, 0xa4, 0x82, 0xfa, 0x09,
|
||||
0xfa, 0x0a, 0xbd, 0xf5, 0xd2, 0x07, 0x2d, 0x48, 0x4a, 0xb2, 0xec, 0xa4, 0x6d, 0x1a, 0xa0, 0x27,
|
||||
0x91, 0xdf, 0x0c, 0xbf, 0x21, 0x67, 0xbe, 0x19, 0x41, 0x93, 0x72, 0x8f, 0xf2, 0x21, 0x4b, 0xa8,
|
||||
0xa0, 0xc8, 0xa4, 0xbc, 0x77, 0x30, 0xa7, 0x74, 0xbe, 0x20, 0x9e, 0x42, 0xa6, 0xe9, 0x3b, 0x8f,
|
||||
0x44, 0x4c, 0x2c, 0xb5, 0x43, 0x6f, 0x67, 0x46, 0xa3, 0x88, 0xc6, 0x9e, 0xfe, 0x68, 0xd0, 0x9d,
|
||||
0xc2, 0xf6, 0x39, 0x8d, 0x05, 0x0e, 0x63, 0x92, 0x70, 0x9f, 0xbc, 0x4f, 0x09, 0x17, 0xe8, 0x0f,
|
||||
0xb0, 0x63, 0x1c, 0x11, 0xce, 0xf0, 0x8c, 0x38, 0x46, 0xdf, 0x18, 0xd8, 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, 0x17, 0x6e, 0x2e, 0x82, 0xee,
|
||||
0x55, 0x42, 0x67, 0x84, 0x73, 0x92, 0x57, 0xd1, 0x3d, 0x85, 0x76, 0x09, 0x93, 0xc4, 0xde, 0x1d,
|
||||
0xe2, 0x1d, 0x49, 0x9c, 0x79, 0xdd, 0x43, 0x1b, 0x43, 0x67, 0xc3, 0xf8, 0x88, 0x84, 0x1c, 0x83,
|
||||
0xcd, 0xf2, 0x7b, 0x64, 0xf9, 0x68, 0x96, 0xc3, 0xae, 0xac, 0xee, 0x27, 0x13, 0xea, 0x19, 0x9c,
|
||||
0xd7, 0x58, 0xc6, 0xb0, 0x74, 0x8d, 0x11, 0x54, 0x19, 0xcb, 0xd4, 0x61, 0xf9, 0x6a, 0x2d, 0xf5,
|
||||
0x21, 0x2b, 0x5d, 0xe8, 0x43, 0x6d, 0x90, 0x03, 0x75, 0x71, 0x93, 0x10, 0x1c, 0x70, 0xa5, 0x11,
|
||||
0xcb, 0xcf, 0xb7, 0xe8, 0x77, 0x68, 0xcc, 0x58, 0x3a, 0x11, 0x61, 0x44, 0x94, 0x52, 0x0c, 0xbf,
|
||||
0x3e, 0x63, 0xe9, 0xab, 0x30, 0x22, 0xe8, 0x08, 0xda, 0xb7, 0x61, 0x22, 0x52, 0xbc, 0x98, 0x44,
|
||||
0x24, 0xa2, 0xc9, 0x52, 0x49, 0xa6, 0xea, 0xb7, 0x32, 0xf4, 0x42, 0x81, 0xe8, 0x2f, 0xe8, 0x24,
|
||||
0x84, 0x87, 0x01, 0x89, 0x45, 0xee, 0x57, 0x57, 0x7e, 0xed, 0x1c, 0xce, 0x1c, 0x1d, 0xa8, 0xcb,
|
||||
0xc4, 0xe0, 0x38, 0x70, 0x1a, 0xea, 0x72, 0xf9, 0x16, 0x1d, 0x02, 0x90, 0x0f, 0x64, 0x96, 0x0a,
|
||||
0x3c, 0x5d, 0x10, 0xc7, 0x56, 0xc6, 0x12, 0x22, 0x1f, 0x8a, 0x93, 0x39, 0x77, 0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0xf9, 0x0f, 0xec, 0x62,
|
||||
0xb4, 0x7d, 0xf3, 0x1c, 0x2a, 0x0d, 0x99, 0xd5, 0x04, 0xac, 0x67, 0x5a, 0x43, 0x68, 0x4d, 0x78,
|
||||
0xfa, 0x82, 0xdd, 0x35, 0x4c, 0x1e, 0x38, 0x06, 0x4b, 0xd5, 0x06, 0x75, 0x4b, 0x65, 0xd2, 0xce,
|
||||
0xed, 0x12, 0xc2, 0x16, 0xcb, 0xb3, 0xa7, 0x72, 0xf0, 0x47, 0x12, 0xc4, 0x2c, 0x3c, 0xb3, 0x2e,
|
||||
0xf9, 0x29, 0x0b, 0xaf, 0x8c, 0x37, 0x47, 0xf3, 0x50, 0xdc, 0xa4, 0x53, 0xf9, 0x08, 0x4f, 0xe0,
|
||||
0x05, 0xe5, 0x27, 0x7c, 0xc9, 0x05, 0x89, 0xb8, 0xde, 0x79, 0x98, 0x85, 0x1e, 0xe5, 0xd3, 0x9a,
|
||||
0xba, 0xfd, 0xbf, 0x5f, 0x03, 0x00, 0x00, 0xff, 0xff, 0x26, 0x06, 0x3b, 0x16, 0xd4, 0x07, 0x00,
|
||||
0x00,
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
@ -1071,7 +979,6 @@ const _ = grpc.SupportPackageIsVersion4
|
||||
type OSClient interface {
|
||||
Containers(ctx context.Context, in *ContainersRequest, opts ...grpc.CallOption) (*ContainersReply, error)
|
||||
Dmesg(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*common.DataReply, error)
|
||||
Logs(ctx context.Context, in *LogsRequest, opts ...grpc.CallOption) (OS_LogsClient, error)
|
||||
Processes(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*ProcessesReply, error)
|
||||
Restart(ctx context.Context, in *RestartRequest, opts ...grpc.CallOption) (*RestartReply, error)
|
||||
Stats(ctx context.Context, in *StatsRequest, opts ...grpc.CallOption) (*StatsReply, error)
|
||||
@ -1103,38 +1010,6 @@ func (c *oSClient) Dmesg(ctx context.Context, in *empty.Empty, opts ...grpc.Call
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *oSClient) Logs(ctx context.Context, in *LogsRequest, opts ...grpc.CallOption) (OS_LogsClient, error) {
|
||||
stream, err := c.cc.NewStream(ctx, &_OS_serviceDesc.Streams[0], "/os.OS/Logs", opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
x := &oSLogsClient{stream}
|
||||
if err := x.ClientStream.SendMsg(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err := x.ClientStream.CloseSend(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return x, nil
|
||||
}
|
||||
|
||||
type OS_LogsClient interface {
|
||||
Recv() (*common.Data, error)
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
type oSLogsClient struct {
|
||||
grpc.ClientStream
|
||||
}
|
||||
|
||||
func (x *oSLogsClient) Recv() (*common.Data, error) {
|
||||
m := new(common.Data)
|
||||
if err := x.ClientStream.RecvMsg(m); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
|
||||
func (c *oSClient) Processes(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*ProcessesReply, error) {
|
||||
out := new(ProcessesReply)
|
||||
err := c.cc.Invoke(ctx, "/os.OS/Processes", in, out, opts...)
|
||||
@ -1166,7 +1041,6 @@ func (c *oSClient) Stats(ctx context.Context, in *StatsRequest, opts ...grpc.Cal
|
||||
type OSServer interface {
|
||||
Containers(context.Context, *ContainersRequest) (*ContainersReply, error)
|
||||
Dmesg(context.Context, *empty.Empty) (*common.DataReply, error)
|
||||
Logs(*LogsRequest, OS_LogsServer) error
|
||||
Processes(context.Context, *empty.Empty) (*ProcessesReply, error)
|
||||
Restart(context.Context, *RestartRequest) (*RestartReply, error)
|
||||
Stats(context.Context, *StatsRequest) (*StatsReply, error)
|
||||
@ -1212,27 +1086,6 @@ func _OS_Dmesg_Handler(srv interface{}, ctx context.Context, dec func(interface{
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _OS_Logs_Handler(srv interface{}, stream grpc.ServerStream) error {
|
||||
m := new(LogsRequest)
|
||||
if err := stream.RecvMsg(m); err != nil {
|
||||
return err
|
||||
}
|
||||
return srv.(OSServer).Logs(m, &oSLogsServer{stream})
|
||||
}
|
||||
|
||||
type OS_LogsServer interface {
|
||||
Send(*common.Data) error
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
type oSLogsServer struct {
|
||||
grpc.ServerStream
|
||||
}
|
||||
|
||||
func (x *oSLogsServer) Send(m *common.Data) error {
|
||||
return x.ServerStream.SendMsg(m)
|
||||
}
|
||||
|
||||
func _OS_Processes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(empty.Empty)
|
||||
if err := dec(in); err != nil {
|
||||
@ -1312,12 +1165,6 @@ var _OS_serviceDesc = grpc.ServiceDesc{
|
||||
Handler: _OS_Stats_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{
|
||||
{
|
||||
StreamName: "Logs",
|
||||
Handler: _OS_Logs_Handler,
|
||||
ServerStreams: true,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "os/os.proto",
|
||||
}
|
||||
|
@ -16,7 +16,6 @@ import "common/common.proto";
|
||||
service OS {
|
||||
rpc Containers(ContainersRequest) returns (ContainersReply);
|
||||
rpc Dmesg(google.protobuf.Empty) returns (common.DataReply);
|
||||
rpc Logs(LogsRequest) returns (stream common.Data);
|
||||
rpc Processes(google.protobuf.Empty) returns (ProcessesReply);
|
||||
rpc Restart(RestartRequest) returns (RestartReply);
|
||||
rpc Stats(StatsRequest) returns (StatsReply);
|
||||
@ -24,16 +23,11 @@ service OS {
|
||||
|
||||
// rpc Containers
|
||||
|
||||
// The request message containing the containerd namespace.
|
||||
enum ContainerDriver {
|
||||
CONTAINERD = 0;
|
||||
CRI = 1;
|
||||
}
|
||||
|
||||
message ContainersRequest {
|
||||
string namespace = 1;
|
||||
// driver might be default "containerd" or "cri"
|
||||
ContainerDriver driver = 2;
|
||||
common.ContainerDriver driver = 2;
|
||||
}
|
||||
|
||||
// The response message containing the requested containers.
|
||||
@ -57,20 +51,6 @@ message ContainersReply {
|
||||
repeated ContainerResponse response = 1;
|
||||
}
|
||||
|
||||
// rpc dmesg
|
||||
// rpc kubeconfig
|
||||
|
||||
|
||||
// rpc logs
|
||||
|
||||
// The request message containing the process name.
|
||||
message LogsRequest {
|
||||
string namespace = 1;
|
||||
string id = 2;
|
||||
// driver might be default "containerd" or "cri"
|
||||
ContainerDriver driver = 3;
|
||||
}
|
||||
|
||||
// rpc processes
|
||||
message ProcessesRequest {}
|
||||
|
||||
@ -102,7 +82,7 @@ message RestartRequest {
|
||||
string namespace = 1;
|
||||
string id = 2;
|
||||
// driver might be default "containerd" or "cri"
|
||||
ContainerDriver driver = 3;
|
||||
common.ContainerDriver driver = 3;
|
||||
}
|
||||
|
||||
message RestartResponse {
|
||||
@ -120,7 +100,7 @@ message RestartReply {
|
||||
message StatsRequest {
|
||||
string namespace = 1;
|
||||
// driver might be default "containerd" or "cri"
|
||||
ContainerDriver driver = 2;
|
||||
common.ContainerDriver driver = 2;
|
||||
}
|
||||
|
||||
// The response message containing the requested stats.
|
||||
|
@ -16,6 +16,7 @@ import (
|
||||
"github.com/spf13/cobra"
|
||||
"google.golang.org/grpc/metadata"
|
||||
|
||||
"github.com/talos-systems/talos/api/common"
|
||||
osapi "github.com/talos-systems/talos/api/os"
|
||||
"github.com/talos-systems/talos/cmd/osctl/pkg/client"
|
||||
"github.com/talos-systems/talos/cmd/osctl/pkg/helpers"
|
||||
@ -41,9 +42,9 @@ var containersCmd = &cobra.Command{
|
||||
} else {
|
||||
namespace = constants.SystemContainerdNamespace
|
||||
}
|
||||
driver := osapi.ContainerDriver_CONTAINERD
|
||||
driver := common.ContainerDriver_CONTAINERD
|
||||
if useCRI {
|
||||
driver = osapi.ContainerDriver_CRI
|
||||
driver = common.ContainerDriver_CRI
|
||||
}
|
||||
|
||||
md := metadata.New(make(map[string]string))
|
||||
|
@ -13,7 +13,7 @@ import (
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/status"
|
||||
|
||||
osapi "github.com/talos-systems/talos/api/os"
|
||||
"github.com/talos-systems/talos/api/common"
|
||||
"github.com/talos-systems/talos/cmd/osctl/pkg/client"
|
||||
"github.com/talos-systems/talos/cmd/osctl/pkg/helpers"
|
||||
"github.com/talos-systems/talos/pkg/constants"
|
||||
@ -37,9 +37,9 @@ var logsCmd = &cobra.Command{
|
||||
} else {
|
||||
namespace = constants.SystemContainerdNamespace
|
||||
}
|
||||
driver := osapi.ContainerDriver_CONTAINERD
|
||||
driver := common.ContainerDriver_CONTAINERD
|
||||
if useCRI {
|
||||
driver = osapi.ContainerDriver_CRI
|
||||
driver = common.ContainerDriver_CRI
|
||||
}
|
||||
|
||||
stream, err := c.Logs(globalCtx, namespace, driver, args[0])
|
||||
|
@ -11,7 +11,7 @@ import (
|
||||
criconstants "github.com/containerd/cri/pkg/constants"
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
osapi "github.com/talos-systems/talos/api/os"
|
||||
"github.com/talos-systems/talos/api/common"
|
||||
"github.com/talos-systems/talos/cmd/osctl/pkg/client"
|
||||
"github.com/talos-systems/talos/cmd/osctl/pkg/helpers"
|
||||
"github.com/talos-systems/talos/pkg/constants"
|
||||
@ -37,9 +37,9 @@ var restartCmd = &cobra.Command{
|
||||
} else {
|
||||
namespace = constants.SystemContainerdNamespace
|
||||
}
|
||||
driver := osapi.ContainerDriver_CONTAINERD
|
||||
driver := common.ContainerDriver_CONTAINERD
|
||||
if useCRI {
|
||||
driver = osapi.ContainerDriver_CRI
|
||||
driver = common.ContainerDriver_CRI
|
||||
}
|
||||
if err := c.Restart(globalCtx, namespace, driver, args[0]); err != nil {
|
||||
helpers.Fatalf("error restarting process: %s", err)
|
||||
|
@ -16,6 +16,7 @@ import (
|
||||
"github.com/spf13/cobra"
|
||||
"google.golang.org/grpc/metadata"
|
||||
|
||||
"github.com/talos-systems/talos/api/common"
|
||||
osapi "github.com/talos-systems/talos/api/os"
|
||||
"github.com/talos-systems/talos/cmd/osctl/pkg/client"
|
||||
"github.com/talos-systems/talos/cmd/osctl/pkg/helpers"
|
||||
@ -40,9 +41,9 @@ var statsCmd = &cobra.Command{
|
||||
} else {
|
||||
namespace = constants.SystemContainerdNamespace
|
||||
}
|
||||
driver := osapi.ContainerDriver_CONTAINERD
|
||||
driver := common.ContainerDriver_CONTAINERD
|
||||
if useCRI {
|
||||
driver = osapi.ContainerDriver_CRI
|
||||
driver = common.ContainerDriver_CRI
|
||||
}
|
||||
md := metadata.New(make(map[string]string))
|
||||
md.Set("targets", target...)
|
||||
|
@ -156,7 +156,7 @@ func (c *Client) Kubeconfig(ctx context.Context) (io.Reader, <-chan error, error
|
||||
}
|
||||
|
||||
// Stats implements the proto.OSClient interface.
|
||||
func (c *Client) Stats(ctx context.Context, namespace string, driver osapi.ContainerDriver) (reply *osapi.StatsReply, err error) {
|
||||
func (c *Client) Stats(ctx context.Context, namespace string, driver common.ContainerDriver) (reply *osapi.StatsReply, err error) {
|
||||
reply, err = c.client.Stats(ctx, &osapi.StatsRequest{
|
||||
Namespace: namespace,
|
||||
Driver: driver,
|
||||
@ -166,7 +166,7 @@ func (c *Client) Stats(ctx context.Context, namespace string, driver osapi.Conta
|
||||
}
|
||||
|
||||
// Containers implements the proto.OSClient interface.
|
||||
func (c *Client) Containers(ctx context.Context, namespace string, driver osapi.ContainerDriver) (reply *osapi.ContainersReply, err error) {
|
||||
func (c *Client) Containers(ctx context.Context, namespace string, driver common.ContainerDriver) (reply *osapi.ContainersReply, err error) {
|
||||
reply, err = c.client.Containers(ctx, &osapi.ContainersRequest{
|
||||
Namespace: namespace,
|
||||
Driver: driver,
|
||||
@ -176,7 +176,7 @@ func (c *Client) Containers(ctx context.Context, namespace string, driver osapi.
|
||||
}
|
||||
|
||||
// Restart implements the proto.OSClient interface.
|
||||
func (c *Client) Restart(ctx context.Context, namespace string, driver osapi.ContainerDriver, id string) (err error) {
|
||||
func (c *Client) Restart(ctx context.Context, namespace string, driver common.ContainerDriver, id string) (err error) {
|
||||
_, err = c.client.Restart(ctx, &osapi.RestartRequest{
|
||||
Id: id,
|
||||
Namespace: namespace,
|
||||
@ -210,8 +210,8 @@ func (c *Client) Dmesg(ctx context.Context) (*common.DataReply, error) {
|
||||
}
|
||||
|
||||
// Logs implements the proto.OSClient interface.
|
||||
func (c *Client) Logs(ctx context.Context, namespace string, driver osapi.ContainerDriver, id string) (stream osapi.OS_LogsClient, err error) {
|
||||
stream, err = c.client.Logs(ctx, &osapi.LogsRequest{
|
||||
func (c *Client) Logs(ctx context.Context, namespace string, driver common.ContainerDriver, id string) (stream machineapi.Machine_LogsClient, err error) {
|
||||
stream, err = c.MachineClient.Logs(ctx, &machineapi.LogsRequest{
|
||||
Namespace: namespace,
|
||||
Driver: driver,
|
||||
Id: id,
|
||||
|
@ -7,6 +7,7 @@ package reg
|
||||
import (
|
||||
"bufio"
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"log"
|
||||
@ -19,12 +20,20 @@ import (
|
||||
"golang.org/x/sys/unix"
|
||||
"google.golang.org/grpc"
|
||||
|
||||
criconstants "github.com/containerd/cri/pkg/constants"
|
||||
|
||||
"github.com/talos-systems/talos/api/common"
|
||||
"github.com/talos-systems/talos/api/machine"
|
||||
machineapi "github.com/talos-systems/talos/api/machine"
|
||||
"github.com/talos-systems/talos/internal/app/machined/pkg/system"
|
||||
"github.com/talos-systems/talos/internal/pkg/containers"
|
||||
"github.com/talos-systems/talos/internal/pkg/containers/containerd"
|
||||
"github.com/talos-systems/talos/internal/pkg/containers/cri"
|
||||
"github.com/talos-systems/talos/internal/pkg/event"
|
||||
"github.com/talos-systems/talos/internal/pkg/runtime"
|
||||
"github.com/talos-systems/talos/pkg/archiver"
|
||||
"github.com/talos-systems/talos/pkg/chunker"
|
||||
filechunker "github.com/talos-systems/talos/pkg/chunker/file"
|
||||
"github.com/talos-systems/talos/pkg/chunker/stream"
|
||||
"github.com/talos-systems/talos/pkg/constants"
|
||||
"github.com/talos-systems/talos/pkg/version"
|
||||
@ -389,3 +398,82 @@ func (r *Registrator) Kubeconfig(empty *empty.Empty, s machineapi.Machine_Kubeco
|
||||
|
||||
return r.CopyOut(in, s)
|
||||
}
|
||||
|
||||
// Logs provides a service or container logs can be requested and the contents of the
|
||||
// log file are streamed in chunks.
|
||||
// nolint: gocyclo
|
||||
func (r *Registrator) Logs(req *machineapi.LogsRequest, l machineapi.Machine_LogsServer) (err error) {
|
||||
var chunk chunker.Chunker
|
||||
|
||||
switch {
|
||||
case req.Namespace == constants.SystemContainerdNamespace || req.Id == "kubelet":
|
||||
filename := filepath.Join(constants.DefaultLogPath, filepath.Base(req.Id)+".log")
|
||||
|
||||
var file *os.File
|
||||
|
||||
file, err = os.OpenFile(filename, os.O_RDONLY, 0)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
// nolint: errcheck
|
||||
defer file.Close()
|
||||
|
||||
chunk = filechunker.NewChunker(file)
|
||||
default:
|
||||
var file io.Closer
|
||||
|
||||
if chunk, file, err = k8slogs(l.Context(), req); err != nil {
|
||||
return err
|
||||
}
|
||||
// nolint: errcheck
|
||||
defer file.Close()
|
||||
}
|
||||
|
||||
for data := range chunk.Read(l.Context()) {
|
||||
if err = l.Send(&common.Data{Bytes: data}); err != nil {
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func k8slogs(ctx context.Context, req *machineapi.LogsRequest) (chunker.Chunker, io.Closer, error) {
|
||||
inspector, err := getContainerInspector(ctx, req.Namespace, req.Driver)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
// nolint: errcheck
|
||||
defer inspector.Close()
|
||||
|
||||
container, err := inspector.Container(req.Id)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
|
||||
if container == nil {
|
||||
return nil, nil, fmt.Errorf("container %q not found", req.Id)
|
||||
}
|
||||
|
||||
return container.GetLogChunker()
|
||||
}
|
||||
|
||||
func getContainerInspector(ctx context.Context, namespace string, driver common.ContainerDriver) (containers.Inspector, error) {
|
||||
switch driver {
|
||||
case common.ContainerDriver_CRI:
|
||||
if namespace != criconstants.K8sContainerdNamespace {
|
||||
return nil, errors.New("CRI inspector is supported only for K8s namespace")
|
||||
}
|
||||
|
||||
return cri.NewInspector(ctx)
|
||||
case common.ContainerDriver_CONTAINERD:
|
||||
addr := constants.ContainerdAddress
|
||||
if namespace == constants.SystemContainerdNamespace {
|
||||
addr = constants.SystemContainerdAddress
|
||||
}
|
||||
|
||||
return containerd.NewInspector(ctx, namespace, containerd.WithContainerdAddress(addr))
|
||||
default:
|
||||
return nil, fmt.Errorf("unsupported driver %q", driver)
|
||||
}
|
||||
}
|
||||
|
@ -8,10 +8,7 @@ import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"log"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"syscall"
|
||||
|
||||
@ -26,8 +23,6 @@ import (
|
||||
"github.com/talos-systems/talos/internal/pkg/containers"
|
||||
"github.com/talos-systems/talos/internal/pkg/containers/containerd"
|
||||
"github.com/talos-systems/talos/internal/pkg/containers/cri"
|
||||
"github.com/talos-systems/talos/pkg/chunker"
|
||||
filechunker "github.com/talos-systems/talos/pkg/chunker/file"
|
||||
"github.com/talos-systems/talos/pkg/constants"
|
||||
)
|
||||
|
||||
@ -194,45 +189,6 @@ func (r *Registrator) Dmesg(ctx context.Context, in *empty.Empty) (data *common.
|
||||
return data, err
|
||||
}
|
||||
|
||||
// Logs implements the osapi.OSDServer interface. Service or container logs can
|
||||
// be requested and the contents of the log file are streamed in chunks.
|
||||
// nolint: gocyclo
|
||||
func (r *Registrator) Logs(req *osapi.LogsRequest, l osapi.OS_LogsServer) (err error) {
|
||||
var chunk chunker.Chunker
|
||||
|
||||
switch {
|
||||
case req.Namespace == constants.SystemContainerdNamespace || req.Id == "kubelet":
|
||||
filename := filepath.Join(constants.DefaultLogPath, filepath.Base(req.Id)+".log")
|
||||
|
||||
var file *os.File
|
||||
|
||||
file, err = os.OpenFile(filename, os.O_RDONLY, 0)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
// nolint: errcheck
|
||||
defer file.Close()
|
||||
|
||||
chunk = filechunker.NewChunker(file)
|
||||
default:
|
||||
var file io.Closer
|
||||
|
||||
if chunk, file, err = k8slogs(l.Context(), req); err != nil {
|
||||
return err
|
||||
}
|
||||
// nolint: errcheck
|
||||
defer file.Close()
|
||||
}
|
||||
|
||||
for data := range chunk.Read(l.Context()) {
|
||||
if err = l.Send(&common.Data{Bytes: data}); err != nil {
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// Processes implements the osapi.OSDServer interface
|
||||
func (r *Registrator) Processes(ctx context.Context, in *empty.Empty) (reply *osapi.ProcessesReply, err error) {
|
||||
procs, err := procfs.AllProcs()
|
||||
@ -297,15 +253,15 @@ func (r *Registrator) Processes(ctx context.Context, in *empty.Empty) (reply *os
|
||||
return reply, nil
|
||||
}
|
||||
|
||||
func getContainerInspector(ctx context.Context, namespace string, driver osapi.ContainerDriver) (containers.Inspector, error) {
|
||||
func getContainerInspector(ctx context.Context, namespace string, driver common.ContainerDriver) (containers.Inspector, error) {
|
||||
switch driver {
|
||||
case osapi.ContainerDriver_CRI:
|
||||
case common.ContainerDriver_CRI:
|
||||
if namespace != criconstants.K8sContainerdNamespace {
|
||||
return nil, errors.New("CRI inspector is supported only for K8s namespace")
|
||||
}
|
||||
|
||||
return cri.NewInspector(ctx)
|
||||
case osapi.ContainerDriver_CONTAINERD:
|
||||
case common.ContainerDriver_CONTAINERD:
|
||||
addr := constants.ContainerdAddress
|
||||
if namespace == constants.SystemContainerdNamespace {
|
||||
addr = constants.SystemContainerdAddress
|
||||
@ -316,23 +272,3 @@ func getContainerInspector(ctx context.Context, namespace string, driver osapi.C
|
||||
return nil, fmt.Errorf("unsupported driver %q", driver)
|
||||
}
|
||||
}
|
||||
|
||||
func k8slogs(ctx context.Context, req *osapi.LogsRequest) (chunker.Chunker, io.Closer, error) {
|
||||
inspector, err := getContainerInspector(ctx, req.Namespace, req.Driver)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
// nolint: errcheck
|
||||
defer inspector.Close()
|
||||
|
||||
container, err := inspector.Container(req.Id)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
|
||||
if container == nil {
|
||||
return nil, nil, fmt.Errorf("container %q not found", req.Id)
|
||||
}
|
||||
|
||||
return container.GetLogChunker()
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user