From 624e7a066e3ab6e1bdc3501d522f7f497f42da66 Mon Sep 17 00:00:00 2001 From: Michael Crenshaw Date: Mon, 25 Apr 2022 13:39:00 -0400 Subject: [PATCH] feat: parameterized CMPs Signed-off-by: Michael Crenshaw --- assets/swagger.json | 62 ++ cmpserver/apiclient/plugin.pb.go | 1082 ++++++++++++++++++++- cmpserver/plugin/plugin.go | 35 + cmpserver/plugin/plugin.proto | 34 + reposerver/apiclient/repository.pb.go | 1188 +++++++++++++++++++++--- reposerver/repository/repository.go | 50 + reposerver/repository/repository.proto | 30 + 7 files changed, 2323 insertions(+), 158 deletions(-) diff --git a/assets/swagger.json b/assets/swagger.json index 69cdc734800cd..30080b34eacb9 100644 --- a/assets/swagger.json +++ b/assets/swagger.json @@ -4043,6 +4043,65 @@ } } }, + "repositoryParameterAnnouncement": { + "type": "object", + "properties": { + "array": { + "description": "array is the default value of the parameter if the parameter is an array.", + "type": "array", + "items": { + "type": "string" + } + }, + "collectionType": { + "description": "collectionType is the type of value this parameter holds - either a single value (a string) or a collection\n(array or map). If collectionType is set, only the field with that type will be used. If collectionType is not\nset, `string` is the default. If collectionType is set to an invalid value, a validation error is thrown.", + "type": "string" + }, + "itemType": { + "description": "itemType determines the primitive data type represented by the parameter. Parameters are always encoded as\nstrings, but this field lets them be interpreted as other primitive types.", + "type": "string" + }, + "map": { + "description": "map is the default value of the parameter if the parameter is a map.", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "name": { + "description": "name is the name identifying a parameter.", + "type": "string" + }, + "required": { + "description": "required defines if this given parameter is mandatory.", + "type": "boolean" + }, + "string": { + "description": "string is the default value of the parameter if the parameter is a string.", + "type": "string" + }, + "title": { + "description": "title is a human-readable text of the parameter name.", + "type": "string" + }, + "tooltip": { + "description": "tooltip is a human-readable description of the parameter.", + "type": "string" + } + } + }, + "repositoryPluginAppSpec": { + "type": "object", + "title": "PluginAppSpec contains details about a plugin-type Application", + "properties": { + "parametersAnnouncement": { + "type": "array", + "items": { + "$ref": "#/definitions/repositoryParameterAnnouncement" + } + } + } + }, "repositoryRefs": { "type": "object", "title": "A subset of the repository's named refs", @@ -4089,6 +4148,9 @@ "kustomize": { "$ref": "#/definitions/repositoryKustomizeAppSpec" }, + "plugin": { + "$ref": "#/definitions/repositoryPluginAppSpec" + }, "type": { "type": "string" } diff --git a/cmpserver/apiclient/plugin.pb.go b/cmpserver/apiclient/plugin.pb.go index ecc28da7c4b71..4c195fb0510a5 100644 --- a/cmpserver/apiclient/plugin.pb.go +++ b/cmpserver/apiclient/plugin.pb.go @@ -362,6 +362,178 @@ func (m *RepositoryResponse) GetIsSupported() bool { return false } +type ParameterAnnouncement struct { + // name is the name identifying a parameter. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // title is a human-readable text of the parameter name. + Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"` + // tooltip is a human-readable description of the parameter. + Tooltip string `protobuf:"bytes,3,opt,name=tooltip,proto3" json:"tooltip,omitempty"` + // required defines if this given parameter is mandatory. + Required bool `protobuf:"varint,4,opt,name=required,proto3" json:"required,omitempty"` + // itemType determines the primitive data type represented by the parameter. Parameters are always encoded as + // strings, but this field lets them be interpreted as other primitive types. + ItemType string `protobuf:"bytes,5,opt,name=itemType,proto3" json:"itemType,omitempty"` + // collectionType is the type of value this parameter holds - either a single value (a string) or a collection + // (array or map). If collectionType is set, only the field with that type will be used. If collectionType is not + // set, `string` is the default. If collectionType is set to an invalid value, a validation error is thrown. + CollectionType string `protobuf:"bytes,6,opt,name=collectionType,proto3" json:"collectionType,omitempty"` + // string is the default value of the parameter if the parameter is a string. + String_ string `protobuf:"bytes,7,opt,name=string,proto3" json:"string,omitempty"` + // array is the default value of the parameter if the parameter is an array. + Array []string `protobuf:"bytes,8,rep,name=array,proto3" json:"array,omitempty"` + // map is the default value of the parameter if the parameter is a map. + Map map[string]string `protobuf:"bytes,9,rep,name=map,proto3" json:"map,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ParameterAnnouncement) Reset() { *m = ParameterAnnouncement{} } +func (m *ParameterAnnouncement) String() string { return proto.CompactTextString(m) } +func (*ParameterAnnouncement) ProtoMessage() {} +func (*ParameterAnnouncement) Descriptor() ([]byte, []int) { + return fileDescriptor_b21875a7079a06ed, []int{5} +} +func (m *ParameterAnnouncement) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ParameterAnnouncement) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ParameterAnnouncement.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ParameterAnnouncement) XXX_Merge(src proto.Message) { + xxx_messageInfo_ParameterAnnouncement.Merge(m, src) +} +func (m *ParameterAnnouncement) XXX_Size() int { + return m.Size() +} +func (m *ParameterAnnouncement) XXX_DiscardUnknown() { + xxx_messageInfo_ParameterAnnouncement.DiscardUnknown(m) +} + +var xxx_messageInfo_ParameterAnnouncement proto.InternalMessageInfo + +func (m *ParameterAnnouncement) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *ParameterAnnouncement) GetTitle() string { + if m != nil { + return m.Title + } + return "" +} + +func (m *ParameterAnnouncement) GetTooltip() string { + if m != nil { + return m.Tooltip + } + return "" +} + +func (m *ParameterAnnouncement) GetRequired() bool { + if m != nil { + return m.Required + } + return false +} + +func (m *ParameterAnnouncement) GetItemType() string { + if m != nil { + return m.ItemType + } + return "" +} + +func (m *ParameterAnnouncement) GetCollectionType() string { + if m != nil { + return m.CollectionType + } + return "" +} + +func (m *ParameterAnnouncement) GetString_() string { + if m != nil { + return m.String_ + } + return "" +} + +func (m *ParameterAnnouncement) GetArray() []string { + if m != nil { + return m.Array + } + return nil +} + +func (m *ParameterAnnouncement) GetMap() map[string]string { + if m != nil { + return m.Map + } + return nil +} + +// ParametersAnnouncementResponse contains a list of announcements. This list represents all the parameters which a CMP +// is able to accept. +type ParametersAnnouncementResponse struct { + ParameterAnnouncements []*ParameterAnnouncement `protobuf:"bytes,1,rep,name=parameterAnnouncements,proto3" json:"parameterAnnouncements,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ParametersAnnouncementResponse) Reset() { *m = ParametersAnnouncementResponse{} } +func (m *ParametersAnnouncementResponse) String() string { return proto.CompactTextString(m) } +func (*ParametersAnnouncementResponse) ProtoMessage() {} +func (*ParametersAnnouncementResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_b21875a7079a06ed, []int{6} +} +func (m *ParametersAnnouncementResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ParametersAnnouncementResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ParametersAnnouncementResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ParametersAnnouncementResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_ParametersAnnouncementResponse.Merge(m, src) +} +func (m *ParametersAnnouncementResponse) XXX_Size() int { + return m.Size() +} +func (m *ParametersAnnouncementResponse) XXX_DiscardUnknown() { + xxx_messageInfo_ParametersAnnouncementResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_ParametersAnnouncementResponse proto.InternalMessageInfo + +func (m *ParametersAnnouncementResponse) GetParameterAnnouncements() []*ParameterAnnouncement { + if m != nil { + return m.ParameterAnnouncements + } + return nil +} + type File struct { Chunk []byte `protobuf:"bytes,1,opt,name=chunk,proto3" json:"chunk,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` @@ -373,7 +545,7 @@ func (m *File) Reset() { *m = File{} } func (m *File) String() string { return proto.CompactTextString(m) } func (*File) ProtoMessage() {} func (*File) Descriptor() ([]byte, []int) { - return fileDescriptor_b21875a7079a06ed, []int{5} + return fileDescriptor_b21875a7079a06ed, []int{7} } func (m *File) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -415,44 +587,58 @@ func init() { proto.RegisterType((*EnvEntry)(nil), "plugin.EnvEntry") proto.RegisterType((*ManifestResponse)(nil), "plugin.ManifestResponse") proto.RegisterType((*RepositoryResponse)(nil), "plugin.RepositoryResponse") + proto.RegisterType((*ParameterAnnouncement)(nil), "plugin.ParameterAnnouncement") + proto.RegisterMapType((map[string]string)(nil), "plugin.ParameterAnnouncement.MapEntry") + proto.RegisterType((*ParametersAnnouncementResponse)(nil), "plugin.ParametersAnnouncementResponse") proto.RegisterType((*File)(nil), "plugin.File") } func init() { proto.RegisterFile("cmpserver/plugin/plugin.proto", fileDescriptor_b21875a7079a06ed) } var fileDescriptor_b21875a7079a06ed = []byte{ - // 483 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x53, 0xd1, 0x8e, 0x12, 0x3d, - 0x14, 0xa6, 0x3f, 0xec, 0x2e, 0x1c, 0x36, 0xf9, 0x49, 0x63, 0xe2, 0x84, 0xec, 0x22, 0x99, 0x2b, - 0x6e, 0x84, 0x04, 0x8d, 0x77, 0x26, 0xba, 0x66, 0x75, 0xa3, 0xc1, 0x90, 0xe2, 0x95, 0x77, 0xdd, - 0x72, 0x80, 0xba, 0x33, 0x6d, 0x6d, 0x3b, 0x93, 0xe0, 0x95, 0x6f, 0xe3, 0x2b, 0xf8, 0x08, 0x5e, - 0xfa, 0x08, 0x86, 0x27, 0x31, 0x53, 0x66, 0x18, 0xe2, 0x46, 0xaf, 0x38, 0xdf, 0x77, 0xce, 0xf9, - 0xf8, 0xbe, 0x4e, 0x0b, 0x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0x0a, 0xc5, 0x63, 0xb1, 0x9c, 0xe4, 0xd3, 0x49, 0xfd, 0x32, 0xb8, 0x91, 0x22, 0x91, 0xa8, 0xfc, - 0xed, 0x69, 0x78, 0x16, 0x4f, 0x7e, 0x07, 0x00, 0x00, 0xff, 0xff, 0x83, 0x01, 0x5e, 0x48, 0x37, - 0x03, 0x00, 0x00, + // 672 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x54, 0xcf, 0x6e, 0x13, 0x3f, + 0x10, 0xee, 0x26, 0x69, 0xba, 0x99, 0x54, 0xbf, 0x5f, 0x64, 0x41, 0x59, 0xa2, 0x36, 0x44, 0x7b, + 0xa8, 0x72, 0x21, 0x91, 0x02, 0xaa, 0x2a, 0x24, 0x24, 0x5a, 0x54, 0x5a, 0x81, 0x82, 0x22, 0x17, + 0x2e, 0xdc, 0xdc, 0xcd, 0x34, 0x31, 0xdd, 0xb5, 0x8d, 0xd7, 0x1b, 0x14, 0x4e, 0xbc, 0x07, 0x0f, + 0xc0, 0xab, 0x70, 0xe4, 0xce, 0x05, 0xf5, 0x49, 0xd0, 0x7a, 0xff, 0x24, 0x6a, 0xd3, 0x9e, 0xd6, + 0xdf, 0x8c, 0xe7, 0xf3, 0x37, 0xf3, 0x79, 0x0d, 0x7b, 0x41, 0xa4, 0x62, 0xd4, 0x73, 0xd4, 0x03, + 0x15, 0x26, 0x53, 0x2e, 0xf2, 0x4f, 0x5f, 0x69, 0x69, 0x24, 0xa9, 0x67, 0xc8, 0xff, 0xee, 0x40, + 0xeb, 0x48, 0xa9, 0x73, 0xa3, 0x91, 0x45, 0x14, 0xbf, 0x24, 0x18, 0x1b, 0xf2, 0x12, 0xdc, 0x08, + 0x0d, 0x9b, 0x30, 0xc3, 0x3c, 0xa7, 0xeb, 0xf4, 0x9a, 0xc3, 0x27, 0xfd, 0xbc, 0x7a, 0xc4, 0x04, + 0xbf, 0xc4, 0xd8, 0xe4, 0x5b, 0x47, 0xf9, 0xb6, 0xb3, 0x0d, 0x5a, 0x96, 0x10, 0x1f, 0x6a, 0x97, + 0x3c, 0x44, 0xaf, 0x62, 0x4b, 0xb7, 0x8b, 0xd2, 0x37, 0x3c, 0xc4, 0xb3, 0x0d, 0x6a, 0x73, 0xc7, + 0x0d, 0xd8, 0xd2, 0x19, 0x85, 0xff, 0xd3, 0x81, 0x47, 0x77, 0xd0, 0x12, 0x0f, 0xb6, 0x98, 0x52, + 0xef, 0x59, 0x84, 0x56, 0x48, 0x83, 0x16, 0x90, 0x74, 0x00, 0x98, 0x52, 0x14, 0xc3, 0x31, 0x33, + 0x33, 0x7b, 0x54, 0x83, 0xae, 0x44, 0x48, 0x1b, 0xdc, 0x60, 0x86, 0xc1, 0x55, 0x9c, 0x44, 0x5e, + 0xd5, 0x66, 0x4b, 0x4c, 0x08, 0xd4, 0x62, 0xfe, 0x0d, 0xbd, 0x5a, 0xd7, 0xe9, 0x55, 0xa9, 0x5d, + 0x13, 0x1f, 0xaa, 0x28, 0xe6, 0xde, 0x66, 0xb7, 0xda, 0x6b, 0x0e, 0x5b, 0x85, 0xe6, 0x13, 0x31, + 0x3f, 0x11, 0x46, 0x2f, 0x68, 0x9a, 0xf4, 0x9f, 0x83, 0x5b, 0x04, 0x52, 0x0e, 0xb1, 0x94, 0x65, + 0xd7, 0xe4, 0x01, 0x6c, 0xce, 0x59, 0x98, 0x60, 0x2e, 0x27, 0x03, 0xfe, 0x18, 0x5a, 0xcb, 0xf6, + 0x62, 0x25, 0x45, 0x8c, 0x64, 0x17, 0x1a, 0x51, 0x1e, 0x8b, 0x3d, 0xa7, 0x5b, 0xed, 0x35, 0xe8, + 0x32, 0x90, 0xf6, 0x16, 0xcb, 0x44, 0x07, 0xf8, 0x61, 0xa1, 0x0a, 0xb2, 0x95, 0x88, 0x7f, 0x00, + 0x84, 0xa2, 0x92, 0x31, 0x37, 0x52, 0x2f, 0x4a, 0xce, 0x2e,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, 0xdf, + 0x4a, 0xa5, 0x05, 0xb3, 0x44, 0x5c, 0x59, 0xb9, 0xdb, 0x34, 0x03, 0xc3, 0x1f, 0x15, 0xd8, 0x7b, + 0x2d, 0xc5, 0x25, 0x9f, 0x8e, 0x98, 0x60, 0x53, 0x5b, 0x33, 0xb6, 0xc7, 0x9c, 0xa3, 0x9e, 0xf3, + 0x00, 0xc9, 0x5b, 0x68, 0x9d, 0xa2, 0x40, 0xcd, 0x0c, 0x16, 0x17, 0x95, 0x78, 0x85, 0x94, 0x9b, + 0x8f, 0x43, 0xdb, 0xbb, 0xfd, 0x14, 0x64, 0xed, 0xf9, 0x1b, 0x3d, 0x87, 0xbc, 0x83, 0xff, 0x47, + 0xcc, 0x04, 0xb3, 0xe5, 0xfd, 0xbc, 0x87, 0xaa, 0x5d, 0x64, 0x6e, 0xdf, 0x66, 0x4b, 0xc6, 0xe0, + 0xf1, 0x29, 0x9a, 0xf5, 0x43, 0xbd, 0x87, 0xf6, 0xb6, 0xdb, 0x6b, 0xed, 0x48, 0x8f, 0x38, 0x7e, + 0xf5, 0xeb, 0xba, 0xe3, 0xfc, 0xbe, 0xee, 0x38, 0x7f, 0xaf, 0x3b, 0xce, 0xa7, 0xe1, 0x94, 0x9b, + 0x59, 0x72, 0xd1, 0x0f, 0x64, 0x34, 0x60, 0x7a, 0x2a, 0x95, 0x96, 0x9f, 0xed, 0xe2, 0x69, 0x30, + 0x19, 0xcc, 0x87, 0x83, 0xe5, 0x9b, 0xca, 0x14, 0x0f, 0x42, 0x8e, 0xc2, 0x5c, 0xd4, 0xed, 0x83, + 0xfa, 0xec, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x47, 0xf3, 0x00, 0x14, 0x71, 0x05, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -472,6 +658,8 @@ type ConfigManagementPluginServiceClient interface { GenerateManifest(ctx context.Context, opts ...grpc.CallOption) (ConfigManagementPluginService_GenerateManifestClient, error) // MatchRepository returns whether or not the given application is supported by the plugin MatchRepository(ctx context.Context, opts ...grpc.CallOption) (ConfigManagementPluginService_MatchRepositoryClient, error) + // GetParametersAnnouncement gets a list of parameter announcements for the given app + GetParametersAnnouncement(ctx context.Context, opts ...grpc.CallOption) (ConfigManagementPluginService_GetParametersAnnouncementClient, error) } type configManagementPluginServiceClient struct { @@ -550,6 +738,40 @@ func (x *configManagementPluginServiceMatchRepositoryClient) CloseAndRecv() (*Re return m, nil } +func (c *configManagementPluginServiceClient) GetParametersAnnouncement(ctx context.Context, opts ...grpc.CallOption) (ConfigManagementPluginService_GetParametersAnnouncementClient, error) { + stream, err := c.cc.NewStream(ctx, &_ConfigManagementPluginService_serviceDesc.Streams[2], "/plugin.ConfigManagementPluginService/GetParametersAnnouncement", opts...) + if err != nil { + return nil, err + } + x := &configManagementPluginServiceGetParametersAnnouncementClient{stream} + return x, nil +} + +type ConfigManagementPluginService_GetParametersAnnouncementClient interface { + Send(*AppStreamRequest) error + CloseAndRecv() (*ParametersAnnouncementResponse, error) + grpc.ClientStream +} + +type configManagementPluginServiceGetParametersAnnouncementClient struct { + grpc.ClientStream +} + +func (x *configManagementPluginServiceGetParametersAnnouncementClient) Send(m *AppStreamRequest) error { + return x.ClientStream.SendMsg(m) +} + +func (x *configManagementPluginServiceGetParametersAnnouncementClient) CloseAndRecv() (*ParametersAnnouncementResponse, error) { + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + m := new(ParametersAnnouncementResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + // ConfigManagementPluginServiceServer is the server API for ConfigManagementPluginService service. type ConfigManagementPluginServiceServer interface { // GenerateManifests receive a stream containing a tgz archive with all required files necessary @@ -557,6 +779,8 @@ type ConfigManagementPluginServiceServer interface { GenerateManifest(ConfigManagementPluginService_GenerateManifestServer) error // MatchRepository returns whether or not the given application is supported by the plugin MatchRepository(ConfigManagementPluginService_MatchRepositoryServer) error + // GetParametersAnnouncement gets a list of parameter announcements for the given app + GetParametersAnnouncement(ConfigManagementPluginService_GetParametersAnnouncementServer) error } // UnimplementedConfigManagementPluginServiceServer can be embedded to have forward compatible implementations. @@ -569,6 +793,9 @@ func (*UnimplementedConfigManagementPluginServiceServer) GenerateManifest(srv Co func (*UnimplementedConfigManagementPluginServiceServer) MatchRepository(srv ConfigManagementPluginService_MatchRepositoryServer) error { return status.Errorf(codes.Unimplemented, "method MatchRepository not implemented") } +func (*UnimplementedConfigManagementPluginServiceServer) GetParametersAnnouncement(srv ConfigManagementPluginService_GetParametersAnnouncementServer) error { + return status.Errorf(codes.Unimplemented, "method GetParametersAnnouncement not implemented") +} func RegisterConfigManagementPluginServiceServer(s *grpc.Server, srv ConfigManagementPluginServiceServer) { s.RegisterService(&_ConfigManagementPluginService_serviceDesc, srv) @@ -626,6 +853,32 @@ func (x *configManagementPluginServiceMatchRepositoryServer) Recv() (*AppStreamR return m, nil } +func _ConfigManagementPluginService_GetParametersAnnouncement_Handler(srv interface{}, stream grpc.ServerStream) error { + return srv.(ConfigManagementPluginServiceServer).GetParametersAnnouncement(&configManagementPluginServiceGetParametersAnnouncementServer{stream}) +} + +type ConfigManagementPluginService_GetParametersAnnouncementServer interface { + SendAndClose(*ParametersAnnouncementResponse) error + Recv() (*AppStreamRequest, error) + grpc.ServerStream +} + +type configManagementPluginServiceGetParametersAnnouncementServer struct { + grpc.ServerStream +} + +func (x *configManagementPluginServiceGetParametersAnnouncementServer) SendAndClose(m *ParametersAnnouncementResponse) error { + return x.ServerStream.SendMsg(m) +} + +func (x *configManagementPluginServiceGetParametersAnnouncementServer) Recv() (*AppStreamRequest, error) { + m := new(AppStreamRequest) + if err := x.ServerStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + var _ConfigManagementPluginService_serviceDesc = grpc.ServiceDesc{ ServiceName: "plugin.ConfigManagementPluginService", HandlerType: (*ConfigManagementPluginServiceServer)(nil), @@ -641,6 +894,11 @@ var _ConfigManagementPluginService_serviceDesc = grpc.ServiceDesc{ Handler: _ConfigManagementPluginService_MatchRepository_Handler, ClientStreams: true, }, + { + StreamName: "GetParametersAnnouncement", + Handler: _ConfigManagementPluginService_GetParametersAnnouncement_Handler, + ClientStreams: true, + }, }, Metadata: "cmpserver/plugin/plugin.proto", } @@ -911,6 +1169,154 @@ func (m *RepositoryResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *ParameterAnnouncement) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ParameterAnnouncement) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ParameterAnnouncement) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.Map) > 0 { + for k := range m.Map { + v := m.Map[k] + baseI := i + i -= len(v) + copy(dAtA[i:], v) + i = encodeVarintPlugin(dAtA, i, uint64(len(v))) + i-- + dAtA[i] = 0x12 + i -= len(k) + copy(dAtA[i:], k) + i = encodeVarintPlugin(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = encodeVarintPlugin(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x4a + } + } + if len(m.Array) > 0 { + for iNdEx := len(m.Array) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Array[iNdEx]) + copy(dAtA[i:], m.Array[iNdEx]) + i = encodeVarintPlugin(dAtA, i, uint64(len(m.Array[iNdEx]))) + i-- + dAtA[i] = 0x42 + } + } + if len(m.String_) > 0 { + i -= len(m.String_) + copy(dAtA[i:], m.String_) + i = encodeVarintPlugin(dAtA, i, uint64(len(m.String_))) + i-- + dAtA[i] = 0x3a + } + if len(m.CollectionType) > 0 { + i -= len(m.CollectionType) + copy(dAtA[i:], m.CollectionType) + i = encodeVarintPlugin(dAtA, i, uint64(len(m.CollectionType))) + i-- + dAtA[i] = 0x32 + } + if len(m.ItemType) > 0 { + i -= len(m.ItemType) + copy(dAtA[i:], m.ItemType) + i = encodeVarintPlugin(dAtA, i, uint64(len(m.ItemType))) + i-- + dAtA[i] = 0x2a + } + if m.Required { + i-- + if m.Required { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x20 + } + if len(m.Tooltip) > 0 { + i -= len(m.Tooltip) + copy(dAtA[i:], m.Tooltip) + i = encodeVarintPlugin(dAtA, i, uint64(len(m.Tooltip))) + i-- + dAtA[i] = 0x1a + } + if len(m.Title) > 0 { + i -= len(m.Title) + copy(dAtA[i:], m.Title) + i = encodeVarintPlugin(dAtA, i, uint64(len(m.Title))) + i-- + dAtA[i] = 0x12 + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintPlugin(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ParametersAnnouncementResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ParametersAnnouncementResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ParametersAnnouncementResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.ParameterAnnouncements) > 0 { + for iNdEx := len(m.ParameterAnnouncements) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.ParameterAnnouncements[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintPlugin(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + func (m *File) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1085,31 +1491,102 @@ func (m *RepositoryResponse) Size() (n int) { return n } -func (m *File) Size() (n int) { +func (m *ParameterAnnouncement) Size() (n int) { if m == nil { return 0 } var l int _ = l - l = len(m.Chunk) + l = len(m.Name) if l > 0 { n += 1 + l + sovPlugin(uint64(l)) } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) + l = len(m.Title) + if l > 0 { + n += 1 + l + sovPlugin(uint64(l)) } - return n -} - -func sovPlugin(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozPlugin(x uint64) (n int) { - return sovPlugin(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *AppStreamRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 + l = len(m.Tooltip) + if l > 0 { + n += 1 + l + sovPlugin(uint64(l)) + } + if m.Required { + n += 2 + } + l = len(m.ItemType) + if l > 0 { + n += 1 + l + sovPlugin(uint64(l)) + } + l = len(m.CollectionType) + if l > 0 { + n += 1 + l + sovPlugin(uint64(l)) + } + l = len(m.String_) + if l > 0 { + n += 1 + l + sovPlugin(uint64(l)) + } + if len(m.Array) > 0 { + for _, s := range m.Array { + l = len(s) + n += 1 + l + sovPlugin(uint64(l)) + } + } + if len(m.Map) > 0 { + for k, v := range m.Map { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovPlugin(uint64(len(k))) + 1 + len(v) + sovPlugin(uint64(len(v))) + n += mapEntrySize + 1 + sovPlugin(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *ParametersAnnouncementResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.ParameterAnnouncements) > 0 { + for _, e := range m.ParameterAnnouncements { + l = e.Size() + n += 1 + l + sovPlugin(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *File) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Chunk) + if l > 0 { + n += 1 + l + sovPlugin(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovPlugin(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozPlugin(x uint64) (n int) { + return sovPlugin(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *AppStreamRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 for iNdEx < l { preIndex := iNdEx var wire uint64 @@ -1729,6 +2206,513 @@ func (m *RepositoryResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *ParameterAnnouncement) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPlugin + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ParameterAnnouncement: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ParameterAnnouncement: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPlugin + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthPlugin + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPlugin + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Title", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPlugin + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthPlugin + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPlugin + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Title = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Tooltip", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPlugin + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthPlugin + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPlugin + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Tooltip = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Required", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPlugin + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Required = bool(v != 0) + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ItemType", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPlugin + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthPlugin + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPlugin + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ItemType = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CollectionType", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPlugin + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthPlugin + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPlugin + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CollectionType = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field String_", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPlugin + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthPlugin + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPlugin + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.String_ = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Array", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPlugin + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthPlugin + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthPlugin + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Array = append(m.Array, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPlugin + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthPlugin + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPlugin + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Map == nil { + m.Map = make(map[string]string) + } + var mapkey string + var mapvalue string + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPlugin + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPlugin + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthPlugin + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return ErrInvalidLengthPlugin + } + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPlugin + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapvalue |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthPlugin + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue < 0 { + return ErrInvalidLengthPlugin + } + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + } else { + iNdEx = entryPreIndex + skippy, err := skipPlugin(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthPlugin + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Map[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipPlugin(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthPlugin + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ParametersAnnouncementResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPlugin + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ParametersAnnouncementResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ParametersAnnouncementResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ParameterAnnouncements", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowPlugin + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthPlugin + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthPlugin + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ParameterAnnouncements = append(m.ParameterAnnouncements, &ParameterAnnouncement{}) + if err := m.ParameterAnnouncements[len(m.ParameterAnnouncements)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipPlugin(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthPlugin + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *File) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/cmpserver/plugin/plugin.go b/cmpserver/plugin/plugin.go index 717fea0250cd6..43f21860bbdac 100644 --- a/cmpserver/plugin/plugin.go +++ b/cmpserver/plugin/plugin.go @@ -294,3 +294,38 @@ func (s *Service) matchRepository(ctx context.Context, workdir string) (bool, er } return false, nil } + +func (s *Service) GetParametersAnnouncement(stream apiclient.ConfigManagementPluginService_GetParametersAnnouncementServer) error { + bufferedCtx, cancel := buffered_context.WithEarlierDeadline(stream.Context(), cmpTimeoutBuffer) + defer cancel() + + workDir, err := files.CreateTempDir(common.GetCMPWorkDir()) + if err != nil { + return fmt.Errorf("error creating parameters announcement workdir: %s", err) + } + defer func() { + if err := os.RemoveAll(workDir); err != nil { + // we panic here as the workDir may contain sensitive information + panic(fmt.Sprintf("error removing parameters announcement repository workdir: %s", err)) + } + }() + + _, err = cmp.ReceiveRepoStream(bufferedCtx, stream, workDir) + if err != nil { + return fmt.Errorf("parameters announcement error receiving stream: %s", err) + } + + repoResponse := &apiclient.ParametersAnnouncementResponse{ + ParameterAnnouncements: []*apiclient.ParameterAnnouncement{ + { + Name: "test", + }, + }, + } + + err = stream.SendAndClose(repoResponse) + if err != nil { + return fmt.Errorf("error sending parameters announcement response: %s", err) + } + return nil +} diff --git a/cmpserver/plugin/plugin.proto b/cmpserver/plugin/plugin.proto index ce4452d638eed..fb2c62f3c164b 100644 --- a/cmpserver/plugin/plugin.proto +++ b/cmpserver/plugin/plugin.proto @@ -44,6 +44,36 @@ message RepositoryResponse { bool isSupported = 1; } +message ParameterAnnouncement { + // name is the name identifying a parameter. + string name = 1; + // title is a human-readable text of the parameter name. + string title = 2; + // tooltip is a human-readable description of the parameter. + string tooltip = 3; + // required defines if this given parameter is mandatory. + bool required = 4; + // itemType determines the primitive data type represented by the parameter. Parameters are always encoded as + // strings, but this field lets them be interpreted as other primitive types. + string itemType = 5; + // collectionType is the type of value this parameter holds - either a single value (a string) or a collection + // (array or map). If collectionType is set, only the field with that type will be used. If collectionType is not + // set, `string` is the default. If collectionType is set to an invalid value, a validation error is thrown. + string collectionType = 6; + // string is the default value of the parameter if the parameter is a string. + string string = 7; + // array is the default value of the parameter if the parameter is an array. + repeated string array = 8; + // map is the default value of the parameter if the parameter is a map. + map map = 9; +} + +// ParametersAnnouncementResponse contains a list of announcements. This list represents all the parameters which a CMP +// is able to accept. +message ParametersAnnouncementResponse { + repeated ParameterAnnouncement parameterAnnouncements = 1; +} + message File { bytes chunk = 1; } @@ -58,4 +88,8 @@ service ConfigManagementPluginService { // MatchRepository returns whether or not the given application is supported by the plugin rpc MatchRepository(stream AppStreamRequest) returns (RepositoryResponse) { } + + // GetParametersAnnouncement gets a list of parameter announcements for the given app + rpc GetParametersAnnouncement(stream AppStreamRequest) returns (ParametersAnnouncementResponse) { + } } diff --git a/reposerver/apiclient/repository.pb.go b/reposerver/apiclient/repository.pb.go index 2c7b88846cdce..b1a3c39a6cb30 100644 --- a/reposerver/apiclient/repository.pb.go +++ b/reposerver/apiclient/repository.pb.go @@ -862,6 +862,7 @@ type RepoAppDetailsResponse struct { Helm *HelmAppSpec `protobuf:"bytes,3,opt,name=helm,proto3" json:"helm,omitempty"` Kustomize *KustomizeAppSpec `protobuf:"bytes,4,opt,name=kustomize,proto3" json:"kustomize,omitempty"` Directory *DirectoryAppSpec `protobuf:"bytes,5,opt,name=directory,proto3" json:"directory,omitempty"` + Plugin *PluginAppSpec `protobuf:"bytes,6,opt,name=plugin,proto3" json:"plugin,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -928,6 +929,13 @@ func (m *RepoAppDetailsResponse) GetDirectory() *DirectoryAppSpec { return nil } +func (m *RepoAppDetailsResponse) GetPlugin() *PluginAppSpec { + if m != nil { + return m.Plugin + } + return nil +} + type RepoServerRevisionMetadataRequest struct { // the repo Repo *v1alpha1.Repository `protobuf:"bytes,1,opt,name=repo,proto3" json:"repo,omitempty"` @@ -1166,6 +1174,177 @@ func (m *DirectoryAppSpec) XXX_DiscardUnknown() { var xxx_messageInfo_DirectoryAppSpec proto.InternalMessageInfo +type ParameterAnnouncement struct { + // name is the name identifying a parameter. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // title is a human-readable text of the parameter name. + Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"` + // tooltip is a human-readable description of the parameter. + Tooltip string `protobuf:"bytes,3,opt,name=tooltip,proto3" json:"tooltip,omitempty"` + // required defines if this given parameter is mandatory. + Required bool `protobuf:"varint,4,opt,name=required,proto3" json:"required,omitempty"` + // itemType determines the primitive data type represented by the parameter. Parameters are always encoded as + // strings, but this field lets them be interpreted as other primitive types. + ItemType string `protobuf:"bytes,5,opt,name=itemType,proto3" json:"itemType,omitempty"` + // collectionType is the type of value this parameter holds - either a single value (a string) or a collection + // (array or map). If collectionType is set, only the field with that type will be used. If collectionType is not + // set, `string` is the default. If collectionType is set to an invalid value, a validation error is thrown. + CollectionType string `protobuf:"bytes,6,opt,name=collectionType,proto3" json:"collectionType,omitempty"` + // string is the default value of the parameter if the parameter is a string. + String_ string `protobuf:"bytes,7,opt,name=string,proto3" json:"string,omitempty"` + // array is the default value of the parameter if the parameter is an array. + Array []string `protobuf:"bytes,8,rep,name=array,proto3" json:"array,omitempty"` + // map is the default value of the parameter if the parameter is a map. + Map map[string]string `protobuf:"bytes,9,rep,name=map,proto3" json:"map,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ParameterAnnouncement) Reset() { *m = ParameterAnnouncement{} } +func (m *ParameterAnnouncement) String() string { return proto.CompactTextString(m) } +func (*ParameterAnnouncement) ProtoMessage() {} +func (*ParameterAnnouncement) Descriptor() ([]byte, []int) { + return fileDescriptor_dd8723cfcc820480, []int{16} +} +func (m *ParameterAnnouncement) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ParameterAnnouncement) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ParameterAnnouncement.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ParameterAnnouncement) XXX_Merge(src proto.Message) { + xxx_messageInfo_ParameterAnnouncement.Merge(m, src) +} +func (m *ParameterAnnouncement) XXX_Size() int { + return m.Size() +} +func (m *ParameterAnnouncement) XXX_DiscardUnknown() { + xxx_messageInfo_ParameterAnnouncement.DiscardUnknown(m) +} + +var xxx_messageInfo_ParameterAnnouncement proto.InternalMessageInfo + +func (m *ParameterAnnouncement) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *ParameterAnnouncement) GetTitle() string { + if m != nil { + return m.Title + } + return "" +} + +func (m *ParameterAnnouncement) GetTooltip() string { + if m != nil { + return m.Tooltip + } + return "" +} + +func (m *ParameterAnnouncement) GetRequired() bool { + if m != nil { + return m.Required + } + return false +} + +func (m *ParameterAnnouncement) GetItemType() string { + if m != nil { + return m.ItemType + } + return "" +} + +func (m *ParameterAnnouncement) GetCollectionType() string { + if m != nil { + return m.CollectionType + } + return "" +} + +func (m *ParameterAnnouncement) GetString_() string { + if m != nil { + return m.String_ + } + return "" +} + +func (m *ParameterAnnouncement) GetArray() []string { + if m != nil { + return m.Array + } + return nil +} + +func (m *ParameterAnnouncement) GetMap() map[string]string { + if m != nil { + return m.Map + } + return nil +} + +// PluginAppSpec contains details about a plugin-type Application +type PluginAppSpec struct { + ParametersAnnouncement []*ParameterAnnouncement `protobuf:"bytes,1,rep,name=parametersAnnouncement,proto3" json:"parametersAnnouncement,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *PluginAppSpec) Reset() { *m = PluginAppSpec{} } +func (m *PluginAppSpec) String() string { return proto.CompactTextString(m) } +func (*PluginAppSpec) ProtoMessage() {} +func (*PluginAppSpec) Descriptor() ([]byte, []int) { + return fileDescriptor_dd8723cfcc820480, []int{17} +} +func (m *PluginAppSpec) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PluginAppSpec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PluginAppSpec.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *PluginAppSpec) XXX_Merge(src proto.Message) { + xxx_messageInfo_PluginAppSpec.Merge(m, src) +} +func (m *PluginAppSpec) XXX_Size() int { + return m.Size() +} +func (m *PluginAppSpec) XXX_DiscardUnknown() { + xxx_messageInfo_PluginAppSpec.DiscardUnknown(m) +} + +var xxx_messageInfo_PluginAppSpec proto.InternalMessageInfo + +func (m *PluginAppSpec) GetParametersAnnouncement() []*ParameterAnnouncement { + if m != nil { + return m.ParametersAnnouncement + } + return nil +} + type HelmChartsRequest struct { Repo *v1alpha1.Repository `protobuf:"bytes,1,opt,name=repo,proto3" json:"repo,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` @@ -1177,7 +1356,7 @@ func (m *HelmChartsRequest) Reset() { *m = HelmChartsRequest{} } func (m *HelmChartsRequest) String() string { return proto.CompactTextString(m) } func (*HelmChartsRequest) ProtoMessage() {} func (*HelmChartsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_dd8723cfcc820480, []int{16} + return fileDescriptor_dd8723cfcc820480, []int{18} } func (m *HelmChartsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1225,7 +1404,7 @@ func (m *HelmChart) Reset() { *m = HelmChart{} } func (m *HelmChart) String() string { return proto.CompactTextString(m) } func (*HelmChart) ProtoMessage() {} func (*HelmChart) Descriptor() ([]byte, []int) { - return fileDescriptor_dd8723cfcc820480, []int{17} + return fileDescriptor_dd8723cfcc820480, []int{19} } func (m *HelmChart) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1279,7 +1458,7 @@ func (m *HelmChartsResponse) Reset() { *m = HelmChartsResponse{} } func (m *HelmChartsResponse) String() string { return proto.CompactTextString(m) } func (*HelmChartsResponse) ProtoMessage() {} func (*HelmChartsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_dd8723cfcc820480, []int{18} + return fileDescriptor_dd8723cfcc820480, []int{20} } func (m *HelmChartsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1336,6 +1515,9 @@ func init() { proto.RegisterType((*HelmAppSpec)(nil), "repository.HelmAppSpec") proto.RegisterType((*KustomizeAppSpec)(nil), "repository.KustomizeAppSpec") proto.RegisterType((*DirectoryAppSpec)(nil), "repository.DirectoryAppSpec") + proto.RegisterType((*ParameterAnnouncement)(nil), "repository.ParameterAnnouncement") + proto.RegisterMapType((map[string]string)(nil), "repository.ParameterAnnouncement.MapEntry") + proto.RegisterType((*PluginAppSpec)(nil), "repository.PluginAppSpec") proto.RegisterType((*HelmChartsRequest)(nil), "repository.HelmChartsRequest") proto.RegisterType((*HelmChart)(nil), "repository.HelmChart") proto.RegisterType((*HelmChartsResponse)(nil), "repository.HelmChartsResponse") @@ -1346,96 +1528,106 @@ func init() { } var fileDescriptor_dd8723cfcc820480 = []byte{ - // 1419 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x58, 0xdd, 0x6f, 0x1b, 0xc5, - 0x16, 0xcf, 0xda, 0x8e, 0x63, 0x1f, 0xb7, 0x89, 0x33, 0xfd, 0xda, 0xeb, 0x9b, 0x46, 0xe9, 0x5e, - 0xdd, 0x2a, 0xba, 0xbd, 0xb5, 0xd5, 0x54, 0x02, 0xd4, 0x0a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0x1e, 0x96, 0x27, 0xd4, 0x0a, 0x51, 0x56, - 0xa1, 0x86, 0x1e, 0x4d, 0x6e, 0x55, 0xde, 0x53, 0xb4, 0x10, 0x2e, 0x3c, 0x96, 0xe1, 0xa6, 0x8f, - 0xe9, 0x34, 0x2a, 0xa3, 0x76, 0x1f, 0x2e, 0x16, 0xcd, 0xfa, 0xdc, 0x75, 0x7c, 0x24, 0x5d, 0x20, - 0x12, 0x7d, 0x0c, 0x87, 0xd9, 0xaa, 0xf4, 0xa2, 0xa1, 0x97, 0xac, 0x68, 0xdf, 0x56, 0xe0, 0xa2, - 0x8e, 0xbe, 0x6b, 0x4d, 0x30, 0x81, 0xc6, 0xe9, 0x14, 0xf7, 0xcf, 0xa1, 0x4a, 0x39, 0x97, 0x19, - 0x5d, 0xf8, 0x96, 0x73, 0xe5, 0x53, 0x17, 0x5a, 0xc9, 0xff, 0x61, 0x9d, 0xda, 0x03, 0x66, 0x86, - 0x6e, 0xe8, 0x27, 0x61, 0xc9, 0x3e, 0xd1, 0xd4, 0xe7, 0x17, 0x34, 0x03, 0x2e, 0xcd, 0xa5, 0x20, - 0x4e, 0x67, 0xbe, 0x05, 0x29, 0x85, 0x16, 0x54, 0x6a, 0xa4, 0x72, 0x92, 0x91, 0x9f, 0x15, 0x68, - 0x67, 0xaf, 0x23, 0x56, 0xbf, 0x01, 0x4d, 0x3b, 0x96, 0xf9, 0xaa, 0x22, 0x4b, 0x4c, 0x26, 0x98, - 0xed, 0x46, 0x95, 0x62, 0x37, 0xba, 0x08, 0xf5, 0x88, 0x0f, 0xc4, 0x81, 0xc5, 0xb3, 0x19, 0x97, - 0x6b, 0x05, 0x97, 0x37, 0x01, 0xfc, 0x14, 0xee, 0x6a, 0x5d, 0xae, 0xe6, 0x24, 0x44, 0x83, 0x33, - 0x51, 0xed, 0xd2, 0xd1, 0x0f, 0xad, 0x40, 0x5d, 0x91, 0x3b, 0x66, 0x64, 0x9a, 0x0b, 0x6b, 0x0f, - 0x99, 0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a5, 0x2e, 0xd6, 0xd1, 0x8a, 0xdb, 0xe6, 0xcb, 0xbd, 0xb6, 0x44, - 0xbe, 0x57, 0xe0, 0xdc, 0x1e, 0x06, 0xc5, 0x82, 0x49, 0xae, 0x97, 0x1b, 0x39, 0xa1, 0xb0, 0x76, - 0x1e, 0x2d, 0xfa, 0x22, 0x66, 0xd5, 0x6a, 0x4b, 0xe4, 0x50, 0x86, 0x9d, 0x21, 0x9b, 0x5c, 0x2e, - 0x85, 0x70, 0x9a, 0xbd, 0xcd, 0x93, 0x96, 0x93, 0x50, 0x3f, 0xec, 0xff, 0xf2, 0x7c, 0x53, 0xf9, - 0xf5, 0xf9, 0xa6, 0xf2, 0xfb, 0xf3, 0x4d, 0xe5, 0xb3, 0x9b, 0x2f, 0xf9, 0x79, 0x34, 0xf7, 0x8b, - 0x2b, 0xe5, 0xcc, 0xb0, 0x18, 0x3a, 0xc1, 0xa0, 0x2e, 0x7f, 0x0c, 0xbd, 0xf9, 0x57, 0x00, 0x00, - 0x00, 0xff, 0xff, 0x65, 0x04, 0x2b, 0x5c, 0x90, 0x15, 0x00, 0x00, + // 1584 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x58, 0xdd, 0x6e, 0x1b, 0xb7, + 0x12, 0xb6, 0x7e, 0x2c, 0x4b, 0xa3, 0xd8, 0x96, 0x99, 0xd8, 0xd9, 0xe8, 0x38, 0x86, 0xb3, 0x07, + 0x27, 0x30, 0x92, 0x93, 0x15, 0xec, 0x00, 0x39, 0x07, 0x49, 0x5b, 0x40, 0x75, 0x12, 0xa7, 0x48, + 0x1c, 0xbb, 0xeb, 0xa0, 0x40, 0xda, 0xa0, 0x05, 0xbd, 0xa2, 0x57, 0x8c, 0xf6, 0x87, 0xd9, 0xe5, + 0xaa, 0x50, 0x80, 0x5e, 0x14, 0xe8, 0x13, 0xf4, 0xa2, 0xaf, 0xd2, 0xcb,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x44, 0x46, 0x0a, 0x2c, 0x38, 0xee, 0x2e, 0x36, 0xfa, 0x44, 0xa9, 0x6c, 0x96, 0xb6, 0xea, + 0x7a, 0x2c, 0xa2, 0x4d, 0x68, 0x62, 0xc6, 0x1e, 0xe0, 0x63, 0x62, 0xdd, 0x27, 0x23, 0xa5, 0x2a, + 0x17, 0x66, 0x55, 0x62, 0x2d, 0x66, 0xec, 0x21, 0xb6, 0x89, 0x32, 0x2f, 0x47, 0x63, 0x11, 0xad, + 0x43, 0xc3, 0xc1, 0x36, 0xf1, 0x19, 0x36, 0x88, 0x52, 0x97, 0x63, 0xa9, 0x02, 0x7d, 0x03, 0x2b, + 0x99, 0xc0, 0x8f, 0xdc, 0xc0, 0x33, 0x88, 0x02, 0x72, 0xeb, 0x07, 0xb3, 0x6d, 0xbd, 0x9b, 0x37, + 0xab, 0x4f, 0x7a, 0x42, 0x5f, 0xc2, 0xbc, 0x3c, 0x5c, 0xa5, 0xb9, 0x59, 0x79, 0xab, 0xd9, 0x0e, + 0xcd, 0x22, 0x07, 0x16, 0x98, 0x15, 0x98, 0xd4, 0xf1, 0x95, 0x33, 0xd2, 0xc3, 0xa3, 0xd9, 0x3c, + 0xec, 0xba, 0xce, 0x09, 0x35, 0xf7, 0xb1, 0x83, 0x4d, 0x62, 0x13, 0x87, 0x1f, 0x4a, 0xe3, 0x7a, + 0xec, 0x04, 0x3d, 0x87, 0xd6, 0x20, 0xf0, 0xb9, 0x6b, 0xd3, 0xe7, 0xe4, 0x80, 0x89, 0xb5, 0xbe, + 0xb2, 0x28, 0xb3, 0xf9, 0x70, 0x36, 0xc7, 0xf7, 0x73, 0x56, 0xf5, 0x09, 0x3f, 0x02, 0x24, 0x83, + 0xe0, 0x98, 0x7c, 0x46, 0x3c, 0x89, 0xae, 0xa5, 0x10, 0x24, 0x19, 0x55, 0x08, 0x23, 0x1a, 0x49, + 0xbe, 0xb2, 0xbc, 0x59, 0x09, 0x61, 0x94, 0xa8, 0xd0, 0x16, 0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a3, 0xf4, 0xdb, 0x8b, 0x8d, 0xd2, 0x1f, 0x2f, 0x36, 0x4a, 0x9f, 0x5f, 0x7f, + 0xc5, 0xef, 0xe3, 0x99, 0x9f, 0xdc, 0x31, 0xa3, 0x86, 0x45, 0x89, 0xc3, 0x8f, 0x6b, 0xf2, 0xd7, + 0xf0, 0xeb, 0x7f, 0x07, 0x00, 0x00, 0xff, 0xff, 0x51, 0x03, 0x19, 0xb8, 0x91, 0x17, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -2631,6 +2823,18 @@ func (m *RepoAppDetailsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) i -= len(m.XXX_unrecognized) copy(dAtA[i:], m.XXX_unrecognized) } + if m.Plugin != nil { + { + size, err := m.Plugin.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRepository(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + } if m.Directory != nil { { size, err := m.Directory.MarshalToSizedBuffer(dAtA[:i]) @@ -2874,6 +3078,154 @@ func (m *DirectoryAppSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *ParameterAnnouncement) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ParameterAnnouncement) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ParameterAnnouncement) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.Map) > 0 { + for k := range m.Map { + v := m.Map[k] + baseI := i + i -= len(v) + copy(dAtA[i:], v) + i = encodeVarintRepository(dAtA, i, uint64(len(v))) + i-- + dAtA[i] = 0x12 + i -= len(k) + copy(dAtA[i:], k) + i = encodeVarintRepository(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = encodeVarintRepository(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x4a + } + } + if len(m.Array) > 0 { + for iNdEx := len(m.Array) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Array[iNdEx]) + copy(dAtA[i:], m.Array[iNdEx]) + i = encodeVarintRepository(dAtA, i, uint64(len(m.Array[iNdEx]))) + i-- + dAtA[i] = 0x42 + } + } + if len(m.String_) > 0 { + i -= len(m.String_) + copy(dAtA[i:], m.String_) + i = encodeVarintRepository(dAtA, i, uint64(len(m.String_))) + i-- + dAtA[i] = 0x3a + } + if len(m.CollectionType) > 0 { + i -= len(m.CollectionType) + copy(dAtA[i:], m.CollectionType) + i = encodeVarintRepository(dAtA, i, uint64(len(m.CollectionType))) + i-- + dAtA[i] = 0x32 + } + if len(m.ItemType) > 0 { + i -= len(m.ItemType) + copy(dAtA[i:], m.ItemType) + i = encodeVarintRepository(dAtA, i, uint64(len(m.ItemType))) + i-- + dAtA[i] = 0x2a + } + if m.Required { + i-- + if m.Required { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x20 + } + if len(m.Tooltip) > 0 { + i -= len(m.Tooltip) + copy(dAtA[i:], m.Tooltip) + i = encodeVarintRepository(dAtA, i, uint64(len(m.Tooltip))) + i-- + dAtA[i] = 0x1a + } + if len(m.Title) > 0 { + i -= len(m.Title) + copy(dAtA[i:], m.Title) + i = encodeVarintRepository(dAtA, i, uint64(len(m.Title))) + i-- + dAtA[i] = 0x12 + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintRepository(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *PluginAppSpec) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *PluginAppSpec) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PluginAppSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.ParametersAnnouncement) > 0 { + for iNdEx := len(m.ParametersAnnouncement) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.ParametersAnnouncement[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintRepository(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + func (m *HelmChartsRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -3380,6 +3732,10 @@ func (m *RepoAppDetailsResponse) Size() (n int) { l = m.Directory.Size() n += 1 + l + sovRepository(uint64(l)) } + if m.Plugin != nil { + l = m.Plugin.Size() + n += 1 + l + sovRepository(uint64(l)) + } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) } @@ -3477,34 +3833,105 @@ func (m *DirectoryAppSpec) Size() (n int) { return n } -func (m *HelmChartsRequest) Size() (n int) { +func (m *ParameterAnnouncement) Size() (n int) { if m == nil { return 0 } var l int _ = l - if m.Repo != nil { - l = m.Repo.Size() + l = len(m.Name) + if l > 0 { n += 1 + l + sovRepository(uint64(l)) } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) + l = len(m.Title) + if l > 0 { + n += 1 + l + sovRepository(uint64(l)) } - return n -} - -func (m *HelmChart) Size() (n int) { - if m == nil { - return 0 + l = len(m.Tooltip) + if l > 0 { + n += 1 + l + sovRepository(uint64(l)) } - var l int - _ = l - l = len(m.Name) + if m.Required { + n += 2 + } + l = len(m.ItemType) if l > 0 { n += 1 + l + sovRepository(uint64(l)) } - if len(m.Versions) > 0 { - for _, s := range m.Versions { + l = len(m.CollectionType) + if l > 0 { + n += 1 + l + sovRepository(uint64(l)) + } + l = len(m.String_) + if l > 0 { + n += 1 + l + sovRepository(uint64(l)) + } + if len(m.Array) > 0 { + for _, s := range m.Array { + l = len(s) + n += 1 + l + sovRepository(uint64(l)) + } + } + if len(m.Map) > 0 { + for k, v := range m.Map { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovRepository(uint64(len(k))) + 1 + len(v) + sovRepository(uint64(len(v))) + n += mapEntrySize + 1 + sovRepository(uint64(mapEntrySize)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *PluginAppSpec) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.ParametersAnnouncement) > 0 { + for _, e := range m.ParametersAnnouncement { + l = e.Size() + n += 1 + l + sovRepository(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *HelmChartsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Repo != nil { + l = m.Repo.Size() + n += 1 + l + sovRepository(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *HelmChart) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovRepository(uint64(l)) + } + if len(m.Versions) > 0 { + for _, s := range m.Versions { l = len(s) n += 1 + l + sovRepository(uint64(l)) } @@ -6137,6 +6564,42 @@ func (m *RepoAppDetailsResponse) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Plugin", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRepository + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRepository + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRepository + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Plugin == nil { + m.Plugin = &PluginAppSpec{} + } + if err := m.Plugin.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipRepository(dAtA[iNdEx:]) @@ -6647,6 +7110,513 @@ func (m *DirectoryAppSpec) Unmarshal(dAtA []byte) error { } return nil } +func (m *ParameterAnnouncement) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRepository + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ParameterAnnouncement: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ParameterAnnouncement: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRepository + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRepository + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRepository + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Title", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRepository + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRepository + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRepository + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Title = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Tooltip", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRepository + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRepository + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRepository + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Tooltip = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Required", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRepository + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Required = bool(v != 0) + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ItemType", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRepository + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRepository + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRepository + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ItemType = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CollectionType", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRepository + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRepository + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRepository + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CollectionType = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field String_", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRepository + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRepository + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRepository + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.String_ = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Array", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRepository + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthRepository + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthRepository + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Array = append(m.Array, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Map", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRepository + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRepository + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRepository + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Map == nil { + m.Map = make(map[string]string) + } + var mapkey string + var mapvalue string + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRepository + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRepository + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthRepository + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return ErrInvalidLengthRepository + } + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRepository + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapvalue |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthRepository + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue < 0 { + return ErrInvalidLengthRepository + } + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + } else { + iNdEx = entryPreIndex + skippy, err := skipRepository(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthRepository + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Map[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipRepository(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthRepository + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PluginAppSpec) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRepository + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PluginAppSpec: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PluginAppSpec: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ParametersAnnouncement", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowRepository + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthRepository + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthRepository + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ParametersAnnouncement = append(m.ParametersAnnouncement, &ParameterAnnouncement{}) + if err := m.ParametersAnnouncement[len(m.ParametersAnnouncement)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipRepository(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthRepository + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *HelmChartsRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/reposerver/repository/repository.go b/reposerver/repository/repository.go index ed10c43dfc2e5..deb42eb46c317 100644 --- a/reposerver/repository/repository.go +++ b/reposerver/repository/repository.go @@ -1375,6 +1375,10 @@ func (s *Service) GetAppDetails(ctx context.Context, q *apiclient.RepoServerAppD if err := populateKustomizeAppDetails(res, q, opContext.appPath, commitSHA, s.gitCredsStore); err != nil { return err } + case v1alpha1.ApplicationSourceTypePlugin: + if err := populatePluginAppDetails(ctx, res, opContext.appPath, repoRoot); err != nil { + return fmt.Errorf("failed to populate plugin app details: %w", err) + } } _ = s.cache.SetAppDetails(revision, q.Source, res, v1alpha1.TrackingMethod(q.TrackingMethod)) return nil @@ -1523,6 +1527,52 @@ func populateKustomizeAppDetails(res *apiclient.RepoAppDetailsResponse, q *apicl return nil } +func populatePluginAppDetails(ctx context.Context, res *apiclient.RepoAppDetailsResponse, appPath string, repoPath string) error { + res.Plugin = &apiclient.PluginAppSpec{} + + // detect config management plugin server (sidecar) + conn, cmpClient, err := discovery.DetectConfigManagementPlugin(ctx, appPath) + if err != nil { + return fmt.Errorf("failed to detect CMP for app: %w", err) + } + defer io.Close(conn) + + generateManifestStream, err := cmpClient.GetParametersAnnouncement(ctx, grpc_retry.Disable()) + if err != nil { + return fmt.Errorf("error getting generateManifestStream: %s", err) + } + // TODO: send actual env vars. + err = cmp.SendRepoStream(generateManifestStream.Context(), appPath, repoPath, generateManifestStream, []string{}) + if err != nil { + return fmt.Errorf("error sending file to cmp-server: %s", err) + } + + announcement, err := generateManifestStream.CloseAndRecv() + if err != nil { + return fmt.Errorf("failed to get parameter anouncement: %w", err) + } + + // TODO: share types so conversion is unnecessary. + var announcementConverted []*apiclient.ParameterAnnouncement + for _, pluginAnnouncement := range announcement.ParameterAnnouncements { + announcementConverted = append(announcementConverted, &apiclient.ParameterAnnouncement{ + Name: pluginAnnouncement.Name, + Title: pluginAnnouncement.Title, + Tooltip: pluginAnnouncement.Tooltip, + Required: pluginAnnouncement.Required, + ItemType: pluginAnnouncement.ItemType, + CollectionType: pluginAnnouncement.CollectionType, + String_: pluginAnnouncement.String_, + Array: pluginAnnouncement.Array, + Map: pluginAnnouncement.Map, + }) + } + res.Plugin = &apiclient.PluginAppSpec{ + ParametersAnnouncement: announcementConverted, + } + return nil +} + func (s *Service) GetRevisionMetadata(ctx context.Context, q *apiclient.RepoServerRevisionMetadataRequest) (*v1alpha1.RevisionMetadata, error) { if !(git.IsCommitSHA(q.Revision) || git.IsTruncatedCommitSHA(q.Revision)) { return nil, fmt.Errorf("revision %s must be resolved", q.Revision) diff --git a/reposerver/repository/repository.proto b/reposerver/repository/repository.proto index 9714226e30021..e81792e20a295 100644 --- a/reposerver/repository/repository.proto +++ b/reposerver/repository/repository.proto @@ -108,6 +108,7 @@ message RepoAppDetailsResponse { HelmAppSpec helm = 3; KustomizeAppSpec kustomize = 4; DirectoryAppSpec directory = 5; + PluginAppSpec plugin = 6; } message RepoServerRevisionMetadataRequest { @@ -141,6 +142,35 @@ message KustomizeAppSpec { message DirectoryAppSpec { } +message ParameterAnnouncement { + // name is the name identifying a parameter. + string name = 1; + // title is a human-readable text of the parameter name. + string title = 2; + // tooltip is a human-readable description of the parameter. + string tooltip = 3; + // required defines if this given parameter is mandatory. + bool required = 4; + // itemType determines the primitive data type represented by the parameter. Parameters are always encoded as + // strings, but this field lets them be interpreted as other primitive types. + string itemType = 5; + // collectionType is the type of value this parameter holds - either a single value (a string) or a collection + // (array or map). If collectionType is set, only the field with that type will be used. If collectionType is not + // set, `string` is the default. If collectionType is set to an invalid value, a validation error is thrown. + string collectionType = 6; + // string is the default value of the parameter if the parameter is a string. + string string = 7; + // array is the default value of the parameter if the parameter is an array. + repeated string array = 8; + // map is the default value of the parameter if the parameter is a map. + map map = 9; +} + +// PluginAppSpec contains details about a plugin-type Application +message PluginAppSpec { + repeated ParameterAnnouncement parametersAnnouncement = 1; +} + message HelmChartsRequest { jackfan.us.kg.argoproj.argo_cd.v2.pkg.apis.application.v1alpha1.Repository repo = 1;