From 5844b833f4eb1104110cd856d13f45d42d7828a6 Mon Sep 17 00:00:00 2001 From: Marco Nenciarini Date: Tue, 20 Aug 2024 14:08:17 +0200 Subject: [PATCH] chore: rename SetClusterStatus to SetStatusInCluster Signed-off-by: Marco Nenciarini --- .wordlist.txt | 6 +- docs/docs.md | 16 +-- pkg/operator/operator.pb.go | 175 ++++++++++++++++--------------- pkg/operator/operator_grpc.pb.go | 34 +++--- proto/operator.proto | 14 +-- 5 files changed, 123 insertions(+), 122 deletions(-) diff --git a/.wordlist.txt b/.wordlist.txt index b7751ce..edf9020 100644 --- a/.wordlist.txt +++ b/.wordlist.txt @@ -65,9 +65,9 @@ RPC rpc RPCs ScheduledBackup -SetClusterStatus -SetClusterStatusRequest -SetClusterStatusResponse +SetStatusInCluster +SetStatusInClusterRequest +SetStatusInClusterResponse SetFirstRequired SetFirstRequiredRequest SetFirstRequiredResult diff --git a/docs/docs.md b/docs/docs.md index 31c2ddb..e2c9140 100644 --- a/docs/docs.md +++ b/docs/docs.md @@ -45,8 +45,8 @@ - [OperatorValidateClusterChangeResult](#cnpgi-operator-v1-OperatorValidateClusterChangeResult) - [OperatorValidateClusterCreateRequest](#cnpgi-operator-v1-OperatorValidateClusterCreateRequest) - [OperatorValidateClusterCreateResult](#cnpgi-operator-v1-OperatorValidateClusterCreateResult) - - [SetClusterStatusRequest](#cnpgi-operator-v1-SetClusterStatusRequest) - - [SetClusterStatusResponse](#cnpgi-operator-v1-SetClusterStatusResponse) + - [SetStatusInClusterRequest](#cnpgi-operator-v1-SetStatusInClusterRequest) + - [SetStatusInClusterResponse](#cnpgi-operator-v1-SetStatusInClusterResponse) - [ValidationError](#cnpgi-operator-v1-ValidationError) - [OperatorCapability.RPC.Type](#cnpgi-operator-v1-OperatorCapability-RPC-Type) @@ -625,9 +625,9 @@ Intentionally empty. - + -### SetClusterStatusRequest +### SetStatusInClusterRequest @@ -640,9 +640,9 @@ Intentionally empty. - + -### SetClusterStatusResponse +### SetStatusInClusterResponse @@ -685,7 +685,7 @@ Intentionally empty. | TYPE_VALIDATE_CLUSTER_CREATE | 1 | TYPE_VALIDATE_CLUSTER_CREATE indicates that the Plugin is able to reply to the ValidateClusterCreate RPC request | | TYPE_VALIDATE_CLUSTER_CHANGE | 2 | TYPE_VALIDATE_CLUSTER_CHANGE indicates that the Plugin is able to reply to the ValidateClusterChange RPC request | | TYPE_MUTATE_CLUSTER | 3 | TYPE_MUTATE_CLUSTER indicates that the Plugin is able to reply to the MutateCluster RPC request | -| TYPE_SET_CLUSTER_STATUS | 5 | TYPE_SET_CLUSTER_STATUS indicates that the Plugin is able to set cluster status | +| TYPE_SET_STATUS_IN_CLUSTER | 5 | TYPE_SET_STATUS_IN_CLUSTER indicates that the Plugin is able to reply to the SetStatusInCluster RPC request | | TYPE_DEREGISTER | 6 | TYPE_DEREGISTER indicates that the Plugin is able to execute the cleanup logic once it is removed from the cluster definition | @@ -705,7 +705,7 @@ Intentionally empty. | ValidateClusterCreate | [OperatorValidateClusterCreateRequest](#cnpgi-operator-v1-OperatorValidateClusterCreateRequest) | [OperatorValidateClusterCreateResult](#cnpgi-operator-v1-OperatorValidateClusterCreateResult) | ValidateCreate improves the behavior of the validating webhook that is called on creation of the Cluster resources | | ValidateClusterChange | [OperatorValidateClusterChangeRequest](#cnpgi-operator-v1-OperatorValidateClusterChangeRequest) | [OperatorValidateClusterChangeResult](#cnpgi-operator-v1-OperatorValidateClusterChangeResult) | ValidateClusterChange improves the behavior of the validating webhook of is called on updates of the Cluster resources | | MutateCluster | [OperatorMutateClusterRequest](#cnpgi-operator-v1-OperatorMutateClusterRequest) | [OperatorMutateClusterResult](#cnpgi-operator-v1-OperatorMutateClusterResult) | MutateCluster fills in the defaults inside a Cluster resource | -| SetClusterStatus | [SetClusterStatusRequest](#cnpgi-operator-v1-SetClusterStatusRequest) | [SetClusterStatusResponse](#cnpgi-operator-v1-SetClusterStatusResponse) | SetClusterStatus is invoked at the end of the reconciliation loop and it is used to set the plugin status inside the .status.plugins[pluginName] map key | +| SetStatusInCluster | [SetStatusInClusterRequest](#cnpgi-operator-v1-SetStatusInClusterRequest) | [SetStatusInClusterResponse](#cnpgi-operator-v1-SetStatusInClusterResponse) | SetStatusInCluster is invoked at the end of the reconciliation loop and it is used to set the plugin status inside the .status.plugins[pluginName] map key | | Deregister | [DeregisterRequest](#cnpgi-operator-v1-DeregisterRequest) | [DeregisterResponse](#cnpgi-operator-v1-DeregisterResponse) | Deregister is invoked when the plugin is removed from the cluster definition. It is expected that the plugin executes its cleanup logic when this method is invoked. | diff --git a/pkg/operator/operator.pb.go b/pkg/operator/operator.pb.go index 1ee99d4..824c2f2 100644 --- a/pkg/operator/operator.pb.go +++ b/pkg/operator/operator.pb.go @@ -33,9 +33,9 @@ const ( // TYPE_MUTATE_CLUSTER indicates that the Plugin is able to // reply to the MutateCluster RPC request OperatorCapability_RPC_TYPE_MUTATE_CLUSTER OperatorCapability_RPC_Type = 3 - // TYPE_SET_CLUSTER_STATUS indicates that the Plugin is able to - // set cluster status - OperatorCapability_RPC_TYPE_SET_CLUSTER_STATUS OperatorCapability_RPC_Type = 5 + // TYPE_SET_STATUS_IN_CLUSTER indicates that the Plugin is able to + // reply to the SetStatusInCluster RPC request + OperatorCapability_RPC_TYPE_SET_STATUS_IN_CLUSTER OperatorCapability_RPC_Type = 5 // TYPE_DEREGISTER indicates that the Plugin is able to execute the cleanup logic once it is removed from // the cluster definition OperatorCapability_RPC_TYPE_DEREGISTER OperatorCapability_RPC_Type = 6 @@ -48,7 +48,7 @@ var ( 1: "TYPE_VALIDATE_CLUSTER_CREATE", 2: "TYPE_VALIDATE_CLUSTER_CHANGE", 3: "TYPE_MUTATE_CLUSTER", - 5: "TYPE_SET_CLUSTER_STATUS", + 5: "TYPE_SET_STATUS_IN_CLUSTER", 6: "TYPE_DEREGISTER", } OperatorCapability_RPC_Type_value = map[string]int32{ @@ -56,7 +56,7 @@ var ( "TYPE_VALIDATE_CLUSTER_CREATE": 1, "TYPE_VALIDATE_CLUSTER_CHANGE": 2, "TYPE_MUTATE_CLUSTER": 3, - "TYPE_SET_CLUSTER_STATUS": 5, + "TYPE_SET_STATUS_IN_CLUSTER": 5, "TYPE_DEREGISTER": 6, } ) @@ -703,7 +703,7 @@ type OperatorCapability_Rpc struct { func (*OperatorCapability_Rpc) isOperatorCapability_Type() {} -type SetClusterStatusRequest struct { +type SetStatusInClusterRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -713,8 +713,8 @@ type SetClusterStatusRequest struct { Cluster []byte `protobuf:"bytes,1,opt,name=cluster,proto3" json:"cluster,omitempty"` } -func (x *SetClusterStatusRequest) Reset() { - *x = SetClusterStatusRequest{} +func (x *SetStatusInClusterRequest) Reset() { + *x = SetStatusInClusterRequest{} if protoimpl.UnsafeEnabled { mi := &file_proto_operator_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -722,13 +722,13 @@ func (x *SetClusterStatusRequest) Reset() { } } -func (x *SetClusterStatusRequest) String() string { +func (x *SetStatusInClusterRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*SetClusterStatusRequest) ProtoMessage() {} +func (*SetStatusInClusterRequest) ProtoMessage() {} -func (x *SetClusterStatusRequest) ProtoReflect() protoreflect.Message { +func (x *SetStatusInClusterRequest) ProtoReflect() protoreflect.Message { mi := &file_proto_operator_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -740,19 +740,19 @@ func (x *SetClusterStatusRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use SetClusterStatusRequest.ProtoReflect.Descriptor instead. -func (*SetClusterStatusRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use SetStatusInClusterRequest.ProtoReflect.Descriptor instead. +func (*SetStatusInClusterRequest) Descriptor() ([]byte, []int) { return file_proto_operator_proto_rawDescGZIP(), []int{12} } -func (x *SetClusterStatusRequest) GetCluster() []byte { +func (x *SetStatusInClusterRequest) GetCluster() []byte { if x != nil { return x.Cluster } return nil } -type SetClusterStatusResponse struct { +type SetStatusInClusterResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -762,8 +762,8 @@ type SetClusterStatusResponse struct { JsonStatus []byte `protobuf:"bytes,1,opt,name=json_status,json=jsonStatus,proto3" json:"json_status,omitempty"` } -func (x *SetClusterStatusResponse) Reset() { - *x = SetClusterStatusResponse{} +func (x *SetStatusInClusterResponse) Reset() { + *x = SetStatusInClusterResponse{} if protoimpl.UnsafeEnabled { mi := &file_proto_operator_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -771,13 +771,13 @@ func (x *SetClusterStatusResponse) Reset() { } } -func (x *SetClusterStatusResponse) String() string { +func (x *SetStatusInClusterResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*SetClusterStatusResponse) ProtoMessage() {} +func (*SetStatusInClusterResponse) ProtoMessage() {} -func (x *SetClusterStatusResponse) ProtoReflect() protoreflect.Message { +func (x *SetStatusInClusterResponse) ProtoReflect() protoreflect.Message { mi := &file_proto_operator_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -789,12 +789,12 @@ func (x *SetClusterStatusResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use SetClusterStatusResponse.ProtoReflect.Descriptor instead. -func (*SetClusterStatusResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use SetStatusInClusterResponse.ProtoReflect.Descriptor instead. +func (*SetStatusInClusterResponse) Descriptor() ([]byte, []int) { return file_proto_operator_proto_rawDescGZIP(), []int{13} } -func (x *SetClusterStatusResponse) GetJsonStatus() []byte { +func (x *SetStatusInClusterResponse) GetJsonStatus() []byte { if x != nil { return x.JsonStatus } @@ -907,17 +907,17 @@ var file_proto_operator_proto_rawDesc = []byte{ 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0xd5, 0x02, 0x0a, 0x12, 0x4f, 0x70, 0x65, + 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0xd8, 0x02, 0x0a, 0x12, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x3d, 0x0a, 0x03, 0x72, 0x70, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x63, 0x6e, 0x70, 0x67, 0x69, 0x2e, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, - 0x69, 0x74, 0x79, 0x2e, 0x52, 0x50, 0x43, 0x48, 0x00, 0x52, 0x03, 0x72, 0x70, 0x63, 0x1a, 0xf7, + 0x69, 0x74, 0x79, 0x2e, 0x52, 0x50, 0x43, 0x48, 0x00, 0x52, 0x03, 0x72, 0x70, 0x63, 0x1a, 0xfa, 0x01, 0x0a, 0x03, 0x52, 0x50, 0x43, 0x12, 0x42, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2e, 0x2e, 0x63, 0x6e, 0x70, 0x67, 0x69, 0x2e, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x2e, 0x52, 0x50, 0x43, 0x2e, - 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0xab, 0x01, 0x0a, 0x04, 0x54, + 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0xae, 0x01, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x20, 0x0a, 0x1c, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x41, 0x54, 0x45, 0x5f, 0x43, 0x4c, 0x55, 0x53, 0x54, @@ -925,67 +925,68 @@ var file_proto_operator_proto_rawDesc = []byte{ 0x59, 0x50, 0x45, 0x5f, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x41, 0x54, 0x45, 0x5f, 0x43, 0x4c, 0x55, 0x53, 0x54, 0x45, 0x52, 0x5f, 0x43, 0x48, 0x41, 0x4e, 0x47, 0x45, 0x10, 0x02, 0x12, 0x17, 0x0a, 0x13, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x55, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x43, 0x4c, 0x55, - 0x53, 0x54, 0x45, 0x52, 0x10, 0x03, 0x12, 0x1b, 0x0a, 0x17, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, - 0x45, 0x54, 0x5f, 0x43, 0x4c, 0x55, 0x53, 0x54, 0x45, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, - 0x53, 0x10, 0x05, 0x12, 0x13, 0x0a, 0x0f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x44, 0x45, 0x52, 0x45, - 0x47, 0x49, 0x53, 0x54, 0x45, 0x52, 0x10, 0x06, 0x42, 0x06, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, - 0x22, 0x33, 0x0a, 0x17, 0x53, 0x65, 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x63, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x63, 0x6c, - 0x75, 0x73, 0x74, 0x65, 0x72, 0x22, 0x3b, 0x0a, 0x18, 0x53, 0x65, 0x74, 0x43, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x6a, 0x73, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x32, 0xd8, 0x05, 0x0a, 0x08, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x12, - 0x72, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, - 0x65, 0x73, 0x12, 0x2e, 0x2e, 0x63, 0x6e, 0x70, 0x67, 0x69, 0x2e, 0x6f, 0x70, 0x65, 0x72, 0x61, - 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x43, - 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x63, 0x6e, 0x70, 0x67, 0x69, 0x2e, 0x6f, 0x70, 0x65, 0x72, 0x61, - 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x43, - 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x75, 0x6c, - 0x74, 0x22, 0x00, 0x12, 0x8a, 0x01, 0x0a, 0x15, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, - 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x37, 0x2e, + 0x53, 0x54, 0x45, 0x52, 0x10, 0x03, 0x12, 0x1e, 0x0a, 0x1a, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, + 0x45, 0x54, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x49, 0x4e, 0x5f, 0x43, 0x4c, 0x55, + 0x53, 0x54, 0x45, 0x52, 0x10, 0x05, 0x12, 0x13, 0x0a, 0x0f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x44, + 0x45, 0x52, 0x45, 0x47, 0x49, 0x53, 0x54, 0x45, 0x52, 0x10, 0x06, 0x42, 0x06, 0x0a, 0x04, 0x74, + 0x79, 0x70, 0x65, 0x22, 0x35, 0x0a, 0x19, 0x53, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x49, 0x6e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x07, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x22, 0x3d, 0x0a, 0x1a, 0x53, 0x65, + 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x49, 0x6e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x6a, 0x73, 0x6f, 0x6e, + 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x6a, + 0x73, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x32, 0xde, 0x05, 0x0a, 0x08, 0x4f, 0x70, + 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x72, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x43, 0x61, 0x70, + 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x2e, 0x2e, 0x63, 0x6e, 0x70, 0x67, + 0x69, 0x2e, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, + 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, + 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x63, 0x6e, 0x70, 0x67, + 0x69, 0x2e, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, + 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x43, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x69, + 0x65, 0x73, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x00, 0x12, 0x8a, 0x01, 0x0a, 0x15, 0x56, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x12, 0x37, 0x2e, 0x63, 0x6e, 0x70, 0x67, 0x69, 0x2e, 0x6f, 0x70, 0x65, + 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, + 0x72, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x36, 0x2e, 0x63, 0x6e, 0x70, 0x67, 0x69, 0x2e, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x36, 0x2e, 0x63, 0x6e, 0x70, 0x67, 0x69, 0x2e, 0x6f, - 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, - 0x74, 0x6f, 0x72, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x00, - 0x12, 0x8a, 0x01, 0x0a, 0x15, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x12, 0x37, 0x2e, 0x63, 0x6e, 0x70, + 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x00, 0x12, 0x8a, 0x01, 0x0a, 0x15, 0x56, 0x61, 0x6c, 0x69, + 0x64, 0x61, 0x74, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x43, 0x68, 0x61, 0x6e, 0x67, + 0x65, 0x12, 0x37, 0x2e, 0x63, 0x6e, 0x70, 0x67, 0x69, 0x2e, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, + 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x56, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x43, 0x68, 0x61, + 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x36, 0x2e, 0x63, 0x6e, 0x70, 0x67, 0x69, 0x2e, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x43, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x36, 0x2e, 0x63, 0x6e, 0x70, 0x67, 0x69, 0x2e, 0x6f, 0x70, 0x65, 0x72, - 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, - 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x43, - 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x00, 0x12, 0x72, 0x0a, - 0x0d, 0x4d, 0x75, 0x74, 0x61, 0x74, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x2f, - 0x2e, 0x63, 0x6e, 0x70, 0x67, 0x69, 0x2e, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, - 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x4d, 0x75, 0x74, 0x61, 0x74, - 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x2e, 0x2e, 0x63, 0x6e, 0x70, 0x67, 0x69, 0x2e, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, - 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x4d, 0x75, 0x74, 0x61, - 0x74, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, - 0x00, 0x12, 0x6d, 0x0a, 0x10, 0x53, 0x65, 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x2a, 0x2e, 0x63, 0x6e, 0x70, 0x67, 0x69, 0x2e, 0x6f, 0x70, - 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x43, 0x6c, 0x75, - 0x73, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x2b, 0x2e, 0x63, 0x6e, 0x70, 0x67, 0x69, 0x2e, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, - 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, - 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, - 0x12, 0x5b, 0x0a, 0x0a, 0x44, 0x65, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x12, 0x24, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x73, 0x75, + 0x6c, 0x74, 0x22, 0x00, 0x12, 0x72, 0x0a, 0x0d, 0x4d, 0x75, 0x74, 0x61, 0x74, 0x65, 0x43, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x2f, 0x2e, 0x63, 0x6e, 0x70, 0x67, 0x69, 0x2e, 0x6f, 0x70, + 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, + 0x6f, 0x72, 0x4d, 0x75, 0x74, 0x61, 0x74, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x63, 0x6e, 0x70, 0x67, 0x69, 0x2e, 0x6f, + 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, + 0x74, 0x6f, 0x72, 0x4d, 0x75, 0x74, 0x61, 0x74, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, + 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x00, 0x12, 0x73, 0x0a, 0x12, 0x53, 0x65, 0x74, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x49, 0x6e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x2c, 0x2e, 0x63, 0x6e, 0x70, 0x67, 0x69, 0x2e, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, - 0x76, 0x31, 0x2e, 0x44, 0x65, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x63, 0x6e, 0x70, 0x67, 0x69, 0x2e, 0x6f, 0x70, 0x65, - 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x72, 0x65, 0x67, 0x69, 0x73, - 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x2f, 0x5a, - 0x2d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6c, 0x6f, 0x75, - 0x64, 0x6e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x2d, 0x70, 0x67, 0x2f, 0x63, 0x6e, 0x70, 0x67, 0x2d, - 0x69, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x49, 0x6e, 0x43, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x63, + 0x6e, 0x70, 0x67, 0x69, 0x2e, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, + 0x2e, 0x53, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x49, 0x6e, 0x43, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5b, 0x0a, + 0x0a, 0x44, 0x65, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x12, 0x24, 0x2e, 0x63, 0x6e, + 0x70, 0x67, 0x69, 0x2e, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, + 0x44, 0x65, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x25, 0x2e, 0x63, 0x6e, 0x70, 0x67, 0x69, 0x2e, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, + 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x2f, 0x5a, 0x2d, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x6e, 0x61, + 0x74, 0x69, 0x76, 0x65, 0x2d, 0x70, 0x67, 0x2f, 0x63, 0x6e, 0x70, 0x67, 0x2d, 0x69, 0x2f, 0x70, + 0x6b, 0x67, 0x2f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( @@ -1016,8 +1017,8 @@ var file_proto_operator_proto_goTypes = []interface{}{ (*OperatorMutateClusterResult)(nil), // 10: cnpgi.operator.v1.OperatorMutateClusterResult (*ValidationError)(nil), // 11: cnpgi.operator.v1.ValidationError (*OperatorCapability)(nil), // 12: cnpgi.operator.v1.OperatorCapability - (*SetClusterStatusRequest)(nil), // 13: cnpgi.operator.v1.SetClusterStatusRequest - (*SetClusterStatusResponse)(nil), // 14: cnpgi.operator.v1.SetClusterStatusResponse + (*SetStatusInClusterRequest)(nil), // 13: cnpgi.operator.v1.SetStatusInClusterRequest + (*SetStatusInClusterResponse)(nil), // 14: cnpgi.operator.v1.SetStatusInClusterResponse (*OperatorCapability_RPC)(nil), // 15: cnpgi.operator.v1.OperatorCapability.RPC } var file_proto_operator_proto_depIdxs = []int32{ @@ -1030,13 +1031,13 @@ var file_proto_operator_proto_depIdxs = []int32{ 3, // 6: cnpgi.operator.v1.Operator.ValidateClusterCreate:input_type -> cnpgi.operator.v1.OperatorValidateClusterCreateRequest 5, // 7: cnpgi.operator.v1.Operator.ValidateClusterChange:input_type -> cnpgi.operator.v1.OperatorValidateClusterChangeRequest 7, // 8: cnpgi.operator.v1.Operator.MutateCluster:input_type -> cnpgi.operator.v1.OperatorMutateClusterRequest - 13, // 9: cnpgi.operator.v1.Operator.SetClusterStatus:input_type -> cnpgi.operator.v1.SetClusterStatusRequest + 13, // 9: cnpgi.operator.v1.Operator.SetStatusInCluster:input_type -> cnpgi.operator.v1.SetStatusInClusterRequest 8, // 10: cnpgi.operator.v1.Operator.Deregister:input_type -> cnpgi.operator.v1.DeregisterRequest 2, // 11: cnpgi.operator.v1.Operator.GetCapabilities:output_type -> cnpgi.operator.v1.OperatorCapabilitiesResult 4, // 12: cnpgi.operator.v1.Operator.ValidateClusterCreate:output_type -> cnpgi.operator.v1.OperatorValidateClusterCreateResult 6, // 13: cnpgi.operator.v1.Operator.ValidateClusterChange:output_type -> cnpgi.operator.v1.OperatorValidateClusterChangeResult 10, // 14: cnpgi.operator.v1.Operator.MutateCluster:output_type -> cnpgi.operator.v1.OperatorMutateClusterResult - 14, // 15: cnpgi.operator.v1.Operator.SetClusterStatus:output_type -> cnpgi.operator.v1.SetClusterStatusResponse + 14, // 15: cnpgi.operator.v1.Operator.SetStatusInCluster:output_type -> cnpgi.operator.v1.SetStatusInClusterResponse 9, // 16: cnpgi.operator.v1.Operator.Deregister:output_type -> cnpgi.operator.v1.DeregisterResponse 11, // [11:17] is the sub-list for method output_type 5, // [5:11] is the sub-list for method input_type @@ -1196,7 +1197,7 @@ func file_proto_operator_proto_init() { } } file_proto_operator_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetClusterStatusRequest); i { + switch v := v.(*SetStatusInClusterRequest); i { case 0: return &v.state case 1: @@ -1208,7 +1209,7 @@ func file_proto_operator_proto_init() { } } file_proto_operator_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SetClusterStatusResponse); i { + switch v := v.(*SetStatusInClusterResponse); i { case 0: return &v.state case 1: diff --git a/pkg/operator/operator_grpc.pb.go b/pkg/operator/operator_grpc.pb.go index e0d11f9..ca9cdee 100644 --- a/pkg/operator/operator_grpc.pb.go +++ b/pkg/operator/operator_grpc.pb.go @@ -23,7 +23,7 @@ const ( Operator_ValidateClusterCreate_FullMethodName = "/cnpgi.operator.v1.Operator/ValidateClusterCreate" Operator_ValidateClusterChange_FullMethodName = "/cnpgi.operator.v1.Operator/ValidateClusterChange" Operator_MutateCluster_FullMethodName = "/cnpgi.operator.v1.Operator/MutateCluster" - Operator_SetClusterStatus_FullMethodName = "/cnpgi.operator.v1.Operator/SetClusterStatus" + Operator_SetStatusInCluster_FullMethodName = "/cnpgi.operator.v1.Operator/SetStatusInCluster" Operator_Deregister_FullMethodName = "/cnpgi.operator.v1.Operator/Deregister" ) @@ -41,9 +41,9 @@ type OperatorClient interface { ValidateClusterChange(ctx context.Context, in *OperatorValidateClusterChangeRequest, opts ...grpc.CallOption) (*OperatorValidateClusterChangeResult, error) // MutateCluster fills in the defaults inside a Cluster resource MutateCluster(ctx context.Context, in *OperatorMutateClusterRequest, opts ...grpc.CallOption) (*OperatorMutateClusterResult, error) - // SetClusterStatus is invoked at the end of the reconciliation loop and it is used to set the plugin status + // SetStatusInCluster is invoked at the end of the reconciliation loop and it is used to set the plugin status // inside the .status.plugins[pluginName] map key - SetClusterStatus(ctx context.Context, in *SetClusterStatusRequest, opts ...grpc.CallOption) (*SetClusterStatusResponse, error) + SetStatusInCluster(ctx context.Context, in *SetStatusInClusterRequest, opts ...grpc.CallOption) (*SetStatusInClusterResponse, error) // Deregister is invoked when the plugin is removed from the cluster definition. It is expected that the plugin // executes its cleanup logic when this method is invoked. Deregister(ctx context.Context, in *DeregisterRequest, opts ...grpc.CallOption) (*DeregisterResponse, error) @@ -93,9 +93,9 @@ func (c *operatorClient) MutateCluster(ctx context.Context, in *OperatorMutateCl return out, nil } -func (c *operatorClient) SetClusterStatus(ctx context.Context, in *SetClusterStatusRequest, opts ...grpc.CallOption) (*SetClusterStatusResponse, error) { - out := new(SetClusterStatusResponse) - err := c.cc.Invoke(ctx, Operator_SetClusterStatus_FullMethodName, in, out, opts...) +func (c *operatorClient) SetStatusInCluster(ctx context.Context, in *SetStatusInClusterRequest, opts ...grpc.CallOption) (*SetStatusInClusterResponse, error) { + out := new(SetStatusInClusterResponse) + err := c.cc.Invoke(ctx, Operator_SetStatusInCluster_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -125,9 +125,9 @@ type OperatorServer interface { ValidateClusterChange(context.Context, *OperatorValidateClusterChangeRequest) (*OperatorValidateClusterChangeResult, error) // MutateCluster fills in the defaults inside a Cluster resource MutateCluster(context.Context, *OperatorMutateClusterRequest) (*OperatorMutateClusterResult, error) - // SetClusterStatus is invoked at the end of the reconciliation loop and it is used to set the plugin status + // SetStatusInCluster is invoked at the end of the reconciliation loop and it is used to set the plugin status // inside the .status.plugins[pluginName] map key - SetClusterStatus(context.Context, *SetClusterStatusRequest) (*SetClusterStatusResponse, error) + SetStatusInCluster(context.Context, *SetStatusInClusterRequest) (*SetStatusInClusterResponse, error) // Deregister is invoked when the plugin is removed from the cluster definition. It is expected that the plugin // executes its cleanup logic when this method is invoked. Deregister(context.Context, *DeregisterRequest) (*DeregisterResponse, error) @@ -150,8 +150,8 @@ func (UnimplementedOperatorServer) ValidateClusterChange(context.Context, *Opera func (UnimplementedOperatorServer) MutateCluster(context.Context, *OperatorMutateClusterRequest) (*OperatorMutateClusterResult, error) { return nil, status.Errorf(codes.Unimplemented, "method MutateCluster not implemented") } -func (UnimplementedOperatorServer) SetClusterStatus(context.Context, *SetClusterStatusRequest) (*SetClusterStatusResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SetClusterStatus not implemented") +func (UnimplementedOperatorServer) SetStatusInCluster(context.Context, *SetStatusInClusterRequest) (*SetStatusInClusterResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SetStatusInCluster not implemented") } func (UnimplementedOperatorServer) Deregister(context.Context, *DeregisterRequest) (*DeregisterResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Deregister not implemented") @@ -241,20 +241,20 @@ func _Operator_MutateCluster_Handler(srv interface{}, ctx context.Context, dec f return interceptor(ctx, in, info, handler) } -func _Operator_SetClusterStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SetClusterStatusRequest) +func _Operator_SetStatusInCluster_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SetStatusInClusterRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(OperatorServer).SetClusterStatus(ctx, in) + return srv.(OperatorServer).SetStatusInCluster(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Operator_SetClusterStatus_FullMethodName, + FullMethod: Operator_SetStatusInCluster_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(OperatorServer).SetClusterStatus(ctx, req.(*SetClusterStatusRequest)) + return srv.(OperatorServer).SetStatusInCluster(ctx, req.(*SetStatusInClusterRequest)) } return interceptor(ctx, in, info, handler) } @@ -301,8 +301,8 @@ var Operator_ServiceDesc = grpc.ServiceDesc{ Handler: _Operator_MutateCluster_Handler, }, { - MethodName: "SetClusterStatus", - Handler: _Operator_SetClusterStatus_Handler, + MethodName: "SetStatusInCluster", + Handler: _Operator_SetStatusInCluster_Handler, }, { MethodName: "Deregister", diff --git a/proto/operator.proto b/proto/operator.proto index 44eed2f..0247db6 100644 --- a/proto/operator.proto +++ b/proto/operator.proto @@ -17,9 +17,9 @@ service Operator { // MutateCluster fills in the defaults inside a Cluster resource rpc MutateCluster(OperatorMutateClusterRequest) returns (OperatorMutateClusterResult) {} - // SetClusterStatus is invoked at the end of the reconciliation loop and it is used to set the plugin status + // SetStatusInCluster is invoked at the end of the reconciliation loop and it is used to set the plugin status // inside the .status.plugins[pluginName] map key - rpc SetClusterStatus(SetClusterStatusRequest) returns (SetClusterStatusResponse) {} + rpc SetStatusInCluster(SetStatusInClusterRequest) returns (SetStatusInClusterResponse) {} // Deregister is invoked when the plugin is removed from the cluster definition. It is expected that the plugin // executes its cleanup logic when this method is invoked. @@ -117,9 +117,9 @@ message OperatorCapability { // reply to the MutateCluster RPC request TYPE_MUTATE_CLUSTER = 3; - // TYPE_SET_CLUSTER_STATUS indicates that the Plugin is able to - // set cluster status - TYPE_SET_CLUSTER_STATUS = 5; + // TYPE_SET_STATUS_IN_CLUSTER indicates that the Plugin is able to + // reply to the SetStatusInCluster RPC request + TYPE_SET_STATUS_IN_CLUSTER = 5; // TYPE_DEREGISTER indicates that the Plugin is able to execute the cleanup logic once it is removed from // the cluster definition @@ -134,13 +134,13 @@ message OperatorCapability { } } -message SetClusterStatusRequest { +message SetStatusInClusterRequest { // This field is REQUIRED. Value of this field is the JSON // serialization of the current Cluster definition bytes cluster = 1; } -message SetClusterStatusResponse { +message SetStatusInClusterResponse { // This field is OPTIONAL. No value means no-op, otherwise the passed json is set inside the // .status.plugins[pluginName] key bytes json_status = 1;