diff --git a/pkg/modules/proto/module.pb.go b/pkg/modules/proto/module.pb.go index 90c40d02..249f4932 100644 --- a/pkg/modules/proto/module.pb.go +++ b/pkg/modules/proto/module.pb.go @@ -28,10 +28,11 @@ type GeneratorRequest struct { Project string `protobuf:"bytes,1,opt,name=project,proto3" json:"project,omitempty"` // Project represents the project name Stack string `protobuf:"bytes,2,opt,name=stack,proto3" json:"stack,omitempty"` // Stack represents the stack name - App string `protobuf:"bytes,3,opt,name=app,proto3" json:"app,omitempty"` // App represents the application name - DevModuleConfig []byte `protobuf:"bytes,4,opt,name=dev_module_config,json=devModuleConfig,proto3" json:"dev_module_config,omitempty"` // DevModuleConfig is the developer inputs of the module type - PlatformModuleConfig []byte `protobuf:"bytes,5,opt,name=platform_module_config,json=platformModuleConfig,proto3" json:"platform_module_config,omitempty"` // PlatformModuleConfig is the module inputs of the specific module type - RuntimeConfig []byte `protobuf:"bytes,6,opt,name=runtime_config,json=runtimeConfig,proto3" json:"runtime_config,omitempty"` // RuntimeConfig is the runtime configurations defined in the workspace config + App string `protobuf:"bytes,3,opt,name=app,proto3" json:"app,omitempty"` // App represents the application name, which is typically the same as the namespace of Kubernetes resources + Workload []byte `protobuf:"bytes,4,opt,name=workload,proto3" json:"workload,omitempty"` // Workload represents the workload configuration + DevModuleConfig []byte `protobuf:"bytes,5,opt,name=dev_module_config,json=devModuleConfig,proto3" json:"dev_module_config,omitempty"` // DevModuleConfig is the developer's inputs of this module + PlatformModuleConfig []byte `protobuf:"bytes,6,opt,name=platform_module_config,json=platformModuleConfig,proto3" json:"platform_module_config,omitempty"` // PlatformModuleConfig is the platform engineer's inputs of this module + RuntimeConfig []byte `protobuf:"bytes,7,opt,name=runtime_config,json=runtimeConfig,proto3" json:"runtime_config,omitempty"` // RuntimeConfig is the runtime configurations defined in the workspace config } func (x *GeneratorRequest) Reset() { @@ -87,6 +88,13 @@ func (x *GeneratorRequest) GetApp() string { return "" } +func (x *GeneratorRequest) GetWorkload() []byte { + if x != nil { + return x.Workload + } + return nil +} + func (x *GeneratorRequest) GetDevModuleConfig() []byte { if x != nil { return x.DevModuleConfig @@ -159,30 +167,31 @@ func (x *GeneratorResponse) GetResources() [][]byte { var File_module_proto protoreflect.FileDescriptor var file_module_proto_rawDesc = []byte{ - 0x0a, 0x0c, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xdd, + 0x0a, 0x0c, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf9, 0x01, 0x0a, 0x10, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x70, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x03, 0x61, 0x70, 0x70, 0x12, 0x2a, 0x0a, 0x11, 0x64, 0x65, 0x76, 0x5f, 0x6d, 0x6f, 0x64, - 0x75, 0x6c, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, - 0x52, 0x0f, 0x64, 0x65, 0x76, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x12, 0x34, 0x0a, 0x16, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x5f, 0x6d, 0x6f, - 0x64, 0x75, 0x6c, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x0c, 0x52, 0x14, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x4d, 0x6f, 0x64, 0x75, 0x6c, - 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x25, 0x0a, 0x0e, 0x72, 0x75, 0x6e, 0x74, 0x69, - 0x6d, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, - 0x0d, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x31, - 0x0a, 0x11, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x73, 0x32, 0x3b, 0x0a, 0x06, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x12, 0x31, 0x0a, 0x08, 0x47, - 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x12, 0x11, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, - 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x47, 0x65, 0x6e, - 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x0a, - 0x5a, 0x08, 0x2e, 0x2e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x52, 0x03, 0x61, 0x70, 0x70, 0x12, 0x1a, 0x0a, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, + 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, + 0x64, 0x12, 0x2a, 0x0a, 0x11, 0x64, 0x65, 0x76, 0x5f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5f, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0f, 0x64, 0x65, + 0x76, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x34, 0x0a, + 0x16, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x5f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, + 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x14, 0x70, + 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x12, 0x25, 0x0a, 0x0e, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0d, 0x72, 0x75, 0x6e, + 0x74, 0x69, 0x6d, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x31, 0x0a, 0x11, 0x47, 0x65, + 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0c, 0x52, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x32, 0x3b, 0x0a, + 0x06, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x12, 0x31, 0x0a, 0x08, 0x47, 0x65, 0x6e, 0x65, 0x72, + 0x61, 0x74, 0x65, 0x12, 0x11, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, + 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x0a, 0x5a, 0x08, 0x2e, 0x2e, + 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/modules/proto/module.proto b/pkg/modules/proto/module.proto index 61d4e4ee..328dd78a 100644 --- a/pkg/modules/proto/module.proto +++ b/pkg/modules/proto/module.proto @@ -6,9 +6,10 @@ message GeneratorRequest { string project = 1; // Project represents the project name string stack = 2; // Stack represents the stack name string app = 3; // App represents the application name, which is typically the same as the namespace of Kubernetes resources - bytes dev_module_config = 4; // DevModuleConfig is the developer inputs of the module type - bytes platform_module_config = 5; // PlatformModuleConfig is the module inputs of the specific module type - bytes runtime_config = 6; // RuntimeConfig is the runtime configurations defined in the workspace config + bytes workload = 4; // Workload represents the workload configuration + bytes dev_module_config = 5; // DevModuleConfig is the developer's inputs of this module + bytes platform_module_config = 6; // PlatformModuleConfig is the platform engineer's inputs of this module + bytes runtime_config = 7; // RuntimeConfig is the runtime configurations defined in the workspace config } // GeneratorResponse represents the generate result of the generator