diff --git a/integration/rpc/instance_manager/imrpc_pb2.py b/integration/rpc/instance_manager/imrpc_pb2.py index 0552739cd..18cfe7d03 100644 --- a/integration/rpc/instance_manager/imrpc_pb2.py +++ b/integration/rpc/instance_manager/imrpc_pb2.py @@ -21,7 +21,7 @@ package='', syntax='proto3', serialized_options=None, - serialized_pb=_b('\n\x0bimrpc.proto\x1a\x1bgoogle/protobuf/empty.proto\"`\n\x0bProcessSpec\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0e\n\x06\x62inary\x18\x02 \x01(\t\x12\x0c\n\x04\x61rgs\x18\x03 \x03(\t\x12\x12\n\nport_count\x18\x04 \x01(\x05\x12\x11\n\tport_args\x18\x05 \x03(\t\"W\n\rProcessStatus\x12\r\n\x05state\x18\x01 \x01(\t\x12\x11\n\terror_msg\x18\x02 \x01(\t\x12\x12\n\nport_start\x18\x03 \x01(\x05\x12\x10\n\x08port_end\x18\x04 \x01(\x05\"2\n\x14ProcessCreateRequest\x12\x1a\n\x04spec\x18\x01 \x01(\x0b\x32\x0c.ProcessSpec\"$\n\x14ProcessDeleteRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"!\n\x11ProcessGetRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"^\n\x0fProcessResponse\x12\x1a\n\x04spec\x18\x01 \x01(\x0b\x32\x0c.ProcessSpec\x12\x1e\n\x06status\x18\x02 \x01(\x0b\x32\x0e.ProcessStatus\x12\x0f\n\x07\x64\x65leted\x18\x03 \x01(\x08\"\x14\n\x12ProcessListRequest\"\x91\x01\n\x13ProcessListResponse\x12\x36\n\tprocesses\x18\x01 \x03(\x0b\x32#.ProcessListResponse.ProcessesEntry\x1a\x42\n\x0eProcessesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x1f\n\x05value\x18\x02 \x01(\x0b\x32\x10.ProcessResponse:\x02\x38\x01\"\x1a\n\nLogRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"\x1b\n\x0bLogResponse\x12\x0c\n\x04line\x18\x02 \x01(\t\"M\n\x15ProcessReplaceRequest\x12\x1a\n\x04spec\x18\x01 \x01(\x0b\x32\x0c.ProcessSpec\x12\x18\n\x10terminate_signal\x18\x02 \x01(\t\"\x91\x01\n\x0fVersionResponse\x12\x0f\n\x07version\x18\x01 \x01(\t\x12\x11\n\tgitCommit\x18\x02 \x01(\t\x12\x11\n\tbuildDate\x18\x03 \x01(\t\x12!\n\x19instanceManagerAPIVersion\x18\x04 \x01(\x03\x12$\n\x1cinstanceManagerAPIMinVersion\x18\x05 \x01(\x03\x32\xe2\x03\n\x15ProcessManagerService\x12:\n\rProcessCreate\x12\x15.ProcessCreateRequest\x1a\x10.ProcessResponse\"\x00\x12:\n\rProcessDelete\x12\x15.ProcessDeleteRequest\x1a\x10.ProcessResponse\"\x00\x12\x34\n\nProcessGet\x12\x12.ProcessGetRequest\x1a\x10.ProcessResponse\"\x00\x12:\n\x0bProcessList\x12\x13.ProcessListRequest\x1a\x14.ProcessListResponse\"\x00\x12+\n\nProcessLog\x12\x0b.LogRequest\x1a\x0c.LogResponse\"\x00\x30\x01\x12<\n\x0cProcessWatch\x12\x16.google.protobuf.Empty\x1a\x10.ProcessResponse\"\x00\x30\x01\x12<\n\x0eProcessReplace\x12\x16.ProcessReplaceRequest\x1a\x10.ProcessResponse\"\x00\x12\x36\n\nVersionGet\x12\x16.google.protobuf.Empty\x1a\x10.VersionResponseb\x06proto3') + serialized_pb=_b('\n\x0bimrpc.proto\x1a\x1bgoogle/protobuf/empty.proto\"`\n\x0bProcessSpec\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0e\n\x06\x62inary\x18\x02 \x01(\t\x12\x0c\n\x04\x61rgs\x18\x03 \x03(\t\x12\x12\n\nport_count\x18\x04 \x01(\x05\x12\x11\n\tport_args\x18\x05 \x03(\t\"W\n\rProcessStatus\x12\r\n\x05state\x18\x01 \x01(\t\x12\x11\n\terror_msg\x18\x02 \x01(\t\x12\x12\n\nport_start\x18\x03 \x01(\x05\x12\x10\n\x08port_end\x18\x04 \x01(\x05\"2\n\x14ProcessCreateRequest\x12\x1a\n\x04spec\x18\x01 \x01(\x0b\x32\x0c.ProcessSpec\"$\n\x14ProcessDeleteRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"!\n\x11ProcessGetRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"^\n\x0fProcessResponse\x12\x1a\n\x04spec\x18\x01 \x01(\x0b\x32\x0c.ProcessSpec\x12\x1e\n\x06status\x18\x02 \x01(\x0b\x32\x0e.ProcessStatus\x12\x0f\n\x07\x64\x65leted\x18\x03 \x01(\x08\"\x14\n\x12ProcessListRequest\"\x91\x01\n\x13ProcessListResponse\x12\x36\n\tprocesses\x18\x01 \x03(\x0b\x32#.ProcessListResponse.ProcessesEntry\x1a\x42\n\x0eProcessesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x1f\n\x05value\x18\x02 \x01(\x0b\x32\x10.ProcessResponse:\x02\x38\x01\"\x1a\n\nLogRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"\x1b\n\x0bLogResponse\x12\x0c\n\x04line\x18\x02 \x01(\t\"M\n\x15ProcessReplaceRequest\x12\x1a\n\x04spec\x18\x01 \x01(\x0b\x32\x0c.ProcessSpec\x12\x18\n\x10terminate_signal\x18\x02 \x01(\t\"\xe4\x01\n\x0fVersionResponse\x12\x0f\n\x07version\x18\x01 \x01(\t\x12\x11\n\tgitCommit\x18\x02 \x01(\t\x12\x11\n\tbuildDate\x18\x03 \x01(\t\x12!\n\x19instanceManagerAPIVersion\x18\x04 \x01(\x03\x12$\n\x1cinstanceManagerAPIMinVersion\x18\x05 \x01(\x03\x12&\n\x1einstanceManagerProxyAPIVersion\x18\x06 \x01(\x03\x12)\n!instanceManagerProxyAPIMinVersion\x18\x07 \x01(\x03\x32\xe2\x03\n\x15ProcessManagerService\x12:\n\rProcessCreate\x12\x15.ProcessCreateRequest\x1a\x10.ProcessResponse\"\x00\x12:\n\rProcessDelete\x12\x15.ProcessDeleteRequest\x1a\x10.ProcessResponse\"\x00\x12\x34\n\nProcessGet\x12\x12.ProcessGetRequest\x1a\x10.ProcessResponse\"\x00\x12:\n\x0bProcessList\x12\x13.ProcessListRequest\x1a\x14.ProcessListResponse\"\x00\x12+\n\nProcessLog\x12\x0b.LogRequest\x1a\x0c.LogResponse\"\x00\x30\x01\x12<\n\x0cProcessWatch\x12\x16.google.protobuf.Empty\x1a\x10.ProcessResponse\"\x00\x30\x01\x12<\n\x0eProcessReplace\x12\x16.ProcessReplaceRequest\x1a\x10.ProcessResponse\"\x00\x12\x36\n\nVersionGet\x12\x16.google.protobuf.Empty\x1a\x10.VersionResponseb\x06proto3') , dependencies=[google_dot_protobuf_dot_empty__pb2.DESCRIPTOR,]) @@ -511,6 +511,20 @@ message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='instanceManagerProxyAPIVersion', full_name='VersionResponse.instanceManagerProxyAPIVersion', index=5, + number=6, type=3, cpp_type=2, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='instanceManagerProxyAPIMinVersion', full_name='VersionResponse.instanceManagerProxyAPIMinVersion', index=6, + number=7, type=3, cpp_type=2, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -524,7 +538,7 @@ oneofs=[ ], serialized_start=759, - serialized_end=904, + serialized_end=987, ) _PROCESSCREATEREQUEST.fields_by_name['spec'].message_type = _PROCESSSPEC @@ -649,8 +663,8 @@ file=DESCRIPTOR, index=0, serialized_options=None, - serialized_start=907, - serialized_end=1389, + serialized_start=990, + serialized_end=1472, methods=[ _descriptor.MethodDescriptor( name='ProcessCreate', diff --git a/pkg/client/process_manager.go b/pkg/client/process_manager.go index 7876379f2..2d56c2428 100644 --- a/pkg/client/process_manager.go +++ b/pkg/client/process_manager.go @@ -208,6 +208,7 @@ func (c *ProcessManagerClient) VersionGet() (*meta.VersionOutput, error) { if err != nil { return nil, fmt.Errorf("failed to get version: %v", err) } + return &meta.VersionOutput{ Version: resp.Version, GitCommit: resp.GitCommit, @@ -215,5 +216,8 @@ func (c *ProcessManagerClient) VersionGet() (*meta.VersionOutput, error) { InstanceManagerAPIVersion: int(resp.InstanceManagerAPIVersion), InstanceManagerAPIMinVersion: int(resp.InstanceManagerAPIMinVersion), + + InstanceManagerProxyAPIVersion: int(resp.InstanceManagerProxyAPIVersion), + InstanceManagerProxyAPIMinVersion: int(resp.InstanceManagerProxyAPIMinVersion), }, nil } diff --git a/pkg/client/proxy.go b/pkg/client/proxy.go index 32a5710f1..472d3a0b3 100644 --- a/pkg/client/proxy.go +++ b/pkg/client/proxy.go @@ -10,6 +10,7 @@ import ( "google.golang.org/grpc" rpc "github.com/longhorn/longhorn-instance-manager/pkg/imrpc" + "github.com/longhorn/longhorn-instance-manager/pkg/meta" "github.com/longhorn/longhorn-instance-manager/pkg/util" emeta "github.com/longhorn/longhorn-engine/pkg/meta" @@ -39,6 +40,8 @@ func (c *ProxyClient) Close() error { type ProxyClient struct { ServiceURL string ServiceContext + + Version int } func NewProxyClient(ctx context.Context, ctxCancel context.CancelFunc, address string, port int) (*ProxyClient, error) { @@ -65,6 +68,7 @@ func NewProxyClient(ctx context.Context, ctxCancel context.CancelFunc, address s return &ProxyClient{ ServiceURL: serviceURL, ServiceContext: serviceCtx, + Version: meta.InstanceManagerProxyAPIVersion, }, nil } diff --git a/pkg/imrpc/imrpc.pb.go b/pkg/imrpc/imrpc.pb.go index ff8da4600..aea4d35cf 100644 --- a/pkg/imrpc/imrpc.pb.go +++ b/pkg/imrpc/imrpc.pb.go @@ -527,14 +527,16 @@ func (m *ProcessReplaceRequest) GetTerminateSignal() string { } type VersionResponse struct { - Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` - GitCommit string `protobuf:"bytes,2,opt,name=gitCommit,proto3" json:"gitCommit,omitempty"` - BuildDate string `protobuf:"bytes,3,opt,name=buildDate,proto3" json:"buildDate,omitempty"` - InstanceManagerAPIVersion int64 `protobuf:"varint,4,opt,name=instanceManagerAPIVersion,proto3" json:"instanceManagerAPIVersion,omitempty"` - InstanceManagerAPIMinVersion int64 `protobuf:"varint,5,opt,name=instanceManagerAPIMinVersion,proto3" json:"instanceManagerAPIMinVersion,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` + GitCommit string `protobuf:"bytes,2,opt,name=gitCommit,proto3" json:"gitCommit,omitempty"` + BuildDate string `protobuf:"bytes,3,opt,name=buildDate,proto3" json:"buildDate,omitempty"` + InstanceManagerAPIVersion int64 `protobuf:"varint,4,opt,name=instanceManagerAPIVersion,proto3" json:"instanceManagerAPIVersion,omitempty"` + InstanceManagerAPIMinVersion int64 `protobuf:"varint,5,opt,name=instanceManagerAPIMinVersion,proto3" json:"instanceManagerAPIMinVersion,omitempty"` + InstanceManagerProxyAPIVersion int64 `protobuf:"varint,6,opt,name=instanceManagerProxyAPIVersion,proto3" json:"instanceManagerProxyAPIVersion,omitempty"` + InstanceManagerProxyAPIMinVersion int64 `protobuf:"varint,7,opt,name=instanceManagerProxyAPIMinVersion,proto3" json:"instanceManagerProxyAPIMinVersion,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *VersionResponse) Reset() { *m = VersionResponse{} } @@ -597,6 +599,20 @@ func (m *VersionResponse) GetInstanceManagerAPIMinVersion() int64 { return 0 } +func (m *VersionResponse) GetInstanceManagerProxyAPIVersion() int64 { + if m != nil { + return m.InstanceManagerProxyAPIVersion + } + return 0 +} + +func (m *VersionResponse) GetInstanceManagerProxyAPIMinVersion() int64 { + if m != nil { + return m.InstanceManagerProxyAPIMinVersion + } + return 0 +} + func init() { proto.RegisterType((*ProcessSpec)(nil), "ProcessSpec") proto.RegisterType((*ProcessStatus)(nil), "ProcessStatus") @@ -616,51 +632,53 @@ func init() { func init() { proto.RegisterFile("imrpc.proto", fileDescriptor_5be15464f1ad70fb) } var fileDescriptor_5be15464f1ad70fb = []byte{ - // 694 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x54, 0xd1, 0x4e, 0xdb, 0x4a, - 0x10, 0xc5, 0x38, 0x01, 0x32, 0xe6, 0x02, 0x77, 0x08, 0xc8, 0x04, 0xae, 0x94, 0xeb, 0x2b, 0x71, - 0x69, 0x2b, 0x99, 0x2a, 0xad, 0x2a, 0x84, 0x78, 0xa1, 0x80, 0xaa, 0x4a, 0x50, 0x21, 0x47, 0x6a, - 0x1f, 0xa3, 0x8d, 0x33, 0x75, 0xad, 0x26, 0x6b, 0x77, 0x77, 0x83, 0x14, 0xa9, 0x3f, 0xd0, 0x3f, - 0xe9, 0x77, 0xf5, 0xad, 0x7f, 0x51, 0x79, 0xbd, 0x76, 0x12, 0x62, 0x68, 0xdf, 0x76, 0xce, 0xcc, - 0xec, 0x1c, 0x1f, 0xcf, 0x59, 0x70, 0xe2, 0x91, 0x48, 0x43, 0x3f, 0x15, 0x89, 0x4a, 0x5a, 0xfb, - 0x51, 0x92, 0x44, 0x43, 0x3a, 0xd6, 0x51, 0x7f, 0xfc, 0xf1, 0x98, 0x46, 0xa9, 0x9a, 0xe4, 0x49, - 0xef, 0x9b, 0x05, 0xce, 0xad, 0x48, 0x42, 0x92, 0xb2, 0x9b, 0x52, 0x88, 0x08, 0x35, 0xce, 0x46, - 0xe4, 0x5a, 0x6d, 0xeb, 0xa8, 0x11, 0xe8, 0x33, 0xee, 0xc2, 0x4a, 0x3f, 0xe6, 0x4c, 0x4c, 0xdc, - 0x65, 0x8d, 0x9a, 0x28, 0xab, 0x65, 0x22, 0x92, 0xae, 0xdd, 0xb6, 0xb3, 0xda, 0xec, 0x8c, 0xff, - 0x00, 0xa4, 0x89, 0x50, 0xbd, 0x30, 0x19, 0x73, 0xe5, 0xd6, 0xda, 0xd6, 0x51, 0x3d, 0x68, 0x64, - 0xc8, 0x45, 0x06, 0xe0, 0x3e, 0xe8, 0xa0, 0xa7, 0xfb, 0xea, 0xba, 0x6f, 0x2d, 0x03, 0xce, 0x45, - 0x24, 0xbd, 0xaf, 0xf0, 0x57, 0x41, 0x45, 0x31, 0x35, 0x96, 0xd8, 0x84, 0xba, 0x54, 0x4c, 0x15, - 0x6c, 0xf2, 0x20, 0xbb, 0x83, 0x84, 0x48, 0x44, 0x6f, 0x24, 0x23, 0xc3, 0x68, 0x4d, 0x03, 0x37, - 0x32, 0x2a, 0xe7, 0x4b, 0xc5, 0x84, 0x72, 0xed, 0xe9, 0xfc, 0x6e, 0x06, 0xe0, 0x1e, 0xe8, 0x71, - 0x3d, 0xe2, 0x03, 0x43, 0x6e, 0x35, 0x8b, 0xaf, 0xf8, 0xc0, 0x3b, 0x81, 0xa6, 0x99, 0x7e, 0x21, - 0x88, 0x29, 0x0a, 0xe8, 0xcb, 0x98, 0xa4, 0xc2, 0x36, 0xd4, 0x64, 0x4a, 0xa1, 0xe6, 0xe0, 0x74, - 0xd6, 0xfd, 0x19, 0xb5, 0x02, 0x9d, 0xf1, 0x9e, 0x96, 0x9d, 0x97, 0x34, 0xa4, 0x69, 0x67, 0x85, - 0x96, 0xde, 0xff, 0xf0, 0xb7, 0xa9, 0x7d, 0x43, 0xea, 0xb1, 0xc2, 0x31, 0x6c, 0x9a, 0xc2, 0x80, - 0x64, 0x9a, 0x70, 0x49, 0xbf, 0x67, 0x82, 0x87, 0xb0, 0x22, 0xb5, 0x74, 0x5a, 0x17, 0xa7, 0xb3, - 0xe1, 0xcf, 0x09, 0x1a,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0xc2, 0x1b, 0x7f, 0x06, 0x00, 0x00, + // 724 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x55, 0xef, 0x4e, 0x13, 0x41, + 0x10, 0xe7, 0xb8, 0xfe, 0xa1, 0x73, 0x08, 0x38, 0x14, 0x72, 0x14, 0x34, 0xe5, 0x4c, 0x10, 0x35, + 0x39, 0x4c, 0x35, 0x86, 0x10, 0xbe, 0x20, 0xa0, 0x31, 0x29, 0x86, 0x5c, 0x13, 0xfd, 0xd8, 0x6c, + 0xaf, 0xeb, 0x79, 0xb1, 0xdd, 0x3b, 0x77, 0xb7, 0xc4, 0x26, 0xbe, 0x80, 0x6f, 0xe2, 0x73, 0xf9, + 0x22, 0x9a, 0xdb, 0xdb, 0xbb, 0xb6, 0xf4, 0x0a, 0x7e, 0xdb, 0xf9, 0xcd, 0x6f, 0x66, 0x7e, 0x37, + 0xb7, 0x33, 0x0b, 0x56, 0x38, 0xe4, 0xb1, 0xef, 0xc6, 0x3c, 0x92, 0x51, 0x63, 0x37, 0x88, 0xa2, + 0x60, 0x40, 0x8f, 0x94, 0xd5, 0x1b, 0x7d, 0x39, 0xa2, 0xc3, 0x58, 0x8e, 0x53, 0xa7, 0xf3, 0xcb, + 0x00, 0xeb, 0x9a, 0x47, 0x3e, 0x15, 0xa2, 0x13, 0x53, 0x1f, 0x11, 0x4a, 0x8c, 0x0c, 0xa9, 0x6d, + 0x34, 0x8d, 0xc3, 0x9a, 0xa7, 0xce, 0xb8, 0x0d, 0x95, 0x5e, 0xc8, 0x08, 0x1f, 0xdb, 0xcb, 0x0a, + 0xd5, 0x56, 0xc2, 0x25, 0x3c, 0x10, 0xb6, 0xd9, 0x34, 0x13, 0x6e, 0x72, 0xc6, 0x47, 0x00, 0x71, + 0xc4, 0x65, 0xd7, 0x8f, 0x46, 0x4c, 0xda, 0xa5, 0xa6, 0x71, 0x58, 0xf6, 0x6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07, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/pkg/imrpc/imrpc.proto b/pkg/imrpc/imrpc.proto index a0847081d..354201770 100644 --- a/pkg/imrpc/imrpc.proto +++ b/pkg/imrpc/imrpc.proto @@ -74,4 +74,7 @@ message VersionResponse { int64 instanceManagerAPIVersion = 4; int64 instanceManagerAPIMinVersion = 5; + + int64 instanceManagerProxyAPIVersion = 6; + int64 instanceManagerProxyAPIMinVersion = 7; } diff --git a/pkg/meta/version.go b/pkg/meta/version.go index 1e832ec7f..0f84fcd91 100644 --- a/pkg/meta/version.go +++ b/pkg/meta/version.go @@ -2,8 +2,12 @@ package meta const ( // InstanceManagerAPIVersion used to communicate with the user e.g. longhorn-manager - InstanceManagerAPIVersion = 2 - InstanceManagerAPIMinVersion = 2 + InstanceManagerAPIVersion = 1 + InstanceManagerAPIMinVersion = 1 + + // InstanceManagerProxyAPIVersion is used for compatibility check for longhorn-manager + InstanceManagerProxyAPIVersion = 1 + InstanceManagerProxyAPIMinVersion = 1 ) // Following variables are filled in by main.go @@ -20,6 +24,9 @@ type VersionOutput struct { InstanceManagerAPIVersion int `json:"instanceManagerAPIVersion"` InstanceManagerAPIMinVersion int `json:"instanceManagerAPIMinVersion"` + + InstanceManagerProxyAPIVersion int `json:"instanceManagerProxyAPIVersion"` + InstanceManagerProxyAPIMinVersion int `json:"instanceManagerProxyAPIMinVersion"` } func GetVersion() VersionOutput { @@ -30,5 +37,8 @@ func GetVersion() VersionOutput { InstanceManagerAPIVersion: InstanceManagerAPIVersion, InstanceManagerAPIMinVersion: InstanceManagerAPIMinVersion, + + InstanceManagerProxyAPIVersion: InstanceManagerProxyAPIVersion, + InstanceManagerProxyAPIMinVersion: InstanceManagerProxyAPIMinVersion, } } diff --git a/pkg/process/version.go b/pkg/process/version.go index 8a09853eb..fe4e970e6 100644 --- a/pkg/process/version.go +++ b/pkg/process/version.go @@ -17,5 +17,8 @@ func (pm *Manager) VersionGet(ctx context.Context, empty *empty.Empty) (*rpc.Ver InstanceManagerAPIVersion: int64(v.InstanceManagerAPIVersion), InstanceManagerAPIMinVersion: int64(v.InstanceManagerAPIMinVersion), + + InstanceManagerProxyAPIVersion: int64(v.InstanceManagerProxyAPIVersion), + InstanceManagerProxyAPIMinVersion: int64(v.InstanceManagerProxyAPIMinVersion), }, nil }