diff --git a/apiserver/pkg/util/cluster.go b/apiserver/pkg/util/cluster.go index e1679ea569..d8d6716578 100644 --- a/apiserver/pkg/util/cluster.go +++ b/apiserver/pkg/util/cluster.go @@ -418,6 +418,7 @@ func constructRayImage(containerImage string, version string) string { func buildWorkerPodTemplate(imageVersion string, envs *api.EnvironmentVariables, spec *api.WorkerGroupSpec, computeRuntime *api.ComputeTemplate) (*corev1.PodTemplateSpec, error) { // If user doesn't provide the image, let's use the default image instead. // TODO: verify the versions in the range + fmt.Println(spec) image := constructRayImage(RayClusterDefaultImageRepository, imageVersion) if len(spec.Image) != 0 { image = spec.Image @@ -441,6 +442,30 @@ func buildWorkerPodTemplate(imageVersion string, envs *api.EnvironmentVariables, return nil, err } + // Build init containers + var initContainers []corev1.Container + for _, initContainerSpec := range spec.InitContainers { + // Map WorkerGroupSpec.InitContainer to corev1.Container + initContainer := corev1.Container{ + Name: initContainerSpec.Name, + Image: initContainerSpec.Image, + ImagePullPolicy: corev1.PullIfNotPresent, // Default to IfNotPresent + + // Add volumes + VolumeMounts: buildVolumeMounts(initContainerSpec.Volumes), + + // Add environment variables, if present + Env: convertEnvironmentVariables(initContainerSpec.Environment), + } + + // Set image pull policy if explicitly given + if len(initContainerSpec.ImagePullPolicy) > 0 && strings.ToLower(initContainerSpec.ImagePullPolicy) == "always" { + initContainer.ImagePullPolicy = corev1.PullAlways + } + + initContainers = append(initContainers, initContainer) + } + podTemplateSpec := corev1.PodTemplateSpec{ ObjectMeta: metav1.ObjectMeta{ Annotations: buildNodeGroupAnnotations(computeRuntime, spec.Image), @@ -543,7 +568,8 @@ func buildWorkerPodTemplate(imageVersion string, envs *api.EnvironmentVariables, SecurityContext: buildSecurityContext(spec.SecurityContext), }, }, - Volumes: vols, + InitContainers: initContainers, + Volumes: vols, }, } diff --git a/apiserver/test/cluster/cluster/cluster b/apiserver/test/cluster/cluster/cluster index efa533abde..ca238306cf 100644 --- a/apiserver/test/cluster/cluster/cluster +++ b/apiserver/test/cluster/cluster/cluster @@ -42,6 +42,32 @@ curl -X POST 'localhost:8888/apis/v1/namespaces/default/clusters' \ "source": "ray-job-code-sample", "items": {"sample_code.py" : "sample_code.py"} } + ], + "initContainers": [ + { + "name": "init-container-demo", + "image": "busybox", + "volumes": [ + { + "mountPath": "/data", + "volumeType": "PERSISTENT_VOLUME_CLAIM", + "name": "init-data-volume", + "source": "data-pvc", + "readOnly": false, + "accessMode": "RWO", + "hostPathType": "DIRECTORY", + "storageClassName": "standard", + "storage": "1Gi" + } + ], + "environment": { + "values": { + "INIT_JOB_TYPE": "worker", + "INIT_COMMAND": "echo Initializing worker node; sleep 5", + } + }, + "imagePullPolicy": "IfNotPresent" + } ] } ] diff --git a/apiserver/test/e2e/cluster_server_e2e_test.go b/apiserver/test/e2e/cluster_server_e2e_test.go index 6949865814..40e113d453 100644 --- a/apiserver/test/e2e/cluster_server_e2e_test.go +++ b/apiserver/test/e2e/cluster_server_e2e_test.go @@ -426,6 +426,62 @@ func TestCreateClusterEndpoint(t *testing.T) { HTTPStatusCode: http.StatusBadRequest, }, }, + { + Name: "Create cluster with init container in worker group", + Input: &api.CreateClusterRequest{ + Cluster: &api.Cluster{ + Name: tCtx.GetNextName(), + Namespace: tCtx.GetNamespaceName(), + User: "boris", + Version: tCtx.GetRayVersion(), + Environment: api.Cluster_DEV, + ClusterSpec: &api.ClusterSpec{ + HeadGroupSpec: &api.HeadGroupSpec{ + ComputeTemplate: tCtx.GetComputeTemplateName(), + Image: tCtx.GetRayImage(), + ServiceType: "NodePort", + RayStartParams: map[string]string{ + "dashboard-host": "0.0.0.0", + "metrics-export-port": "8080", + }, + }, + WorkerGroupSpec: []*api.WorkerGroupSpec{ + { + GroupName: "small-wg", + ComputeTemplate: tCtx.GetComputeTemplateName(), + Image: tCtx.GetRayImage(), + Replicas: 1, + MinReplicas: 1, + MaxReplicas: 5, + InitContainers: []*api.InitContainer{ + { + Name: "init-container-demo", + Image: "busybox", + Volumes: []*api.Volume{ + { + MountPath: "/data", + VolumeType: api.Volume_PERSISTENT_VOLUME_CLAIM, + Name: "init-data-volume", + Source: "data-pvc", + ReadOnly: false, + }, + }, + Environment: &api.EnvironmentVariables{ + Values: map[string]string{ + "INIT_TASK_TYPE": "worker", + "INIT_COMMAND": "echo Initializing worker node; sleep 5", + }, + }, + }, + }, + }, + }, + }, + }, + Namespace: tCtx.GetNamespaceName(), + }, + ExpectedError: nil, + }, } // Execute tests sequentially for _, tc := range tests { diff --git a/proto/cluster.proto b/proto/cluster.proto index fba86a5fd6..0ba00cd64f 100644 --- a/proto/cluster.proto +++ b/proto/cluster.proto @@ -352,6 +352,21 @@ message WorkerGroupSpec { string imagePullPolicy = 14; // Optional. Configure the security context for the worker container for debugging etc. SecurityContext security_context = 15; + // Optional. init container specs + repeated InitContainer init_containers = 16; +} + +message InitContainer { + // Required. Group name of the current worker group + string name = 1 [(google.api.field_behavior) = REQUIRED]; + // Required. This field will be used to retrieve right init container + string image = 2 [(google.api.field_behavior) = REQUIRED]; + // Optional. The volumes mount to init container + repeated Volume volumes = 3; + // Optional. Environment variables for init container + EnvironmentVariables environment = 5; + // Optional image pull policy We only support Always and ifNotPresent + string imagePullPolicy = 6; } message ClusterEvent { diff --git a/proto/go_client/cluster.pb.go b/proto/go_client/cluster.pb.go index acce2b2f7c..6fa0d29391 100644 --- a/proto/go_client/cluster.pb.go +++ b/proto/go_client/cluster.pb.go @@ -1596,6 +1596,8 @@ type WorkerGroupSpec struct { ImagePullPolicy string `protobuf:"bytes,14,opt,name=imagePullPolicy,proto3" json:"imagePullPolicy,omitempty"` // Optional. Configure the security context for the worker container for debugging etc. SecurityContext *SecurityContext `protobuf:"bytes,15,opt,name=security_context,json=securityContext,proto3" json:"security_context,omitempty"` + // Optional. init container specs + InitContainers []*InitContainer `protobuf:"bytes,16,rep,name=init_containers,json=initContainers,proto3" json:"init_containers,omitempty"` } func (x *WorkerGroupSpec) Reset() { @@ -1735,6 +1737,97 @@ func (x *WorkerGroupSpec) GetSecurityContext() *SecurityContext { return nil } +func (x *WorkerGroupSpec) GetInitContainers() []*InitContainer { + if x != nil { + return x.InitContainers + } + return nil +} + +type InitContainer struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required. Group name of the current worker group + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // Required. This field will be used to retrieve right init container + Image string `protobuf:"bytes,2,opt,name=image,proto3" json:"image,omitempty"` + // Optional. The volumes mount to init container + Volumes []*Volume `protobuf:"bytes,3,rep,name=volumes,proto3" json:"volumes,omitempty"` + // Optional. Environment variables for init container + Environment *EnvironmentVariables `protobuf:"bytes,5,opt,name=environment,proto3" json:"environment,omitempty"` + // Optional image pull policy We only support Always and ifNotPresent + ImagePullPolicy string `protobuf:"bytes,6,opt,name=imagePullPolicy,proto3" json:"imagePullPolicy,omitempty"` +} + +func (x *InitContainer) Reset() { + *x = InitContainer{} + if protoimpl.UnsafeEnabled { + mi := &file_cluster_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *InitContainer) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*InitContainer) ProtoMessage() {} + +func (x *InitContainer) ProtoReflect() protoreflect.Message { + mi := &file_cluster_proto_msgTypes[17] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use InitContainer.ProtoReflect.Descriptor instead. +func (*InitContainer) Descriptor() ([]byte, []int) { + return file_cluster_proto_rawDescGZIP(), []int{17} +} + +func (x *InitContainer) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *InitContainer) GetImage() string { + if x != nil { + return x.Image + } + return "" +} + +func (x *InitContainer) GetVolumes() []*Volume { + if x != nil { + return x.Volumes + } + return nil +} + +func (x *InitContainer) GetEnvironment() *EnvironmentVariables { + if x != nil { + return x.Environment + } + return nil +} + +func (x *InitContainer) GetImagePullPolicy() string { + if x != nil { + return x.ImagePullPolicy + } + return "" +} + type ClusterEvent struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1763,7 +1856,7 @@ type ClusterEvent struct { func (x *ClusterEvent) Reset() { *x = ClusterEvent{} if protoimpl.UnsafeEnabled { - mi := &file_cluster_proto_msgTypes[17] + mi := &file_cluster_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1776,7 +1869,7 @@ func (x *ClusterEvent) String() string { func (*ClusterEvent) ProtoMessage() {} func (x *ClusterEvent) ProtoReflect() protoreflect.Message { - mi := &file_cluster_proto_msgTypes[17] + mi := &file_cluster_proto_msgTypes[18] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1789,7 +1882,7 @@ func (x *ClusterEvent) ProtoReflect() protoreflect.Message { // Deprecated: Use ClusterEvent.ProtoReflect.Descriptor instead. func (*ClusterEvent) Descriptor() ([]byte, []int) { - return file_cluster_proto_rawDescGZIP(), []int{17} + return file_cluster_proto_rawDescGZIP(), []int{18} } func (x *ClusterEvent) GetId() string { @@ -2140,7 +2233,7 @@ var file_cluster_proto_rawDesc = []byte{ 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xb1, 0x07, 0x0a, 0x0f, 0x57, 0x6f, 0x72, 0x6b, 0x65, + 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xf0, 0x07, 0x0a, 0x0f, 0x57, 0x6f, 0x72, 0x6b, 0x65, 0x72, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x53, 0x70, 0x65, 0x63, 0x12, 0x22, 0x0a, 0x0a, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x09, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2e, @@ -2187,84 +2280,102 @@ var file_cluster_proto_rawDesc = []byte{ 0x75, 0x72, 0x69, 0x74, 0x79, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x0f, 0x73, 0x65, 0x63, - 0x75, 0x72, 0x69, 0x74, 0x79, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x1a, 0x41, 0x0a, 0x13, - 0x52, 0x61, 0x79, 0x53, 0x74, 0x61, 0x72, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, - 0x3e, 0x0a, 0x10, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, - 0x39, 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, - 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, - 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xd1, 0x02, 0x0a, 0x0c, 0x43, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, - 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, - 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x43, 0x0a, 0x0f, 0x66, 0x69, - 0x72, 0x73, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, - 0x0e, 0x66, 0x69, 0x72, 0x73, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, - 0x41, 0x0a, 0x0e, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, - 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, - 0x61, 0x6d, 0x70, 0x52, 0x0d, 0x6c, 0x61, 0x73, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x08, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x32, 0xe0, - 0x04, 0x0a, 0x0e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x12, 0x77, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x12, 0x1b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x0e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x22, - 0x39, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x33, 0x22, 0x28, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, + 0x75, 0x72, 0x69, 0x74, 0x79, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x3d, 0x0a, 0x0f, + 0x69, 0x6e, 0x69, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x73, 0x18, + 0x10, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x49, 0x6e, + 0x69, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x52, 0x0e, 0x69, 0x6e, 0x69, + 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x73, 0x1a, 0x41, 0x0a, 0x13, 0x52, + 0x61, 0x79, 0x53, 0x74, 0x61, 0x72, 0x74, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3e, + 0x0a, 0x10, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x39, + 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, + 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, + 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xd5, 0x01, 0x0a, 0x0d, 0x49, 0x6e, + 0x69, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x12, 0x17, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x12, + 0x27, 0x0a, 0x07, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x0d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x52, + 0x07, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x73, 0x12, 0x3d, 0x0a, 0x0b, 0x65, 0x6e, 0x76, 0x69, + 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, + 0x74, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x52, 0x0b, 0x65, 0x6e, 0x76, 0x69, + 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x28, 0x0a, 0x0f, 0x69, 0x6d, 0x61, 0x67, 0x65, + 0x50, 0x75, 0x6c, 0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x50, 0x75, 0x6c, 0x6c, 0x50, 0x6f, 0x6c, 0x69, 0x63, + 0x79, 0x22, 0xd1, 0x02, 0x0a, 0x0c, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x45, 0x76, 0x65, + 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, + 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x64, 0x5f, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, + 0x74, 0x12, 0x43, 0x0a, 0x0f, 0x66, 0x69, 0x72, 0x73, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, + 0x74, 0x61, 0x6d, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0e, 0x66, 0x69, 0x72, 0x73, 0x74, 0x54, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x41, 0x0a, 0x0e, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x74, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0d, 0x6c, 0x61, 0x73, 0x74, + 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x61, + 0x73, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, + 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x07, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, + 0x79, 0x70, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, + 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x32, 0xe0, 0x04, 0x0a, 0x0e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x77, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x1b, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x43, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x22, 0x39, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x33, 0x22, 0x28, + 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, + 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x3a, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x12, 0x6f, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, + 0x18, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, + 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x22, 0x37, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x31, 0x12, 0x2f, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x6e, 0x61, 0x6d, 0x65, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x7d, 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, + 0x65, 0x7d, 0x12, 0x78, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x12, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, + 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x30, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x2a, 0x12, 0x28, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x6e, 0x61, 0x6d, + 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x7d, 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x12, 0x6b, 0x0a, 0x0f, + 0x4c, 0x69, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x12, + 0x1d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x43, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x43, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x19, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x12, 0x11, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, + 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x12, 0x7d, 0x0a, 0x0d, 0x44, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x1b, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, + 0x37, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x31, 0x2a, 0x2f, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x73, 0x3a, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x6f, 0x0a, 0x0a, 0x47, 0x65, - 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x18, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x43, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x22, 0x37, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x31, 0x12, 0x2f, 0x2f, 0x61, 0x70, 0x69, - 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2f, - 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x63, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x73, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x12, 0x78, 0x0a, 0x0b, 0x4c, - 0x69, 0x73, 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x1a, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4c, - 0x69, 0x73, 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x30, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2a, 0x12, 0x28, 0x2f, 0x61, 0x70, - 0x69, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, - 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x63, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x73, 0x12, 0x6b, 0x0a, 0x0f, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x6c, 0x6c, - 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x12, 0x1d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, - 0x4c, 0x69, 0x73, 0x74, 0x41, 0x6c, 0x6c, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x19, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x12, - 0x11, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, - 0x72, 0x73, 0x12, 0x7d, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x12, 0x1b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x44, 0x65, 0x6c, 0x65, - 0x74, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x37, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x31, - 0x2a, 0x2f, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x6e, 0x61, 0x6d, 0x65, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x7d, 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, - 0x7d, 0x42, 0x54, 0x5a, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x72, 0x61, 0x79, 0x2d, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x6b, 0x75, 0x62, 0x65, - 0x72, 0x61, 0x79, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x5f, 0x63, 0x6c, 0x69, - 0x65, 0x6e, 0x74, 0x92, 0x41, 0x21, 0x2a, 0x01, 0x01, 0x52, 0x1c, 0x0a, 0x07, 0x64, 0x65, 0x66, - 0x61, 0x75, 0x6c, 0x74, 0x12, 0x11, 0x12, 0x0f, 0x0a, 0x0d, 0x1a, 0x0b, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x73, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x42, 0x54, 0x5a, 0x2e, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x72, 0x61, 0x79, 0x2d, 0x70, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x2f, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x61, 0x79, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2f, 0x67, 0x6f, 0x5f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x92, 0x41, 0x21, 0x2a, 0x01, 0x01, + 0x52, 0x1c, 0x0a, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x11, 0x12, 0x0f, 0x0a, + 0x0d, 0x1a, 0x0b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -2280,7 +2391,7 @@ func file_cluster_proto_rawDescGZIP() []byte { } var file_cluster_proto_enumTypes = make([]protoimpl.EnumInfo, 6) -var file_cluster_proto_msgTypes = make([]protoimpl.MessageInfo, 29) +var file_cluster_proto_msgTypes = make([]protoimpl.MessageInfo, 30) var file_cluster_proto_goTypes = []interface{}{ (EnvValueFrom_Source)(0), // 0: proto.EnvValueFrom.Source (Cluster_Environment)(0), // 1: proto.Cluster.Environment @@ -2305,38 +2416,39 @@ var file_cluster_proto_goTypes = []interface{}{ (*SecurityContext)(nil), // 20: proto.SecurityContext (*HeadGroupSpec)(nil), // 21: proto.HeadGroupSpec (*WorkerGroupSpec)(nil), // 22: proto.WorkerGroupSpec - (*ClusterEvent)(nil), // 23: proto.ClusterEvent - nil, // 24: proto.EnvironmentVariables.ValuesEntry - nil, // 25: proto.EnvironmentVariables.ValuesFromEntry - nil, // 26: proto.Cluster.AnnotationsEntry - nil, // 27: proto.Cluster.ServiceEndpointEntry - nil, // 28: proto.Volume.ItemsEntry - nil, // 29: proto.HeadGroupSpec.RayStartParamsEntry - nil, // 30: proto.HeadGroupSpec.AnnotationsEntry - nil, // 31: proto.HeadGroupSpec.LabelsEntry - nil, // 32: proto.WorkerGroupSpec.RayStartParamsEntry - nil, // 33: proto.WorkerGroupSpec.AnnotationsEntry - nil, // 34: proto.WorkerGroupSpec.LabelsEntry - (*timestamppb.Timestamp)(nil), // 35: google.protobuf.Timestamp - (*emptypb.Empty)(nil), // 36: google.protobuf.Empty + (*InitContainer)(nil), // 23: proto.InitContainer + (*ClusterEvent)(nil), // 24: proto.ClusterEvent + nil, // 25: proto.EnvironmentVariables.ValuesEntry + nil, // 26: proto.EnvironmentVariables.ValuesFromEntry + nil, // 27: proto.Cluster.AnnotationsEntry + nil, // 28: proto.Cluster.ServiceEndpointEntry + nil, // 29: proto.Volume.ItemsEntry + nil, // 30: proto.HeadGroupSpec.RayStartParamsEntry + nil, // 31: proto.HeadGroupSpec.AnnotationsEntry + nil, // 32: proto.HeadGroupSpec.LabelsEntry + nil, // 33: proto.WorkerGroupSpec.RayStartParamsEntry + nil, // 34: proto.WorkerGroupSpec.AnnotationsEntry + nil, // 35: proto.WorkerGroupSpec.LabelsEntry + (*timestamppb.Timestamp)(nil), // 36: google.protobuf.Timestamp + (*emptypb.Empty)(nil), // 37: google.protobuf.Empty } var file_cluster_proto_depIdxs = []int32{ 16, // 0: proto.CreateClusterRequest.cluster:type_name -> proto.Cluster 16, // 1: proto.ListClustersResponse.clusters:type_name -> proto.Cluster 16, // 2: proto.ListAllClustersResponse.clusters:type_name -> proto.Cluster 0, // 3: proto.EnvValueFrom.source:type_name -> proto.EnvValueFrom.Source - 24, // 4: proto.EnvironmentVariables.values:type_name -> proto.EnvironmentVariables.ValuesEntry - 25, // 5: proto.EnvironmentVariables.valuesFrom:type_name -> proto.EnvironmentVariables.ValuesFromEntry + 25, // 4: proto.EnvironmentVariables.values:type_name -> proto.EnvironmentVariables.ValuesEntry + 26, // 5: proto.EnvironmentVariables.valuesFrom:type_name -> proto.EnvironmentVariables.ValuesFromEntry 14, // 6: proto.AutoscalerOptions.envs:type_name -> proto.EnvironmentVariables 18, // 7: proto.AutoscalerOptions.volumes:type_name -> proto.Volume 1, // 8: proto.Cluster.environment:type_name -> proto.Cluster.Environment 17, // 9: proto.Cluster.cluster_spec:type_name -> proto.ClusterSpec - 26, // 10: proto.Cluster.annotations:type_name -> proto.Cluster.AnnotationsEntry + 27, // 10: proto.Cluster.annotations:type_name -> proto.Cluster.AnnotationsEntry 14, // 11: proto.Cluster.envs:type_name -> proto.EnvironmentVariables - 35, // 12: proto.Cluster.created_at:type_name -> google.protobuf.Timestamp - 35, // 13: proto.Cluster.deleted_at:type_name -> google.protobuf.Timestamp - 23, // 14: proto.Cluster.events:type_name -> proto.ClusterEvent - 27, // 15: proto.Cluster.service_endpoint:type_name -> proto.Cluster.ServiceEndpointEntry + 36, // 12: proto.Cluster.created_at:type_name -> google.protobuf.Timestamp + 36, // 13: proto.Cluster.deleted_at:type_name -> google.protobuf.Timestamp + 24, // 14: proto.Cluster.events:type_name -> proto.ClusterEvent + 28, // 15: proto.Cluster.service_endpoint:type_name -> proto.Cluster.ServiceEndpointEntry 21, // 16: proto.ClusterSpec.head_group_spec:type_name -> proto.HeadGroupSpec 22, // 17: proto.ClusterSpec.worker_group_spec:type_name -> proto.WorkerGroupSpec 15, // 18: proto.ClusterSpec.autoscalerOptions:type_name -> proto.AutoscalerOptions @@ -2344,39 +2456,42 @@ var file_cluster_proto_depIdxs = []int32{ 3, // 20: proto.Volume.host_path_type:type_name -> proto.Volume.HostPathType 4, // 21: proto.Volume.mount_propagation_mode:type_name -> proto.Volume.MountPropagationMode 5, // 22: proto.Volume.accessMode:type_name -> proto.Volume.AccessMode - 28, // 23: proto.Volume.items:type_name -> proto.Volume.ItemsEntry + 29, // 23: proto.Volume.items:type_name -> proto.Volume.ItemsEntry 19, // 24: proto.SecurityContext.capabilities:type_name -> proto.Capabilities - 29, // 25: proto.HeadGroupSpec.ray_start_params:type_name -> proto.HeadGroupSpec.RayStartParamsEntry + 30, // 25: proto.HeadGroupSpec.ray_start_params:type_name -> proto.HeadGroupSpec.RayStartParamsEntry 18, // 26: proto.HeadGroupSpec.volumes:type_name -> proto.Volume 14, // 27: proto.HeadGroupSpec.environment:type_name -> proto.EnvironmentVariables - 30, // 28: proto.HeadGroupSpec.annotations:type_name -> proto.HeadGroupSpec.AnnotationsEntry - 31, // 29: proto.HeadGroupSpec.labels:type_name -> proto.HeadGroupSpec.LabelsEntry + 31, // 28: proto.HeadGroupSpec.annotations:type_name -> proto.HeadGroupSpec.AnnotationsEntry + 32, // 29: proto.HeadGroupSpec.labels:type_name -> proto.HeadGroupSpec.LabelsEntry 20, // 30: proto.HeadGroupSpec.security_context:type_name -> proto.SecurityContext - 32, // 31: proto.WorkerGroupSpec.ray_start_params:type_name -> proto.WorkerGroupSpec.RayStartParamsEntry + 33, // 31: proto.WorkerGroupSpec.ray_start_params:type_name -> proto.WorkerGroupSpec.RayStartParamsEntry 18, // 32: proto.WorkerGroupSpec.volumes:type_name -> proto.Volume 14, // 33: proto.WorkerGroupSpec.environment:type_name -> proto.EnvironmentVariables - 33, // 34: proto.WorkerGroupSpec.annotations:type_name -> proto.WorkerGroupSpec.AnnotationsEntry - 34, // 35: proto.WorkerGroupSpec.labels:type_name -> proto.WorkerGroupSpec.LabelsEntry + 34, // 34: proto.WorkerGroupSpec.annotations:type_name -> proto.WorkerGroupSpec.AnnotationsEntry + 35, // 35: proto.WorkerGroupSpec.labels:type_name -> proto.WorkerGroupSpec.LabelsEntry 20, // 36: proto.WorkerGroupSpec.security_context:type_name -> proto.SecurityContext - 35, // 37: proto.ClusterEvent.created_at:type_name -> google.protobuf.Timestamp - 35, // 38: proto.ClusterEvent.first_timestamp:type_name -> google.protobuf.Timestamp - 35, // 39: proto.ClusterEvent.last_timestamp:type_name -> google.protobuf.Timestamp - 13, // 40: proto.EnvironmentVariables.ValuesFromEntry.value:type_name -> proto.EnvValueFrom - 6, // 41: proto.ClusterService.CreateCluster:input_type -> proto.CreateClusterRequest - 7, // 42: proto.ClusterService.GetCluster:input_type -> proto.GetClusterRequest - 8, // 43: proto.ClusterService.ListCluster:input_type -> proto.ListClustersRequest - 10, // 44: proto.ClusterService.ListAllClusters:input_type -> proto.ListAllClustersRequest - 12, // 45: proto.ClusterService.DeleteCluster:input_type -> proto.DeleteClusterRequest - 16, // 46: proto.ClusterService.CreateCluster:output_type -> proto.Cluster - 16, // 47: proto.ClusterService.GetCluster:output_type -> proto.Cluster - 9, // 48: proto.ClusterService.ListCluster:output_type -> proto.ListClustersResponse - 11, // 49: proto.ClusterService.ListAllClusters:output_type -> proto.ListAllClustersResponse - 36, // 50: proto.ClusterService.DeleteCluster:output_type -> google.protobuf.Empty - 46, // [46:51] is the sub-list for method output_type - 41, // [41:46] is the sub-list for method input_type - 41, // [41:41] is the sub-list for extension type_name - 41, // [41:41] is the sub-list for extension extendee - 0, // [0:41] is the sub-list for field type_name + 23, // 37: proto.WorkerGroupSpec.init_containers:type_name -> proto.InitContainer + 18, // 38: proto.InitContainer.volumes:type_name -> proto.Volume + 14, // 39: proto.InitContainer.environment:type_name -> proto.EnvironmentVariables + 36, // 40: proto.ClusterEvent.created_at:type_name -> google.protobuf.Timestamp + 36, // 41: proto.ClusterEvent.first_timestamp:type_name -> google.protobuf.Timestamp + 36, // 42: proto.ClusterEvent.last_timestamp:type_name -> google.protobuf.Timestamp + 13, // 43: proto.EnvironmentVariables.ValuesFromEntry.value:type_name -> proto.EnvValueFrom + 6, // 44: proto.ClusterService.CreateCluster:input_type -> proto.CreateClusterRequest + 7, // 45: proto.ClusterService.GetCluster:input_type -> proto.GetClusterRequest + 8, // 46: proto.ClusterService.ListCluster:input_type -> proto.ListClustersRequest + 10, // 47: proto.ClusterService.ListAllClusters:input_type -> proto.ListAllClustersRequest + 12, // 48: proto.ClusterService.DeleteCluster:input_type -> proto.DeleteClusterRequest + 16, // 49: proto.ClusterService.CreateCluster:output_type -> proto.Cluster + 16, // 50: proto.ClusterService.GetCluster:output_type -> proto.Cluster + 9, // 51: proto.ClusterService.ListCluster:output_type -> proto.ListClustersResponse + 11, // 52: proto.ClusterService.ListAllClusters:output_type -> proto.ListAllClustersResponse + 37, // 53: proto.ClusterService.DeleteCluster:output_type -> google.protobuf.Empty + 49, // [49:54] is the sub-list for method output_type + 44, // [44:49] is the sub-list for method input_type + 44, // [44:44] is the sub-list for extension type_name + 44, // [44:44] is the sub-list for extension extendee + 0, // [0:44] is the sub-list for field type_name } func init() { file_cluster_proto_init() } @@ -2590,6 +2705,18 @@ func file_cluster_proto_init() { } } file_cluster_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InitContainer); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_cluster_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ClusterEvent); i { case 0: return &v.state @@ -2609,7 +2736,7 @@ func file_cluster_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_cluster_proto_rawDesc, NumEnums: 6, - NumMessages: 29, + NumMessages: 30, NumExtensions: 0, NumServices: 1, }, diff --git a/proto/go_client/cluster.pb.gw.go b/proto/go_client/cluster.pb.gw.go index 4e33eb4c2c..162911c909 100644 --- a/proto/go_client/cluster.pb.gw.go +++ b/proto/go_client/cluster.pb.gw.go @@ -440,7 +440,7 @@ func RegisterClusterServiceHandlerServer(ctx context.Context, mux *runtime.Serve // RegisterClusterServiceHandlerFromEndpoint is same as RegisterClusterServiceHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterClusterServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.NewClient(endpoint, opts...) + conn, err := grpc.Dial(endpoint, opts...) if err != nil { return err } diff --git a/proto/go_client/config.pb.gw.go b/proto/go_client/config.pb.gw.go index c57ef2828d..27ce40ff93 100644 --- a/proto/go_client/config.pb.gw.go +++ b/proto/go_client/config.pb.gw.go @@ -789,7 +789,7 @@ func RegisterImageTemplateServiceHandlerServer(ctx context.Context, mux *runtime // RegisterComputeTemplateServiceHandlerFromEndpoint is same as RegisterComputeTemplateServiceHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterComputeTemplateServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.NewClient(endpoint, opts...) + conn, err := grpc.Dial(endpoint, opts...) if err != nil { return err } @@ -954,7 +954,7 @@ var ( // RegisterImageTemplateServiceHandlerFromEndpoint is same as RegisterImageTemplateServiceHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterImageTemplateServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.NewClient(endpoint, opts...) + conn, err := grpc.Dial(endpoint, opts...) if err != nil { return err } diff --git a/proto/go_client/job.pb.gw.go b/proto/go_client/job.pb.gw.go index 5cd31a6d38..7a90b31de8 100644 --- a/proto/go_client/job.pb.gw.go +++ b/proto/go_client/job.pb.gw.go @@ -440,7 +440,7 @@ func RegisterRayJobServiceHandlerServer(ctx context.Context, mux *runtime.ServeM // RegisterRayJobServiceHandlerFromEndpoint is same as RegisterRayJobServiceHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterRayJobServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.NewClient(endpoint, opts...) + conn, err := grpc.Dial(endpoint, opts...) if err != nil { return err } diff --git a/proto/go_client/job_submission.pb.gw.go b/proto/go_client/job_submission.pb.gw.go index 4235d66139..eafd5e65d1 100644 --- a/proto/go_client/job_submission.pb.gw.go +++ b/proto/go_client/job_submission.pb.gw.go @@ -709,7 +709,7 @@ func RegisterRayJobSubmissionServiceHandlerServer(ctx context.Context, mux *runt // RegisterRayJobSubmissionServiceHandlerFromEndpoint is same as RegisterRayJobSubmissionServiceHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterRayJobSubmissionServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.NewClient(endpoint, opts...) + conn, err := grpc.Dial(endpoint, opts...) if err != nil { return err } diff --git a/proto/go_client/serve.pb.gw.go b/proto/go_client/serve.pb.gw.go index 90d9c72286..e6a734eab2 100644 --- a/proto/go_client/serve.pb.gw.go +++ b/proto/go_client/serve.pb.gw.go @@ -587,7 +587,7 @@ func RegisterRayServeServiceHandlerServer(ctx context.Context, mux *runtime.Serv // RegisterRayServeServiceHandlerFromEndpoint is same as RegisterRayServeServiceHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterRayServeServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.NewClient(endpoint, opts...) + conn, err := grpc.Dial(endpoint, opts...) if err != nil { return err } diff --git a/proto/kuberay_api.swagger.json b/proto/kuberay_api.swagger.json index 0bcf0027ef..9e6326423b 100644 --- a/proto/kuberay_api.swagger.json +++ b/proto/kuberay_api.swagger.json @@ -1343,6 +1343,44 @@ "rayStartParams" ] }, + "protoInitContainer": { + "type": "object", + "properties": { + "name": { + "type": "string", + "title": "Required. Group name of the current worker group", + "required": [ + "name" + ] + }, + "image": { + "type": "string", + "title": "Required. This field will be used to retrieve right init container", + "required": [ + "image" + ] + }, + "volumes": { + "type": "array", + "items": { + "$ref": "#/definitions/protoVolume" + }, + "title": "Optional. The volumes mount to init container" + }, + "environment": { + "$ref": "#/definitions/protoEnvironmentVariables", + "title": "Optional. Environment variables for init container" + }, + "imagePullPolicy": { + "type": "string", + "title": "Optional image pull policy We only support Always and ifNotPresent" + } + }, + "required": [ + "name", + "image" + ] + }, "protoListAllClustersResponse": { "type": "object", "properties": { @@ -1517,6 +1555,13 @@ "securityContext": { "$ref": "#/definitions/protoSecurityContext", "description": "Optional. Configure the security context for the worker container for debugging etc." + }, + "initContainers": { + "type": "array", + "items": { + "$ref": "#/definitions/protoInitContainer" + }, + "title": "Optional. init container specs" } }, "required": [ diff --git a/proto/swagger/cluster.swagger.json b/proto/swagger/cluster.swagger.json index ae82c51caa..c55abdbf26 100644 --- a/proto/swagger/cluster.swagger.json +++ b/proto/swagger/cluster.swagger.json @@ -601,6 +601,44 @@ "rayStartParams" ] }, + "protoInitContainer": { + "type": "object", + "properties": { + "name": { + "type": "string", + "title": "Required. Group name of the current worker group", + "required": [ + "name" + ] + }, + "image": { + "type": "string", + "title": "Required. This field will be used to retrieve right init container", + "required": [ + "image" + ] + }, + "volumes": { + "type": "array", + "items": { + "$ref": "#/definitions/protoVolume" + }, + "title": "Optional. The volumes mount to init container" + }, + "environment": { + "$ref": "#/definitions/protoEnvironmentVariables", + "title": "Optional. Environment variables for init container" + }, + "imagePullPolicy": { + "type": "string", + "title": "Optional image pull policy We only support Always and ifNotPresent" + } + }, + "required": [ + "name", + "image" + ] + }, "protoListAllClustersResponse": { "type": "object", "properties": { @@ -775,6 +813,13 @@ "securityContext": { "$ref": "#/definitions/protoSecurityContext", "description": "Optional. Configure the security context for the worker container for debugging etc." + }, + "initContainers": { + "type": "array", + "items": { + "$ref": "#/definitions/protoInitContainer" + }, + "title": "Optional. init container specs" } }, "required": [ diff --git a/proto/swagger/job.swagger.json b/proto/swagger/job.swagger.json index 809305ea46..838aba0749 100644 --- a/proto/swagger/job.swagger.json +++ b/proto/swagger/job.swagger.json @@ -459,6 +459,44 @@ "rayStartParams" ] }, + "protoInitContainer": { + "type": "object", + "properties": { + "name": { + "type": "string", + "title": "Required. Group name of the current worker group", + "required": [ + "name" + ] + }, + "image": { + "type": "string", + "title": "Required. This field will be used to retrieve right init container", + "required": [ + "image" + ] + }, + "volumes": { + "type": "array", + "items": { + "$ref": "#/definitions/protoVolume" + }, + "title": "Optional. The volumes mount to init container" + }, + "environment": { + "$ref": "#/definitions/protoEnvironmentVariables", + "title": "Optional. Environment variables for init container" + }, + "imagePullPolicy": { + "type": "string", + "title": "Optional image pull policy We only support Always and ifNotPresent" + } + }, + "required": [ + "name", + "image" + ] + }, "protoListAllRayJobsResponse": { "type": "object", "properties": { @@ -799,6 +837,13 @@ "securityContext": { "$ref": "#/definitions/protoSecurityContext", "description": "Optional. Configure the security context for the worker container for debugging etc." + }, + "initContainers": { + "type": "array", + "items": { + "$ref": "#/definitions/protoInitContainer" + }, + "title": "Optional. init container specs" } }, "required": [ diff --git a/proto/swagger/serve.swagger.json b/proto/swagger/serve.swagger.json index 7249c85946..49da95cdf9 100644 --- a/proto/swagger/serve.swagger.json +++ b/proto/swagger/serve.swagger.json @@ -537,6 +537,44 @@ "rayStartParams" ] }, + "protoInitContainer": { + "type": "object", + "properties": { + "name": { + "type": "string", + "title": "Required. Group name of the current worker group", + "required": [ + "name" + ] + }, + "image": { + "type": "string", + "title": "Required. This field will be used to retrieve right init container", + "required": [ + "image" + ] + }, + "volumes": { + "type": "array", + "items": { + "$ref": "#/definitions/protoVolume" + }, + "title": "Optional. The volumes mount to init container" + }, + "environment": { + "$ref": "#/definitions/protoEnvironmentVariables", + "title": "Optional. Environment variables for init container" + }, + "imagePullPolicy": { + "type": "string", + "title": "Optional image pull policy We only support Always and ifNotPresent" + } + }, + "required": [ + "name", + "image" + ] + }, "protoListAllRayServicesResponse": { "type": "object", "properties": { @@ -941,6 +979,13 @@ "securityContext": { "$ref": "#/definitions/protoSecurityContext", "description": "Optional. Configure the security context for the worker container for debugging etc." + }, + "initContainers": { + "type": "array", + "items": { + "$ref": "#/definitions/protoInitContainer" + }, + "title": "Optional. init container specs" } }, "required": [