diff --git a/proto/v1beta1/run_function.pb.go b/proto/v1beta1/run_function.pb.go index 5059f2e..86a9aca 100644 --- a/proto/v1beta1/run_function.pb.go +++ b/proto/v1beta1/run_function.pb.go @@ -158,8 +158,13 @@ func (Severity) EnumDescriptor() ([]byte, []int) { type Target int32 const ( - Target_TARGET_UNSPECIFIED Target = 0 - Target_TARGET_COMPOSITE Target = 1 + // If the target is unspecified, the result targets the composite resource. + Target_TARGET_UNSPECIFIED Target = 0 + // Target the composite resource. Results that target the composite resource + // should include detailed, advanced information. + Target_TARGET_COMPOSITE Target = 1 + // Target the composite and the claim. Results that target the composite and + // the claim should include only end-user friendly information. Target_TARGET_COMPOSITE_AND_CLAIM Target = 2 ) @@ -211,7 +216,6 @@ const ( Status_STATUS_UNSPECIFIED Status = 0 Status_STATUS_FALSE Status = 1 Status_STATUS_TRUE Status = 2 - Status_STATUS_UNKNOWN Status = 3 ) // Enum value maps for Status. @@ -220,13 +224,11 @@ var ( 0: "STATUS_UNSPECIFIED", 1: "STATUS_FALSE", 2: "STATUS_TRUE", - 3: "STATUS_UNKNOWN", } Status_value = map[string]int32{ "STATUS_UNSPECIFIED": 0, "STATUS_FALSE": 1, "STATUS_TRUE": 2, - "STATUS_UNKNOWN": 3, } ) @@ -989,12 +991,14 @@ type Result struct { Severity Severity `protobuf:"varint,1,opt,name=severity,proto3,enum=apiextensions.fn.proto.v1beta1.Severity" json:"severity,omitempty"` // Human-readable details about the result. Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` - // Determines who should receive any Events or Status Conditions that are - // generated as part of this result + // The resources this result targets. Target Target `protobuf:"varint,3,opt,name=target,proto3,enum=apiextensions.fn.proto.v1beta1.Target" json:"target,omitempty"` - // Optionally update the supplied status condition on all targets. - // The result's reason and message will be used in the condition. - Condition *Condition `protobuf:"bytes,4,opt,name=condition,proto3,oneof" json:"condition,omitempty"` + // Optional PascalCase, machine-readable reason for this result. + Reason *string `protobuf:"bytes,4,opt,name=reason,proto3,oneof" json:"reason,omitempty"` + // A result can optionally indicate the condition of the target resources. + // Crossplane will consider the resources to be in the supplied condition + // until another result changes it. + Condition *Condition `protobuf:"bytes,5,opt,name=condition,proto3,oneof" json:"condition,omitempty"` } func (x *Result) Reset() { @@ -1050,6 +1054,13 @@ func (x *Result) GetTarget() Target { return Target_TARGET_UNSPECIFIED } +func (x *Result) GetReason() string { + if x != nil && x.Reason != nil { + return *x.Reason + } + return "" +} + func (x *Result) GetCondition() *Condition { if x != nil { return x.Condition @@ -1057,18 +1068,17 @@ func (x *Result) GetCondition() *Condition { return nil } +// A Condition type Condition struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Type of the condition, e.g. DatabaseReady. - // 'Ready' and 'Synced' are reserved for use by Crossplane. + // Ready and Synced are reserved for use by Crossplane. Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` // Status of the condition. Status Status `protobuf:"varint,2,opt,name=status,proto3,enum=apiextensions.fn.proto.v1beta1.Status" json:"status,omitempty"` - // Machine-readable PascalCase reason. - Reason string `protobuf:"bytes,3,opt,name=reason,proto3" json:"reason,omitempty"` } func (x *Condition) Reset() { @@ -1117,13 +1127,6 @@ func (x *Condition) GetStatus() Status { return Status_STATUS_UNSPECIFIED } -func (x *Condition) GetReason() string { - if x != nil { - return x.Reason - } - return "" -} - var File_v1beta1_run_function_proto protoreflect.FileDescriptor var file_v1beta1_run_function_proto_rawDesc = []byte{ @@ -1279,7 +1282,7 @@ var file_v1beta1_run_function_proto_rawDesc = []byte{ 0x6f, 0x6e, 0x44, 0x65, 0x74, 0x61, 0x69, 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, 0x0c, 0x52, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x84, 0x02, 0x0a, 0x06, 0x52, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xac, 0x02, 0x0a, 0x06, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x44, 0x0a, 0x08, 0x73, 0x65, 0x76, 0x65, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x28, 0x2e, 0x61, 0x70, 0x69, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, @@ -1290,20 +1293,21 @@ var file_v1beta1_run_function_proto_rawDesc = []byte{ 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e, 0x61, 0x70, 0x69, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x06, 0x74, - 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x4c, 0x0a, 0x09, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x61, 0x70, 0x69, 0x65, 0x78, - 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x09, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x88, 0x01, 0x01, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x22, 0x77, 0x0a, 0x09, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, - 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, - 0x70, 0x65, 0x12, 0x3e, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x26, 0x2e, 0x61, 0x70, 0x69, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x2e, 0x66, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x2a, 0x3f, 0x0a, 0x05, 0x52, 0x65, + 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x1b, 0x0a, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x88, + 0x01, 0x01, 0x12, 0x4c, 0x0a, 0x09, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x61, 0x70, 0x69, 0x65, 0x78, 0x74, 0x65, 0x6e, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x48, 0x01, 0x52, 0x09, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, + 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, + 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x5f, 0x0a, 0x09, 0x43, 0x6f, 0x6e, + 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x3e, 0x0a, 0x06, 0x73, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e, 0x61, 0x70, 0x69, + 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x6e, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2a, 0x3f, 0x0a, 0x05, 0x52, 0x65, 0x61, 0x64, 0x79, 0x12, 0x15, 0x0a, 0x11, 0x52, 0x45, 0x41, 0x44, 0x59, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x52, 0x45, 0x41, 0x44, 0x59, 0x5f, 0x54, 0x52, 0x55, 0x45, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x52, 0x45, @@ -1319,26 +1323,24 @@ var file_v1beta1_run_function_proto_rawDesc = []byte{ 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x43, 0x4f, 0x4d, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x45, 0x10, 0x01, 0x12, 0x1e, 0x0a, 0x1a, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x5f, 0x43, 0x4f, 0x4d, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x45, 0x5f, 0x41, 0x4e, 0x44, - 0x5f, 0x43, 0x4c, 0x41, 0x49, 0x4d, 0x10, 0x02, 0x2a, 0x57, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, + 0x5f, 0x43, 0x4c, 0x41, 0x49, 0x4d, 0x10, 0x02, 0x2a, 0x43, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, 0x12, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x46, 0x41, 0x4c, 0x53, 0x45, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, - 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x54, 0x52, 0x55, 0x45, 0x10, 0x02, 0x12, 0x12, 0x0a, - 0x0e, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, - 0x03, 0x32, 0x91, 0x01, 0x0a, 0x15, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x75, - 0x6e, 0x6e, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x78, 0x0a, 0x0b, 0x52, - 0x75, 0x6e, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x32, 0x2e, 0x61, 0x70, 0x69, + 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x54, 0x52, 0x55, 0x45, 0x10, 0x02, 0x32, 0x91, 0x01, + 0x0a, 0x15, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x75, 0x6e, 0x6e, 0x65, 0x72, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x78, 0x0a, 0x0b, 0x52, 0x75, 0x6e, 0x46, 0x75, + 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x32, 0x2e, 0x61, 0x70, 0x69, 0x65, 0x78, 0x74, 0x65, + 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x75, 0x6e, 0x46, 0x75, 0x6e, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x61, 0x70, 0x69, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x75, 0x6e, 0x46, - 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33, - 0x2e, 0x61, 0x70, 0x69, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, - 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, - 0x52, 0x75, 0x6e, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x35, 0x5a, 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x72, 0x6f, 0x73, 0x73, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x66, - 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x73, 0x64, 0x6b, 0x2d, 0x67, 0x6f, 0x2f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x00, 0x42, 0x35, 0x5a, 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x63, 0x72, 0x6f, 0x73, 0x73, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x66, 0x75, 0x6e, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x2d, 0x73, 0x64, 0x6b, 0x2d, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/proto/v1beta1/run_function.proto b/proto/v1beta1/run_function.proto index f9d59a7..8085535 100644 --- a/proto/v1beta1/run_function.proto +++ b/proto/v1beta1/run_function.proto @@ -222,13 +222,16 @@ message Result { // Human-readable details about the result. string message = 2; - // Determines who should receive any Events or Status Conditions that are - // generated as part of this result + // The resources this result targets. Target target = 3; - // Optionally update the supplied status condition on all targets. - // The result's reason and message will be used in the condition. - optional Condition condition = 4; + // Optional PascalCase, machine-readable reason for this result. + optional string reason = 4; + + // A result can optionally indicate the condition of the target resources. + // Crossplane will consider the resources to be in the supplied condition + // until another result changes it. + optional Condition condition = 5; } // Severity of Function results. @@ -252,8 +255,15 @@ enum Severity { // Target of Function results. enum Target { + // If the target is unspecified, the result targets the composite resource. TARGET_UNSPECIFIED = 0; + + // Target the composite resource. Results that target the composite resource + // should include detailed, advanced information. TARGET_COMPOSITE = 1; + + // Target the composite and the claim. Results that target the composite and + // the claim should include only end-user friendly information. TARGET_COMPOSITE_AND_CLAIM = 2; } @@ -262,17 +272,15 @@ enum Status { STATUS_UNSPECIFIED = 0; STATUS_FALSE = 1; STATUS_TRUE = 2; - STATUS_UNKNOWN = 3; } +// A Condition message Condition { // Type of the condition, e.g. DatabaseReady. - // 'Ready' and 'Synced' are reserved for use by Crossplane. + // Ready and Synced are reserved for use by Crossplane. string type = 1; // Status of the condition. Status status = 2; - - // Machine-readable PascalCase reason. - string reason = 3; } + diff --git a/response/response.go b/response/response.go index db92ef7..11327d0 100644 --- a/response/response.go +++ b/response/response.go @@ -178,10 +178,10 @@ func (o *Result) TargetCompositeAndClaim() *Result { // ConditionTrue configures the result to create a condition on the targeted // objects with the status set to true. func (o *Result) ConditionTrue(t string, r string) *Result { + o.result.Reason = &r o.result.Condition = &v1beta1.Condition{ Type: t, Status: v1beta1.Status_STATUS_TRUE, - Reason: r, } return o } @@ -189,10 +189,10 @@ func (o *Result) ConditionTrue(t string, r string) *Result { // ConditionFalse configures the result to create a condition on the targeted // objects with the status set to false. func (o *Result) ConditionFalse(t string, r string) *Result { + o.result.Reason = &r o.result.Condition = &v1beta1.Condition{ Type: t, Status: v1beta1.Status_STATUS_FALSE, - Reason: r, } return o } @@ -200,10 +200,10 @@ func (o *Result) ConditionFalse(t string, r string) *Result { // ConditionUnknown configures the result to create a condition on the targeted // objects with the status set to unknown. func (o *Result) ConditionUnknown(t string, r string) *Result { + o.result.Reason = &r o.result.Condition = &v1beta1.Condition{ Type: t, - Status: v1beta1.Status_STATUS_UNKNOWN, - Reason: r, + Status: v1beta1.Status_STATUS_UNSPECIFIED, } return o } diff --git a/response/response_test.go b/response/response_test.go index 34ecf1c..8645823 100644 --- a/response/response_test.go +++ b/response/response_test.go @@ -28,6 +28,9 @@ import ( ) func TestResult(t *testing.T) { + reasonAvailable := "Available" + reasonStale := "Stale" + reasonUnauthorized := "Unauthorized" type testFn func(*v1beta1.RunFunctionResponse) type args struct { fns []testFn @@ -123,30 +126,30 @@ func TestResult(t *testing.T) { Severity: v1beta1.Severity_SEVERITY_NORMAL, Message: "some-message", Target: v1beta1.Target_TARGET_COMPOSITE, + Reason: &reasonAvailable, Condition: &v1beta1.Condition{ Type: "DatabaseReady", Status: v1beta1.Status_STATUS_TRUE, - Reason: "Available", }, }, { Severity: v1beta1.Severity_SEVERITY_WARNING, Message: "some-error", Target: v1beta1.Target_TARGET_COMPOSITE, + Reason: &reasonStale, Condition: &v1beta1.Condition{ Type: "DatabaseReady", - Status: v1beta1.Status_STATUS_UNKNOWN, - Reason: "Stale", + Status: v1beta1.Status_STATUS_UNSPECIFIED, }, }, { Severity: v1beta1.Severity_SEVERITY_FATAL, Message: "some-error", Target: v1beta1.Target_TARGET_COMPOSITE, + Reason: &reasonUnauthorized, Condition: &v1beta1.Condition{ Type: "DatabaseReady", Status: v1beta1.Status_STATUS_FALSE, - Reason: "Unauthorized", }, }, },