diff --git a/api/pipelines/pipelines.swagger.json b/api/pipelines/pipelines.swagger.json index 0032e37a6..da845bfa5 100644 --- a/api/pipelines/pipelines.swagger.json +++ b/api/pipelines/pipelines.swagger.json @@ -151,6 +151,26 @@ } } }, + "v1Condition": { + "type": "object", + "properties": { + "type": { + "type": "string" + }, + "status": { + "type": "string" + }, + "reason": { + "type": "string" + }, + "message": { + "type": "string" + }, + "timestamp": { + "type": "string" + } + } + }, "v1Environment": { "type": "object", "properties": { @@ -283,6 +303,12 @@ }, "lastAppliedRevision": { "type": "string" + }, + "conditions": { + "type": "array", + "items": { + "$ref": "#/definitions/v1Condition" + } } } } diff --git a/api/pipelines/types.proto b/api/pipelines/types.proto index b2eda0d17..779e74fb5 100644 --- a/api/pipelines/types.proto +++ b/api/pipelines/types.proto @@ -33,11 +33,20 @@ message AppRef { string name = 3; } +message Condition { + string type = 1; + string status = 2; + string reason = 3; + string message = 4; + string timestamp = 5; +} + message WorkloadStatus { - string kind = 1; - string name = 2; - string version = 3; - string lastAppliedRevision = 4; + string kind = 1; + string name = 2; + string version = 3; + string lastAppliedRevision = 4; + repeated Condition conditions = 5; } message PipelineTargetStatus { diff --git a/pkg/api/pipelines/pipelines.pb.go b/pkg/api/pipelines/pipelines.pb.go index c9c4bde2b..ac62c27f8 100644 --- a/pkg/api/pipelines/pipelines.pb.go +++ b/pkg/api/pipelines/pipelines.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.27.1 +// protoc-gen-go v1.28.0 // protoc (unknown) // source: api/pipelines/pipelines.proto diff --git a/pkg/api/pipelines/types.pb.go b/pkg/api/pipelines/types.pb.go index 86902f95d..4727390af 100644 --- a/pkg/api/pipelines/types.pb.go +++ b/pkg/api/pipelines/types.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.27.1 +// protoc-gen-go v1.28.0 // protoc (unknown) // source: api/pipelines/types.proto @@ -319,21 +319,101 @@ func (x *AppRef) GetName() string { return "" } +type Condition struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` + Status string `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"` + Reason string `protobuf:"bytes,3,opt,name=reason,proto3" json:"reason,omitempty"` + Message string `protobuf:"bytes,4,opt,name=message,proto3" json:"message,omitempty"` + Timestamp string `protobuf:"bytes,5,opt,name=timestamp,proto3" json:"timestamp,omitempty"` +} + +func (x *Condition) Reset() { + *x = Condition{} + if protoimpl.UnsafeEnabled { + mi := &file_api_pipelines_types_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Condition) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Condition) ProtoMessage() {} + +func (x *Condition) ProtoReflect() protoreflect.Message { + mi := &file_api_pipelines_types_proto_msgTypes[5] + 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 Condition.ProtoReflect.Descriptor instead. +func (*Condition) Descriptor() ([]byte, []int) { + return file_api_pipelines_types_proto_rawDescGZIP(), []int{5} +} + +func (x *Condition) GetType() string { + if x != nil { + return x.Type + } + return "" +} + +func (x *Condition) GetStatus() string { + if x != nil { + return x.Status + } + return "" +} + +func (x *Condition) GetReason() string { + if x != nil { + return x.Reason + } + return "" +} + +func (x *Condition) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +func (x *Condition) GetTimestamp() string { + if x != nil { + return x.Timestamp + } + return "" +} + type WorkloadStatus struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Kind string `protobuf:"bytes,1,opt,name=kind,proto3" json:"kind,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"` - LastAppliedRevision string `protobuf:"bytes,4,opt,name=lastAppliedRevision,proto3" json:"lastAppliedRevision,omitempty"` + Kind string `protobuf:"bytes,1,opt,name=kind,proto3" json:"kind,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"` + LastAppliedRevision string `protobuf:"bytes,4,opt,name=lastAppliedRevision,proto3" json:"lastAppliedRevision,omitempty"` + Conditions []*Condition `protobuf:"bytes,5,rep,name=conditions,proto3" json:"conditions,omitempty"` } func (x *WorkloadStatus) Reset() { *x = WorkloadStatus{} if protoimpl.UnsafeEnabled { - mi := &file_api_pipelines_types_proto_msgTypes[5] + mi := &file_api_pipelines_types_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -346,7 +426,7 @@ func (x *WorkloadStatus) String() string { func (*WorkloadStatus) ProtoMessage() {} func (x *WorkloadStatus) ProtoReflect() protoreflect.Message { - mi := &file_api_pipelines_types_proto_msgTypes[5] + mi := &file_api_pipelines_types_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -359,7 +439,7 @@ func (x *WorkloadStatus) ProtoReflect() protoreflect.Message { // Deprecated: Use WorkloadStatus.ProtoReflect.Descriptor instead. func (*WorkloadStatus) Descriptor() ([]byte, []int) { - return file_api_pipelines_types_proto_rawDescGZIP(), []int{5} + return file_api_pipelines_types_proto_rawDescGZIP(), []int{6} } func (x *WorkloadStatus) GetKind() string { @@ -390,6 +470,13 @@ func (x *WorkloadStatus) GetLastAppliedRevision() string { return "" } +func (x *WorkloadStatus) GetConditions() []*Condition { + if x != nil { + return x.Conditions + } + return nil +} + type PipelineTargetStatus struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -403,7 +490,7 @@ type PipelineTargetStatus struct { func (x *PipelineTargetStatus) Reset() { *x = PipelineTargetStatus{} if protoimpl.UnsafeEnabled { - mi := &file_api_pipelines_types_proto_msgTypes[6] + mi := &file_api_pipelines_types_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -416,7 +503,7 @@ func (x *PipelineTargetStatus) String() string { func (*PipelineTargetStatus) ProtoMessage() {} func (x *PipelineTargetStatus) ProtoReflect() protoreflect.Message { - mi := &file_api_pipelines_types_proto_msgTypes[6] + mi := &file_api_pipelines_types_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -429,7 +516,7 @@ func (x *PipelineTargetStatus) ProtoReflect() protoreflect.Message { // Deprecated: Use PipelineTargetStatus.ProtoReflect.Descriptor instead. func (*PipelineTargetStatus) Descriptor() ([]byte, []int) { - return file_api_pipelines_types_proto_rawDescGZIP(), []int{6} + return file_api_pipelines_types_proto_rawDescGZIP(), []int{7} } func (x *PipelineTargetStatus) GetClusterRef() *ClusterRef { @@ -464,7 +551,7 @@ type PipelineStatus struct { func (x *PipelineStatus) Reset() { *x = PipelineStatus{} if protoimpl.UnsafeEnabled { - mi := &file_api_pipelines_types_proto_msgTypes[7] + mi := &file_api_pipelines_types_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -477,7 +564,7 @@ func (x *PipelineStatus) String() string { func (*PipelineStatus) ProtoMessage() {} func (x *PipelineStatus) ProtoReflect() protoreflect.Message { - mi := &file_api_pipelines_types_proto_msgTypes[7] + mi := &file_api_pipelines_types_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -490,7 +577,7 @@ func (x *PipelineStatus) ProtoReflect() protoreflect.Message { // Deprecated: Use PipelineStatus.ProtoReflect.Descriptor instead. func (*PipelineStatus) Descriptor() ([]byte, []int) { - return file_api_pipelines_types_proto_rawDescGZIP(), []int{7} + return file_api_pipelines_types_proto_rawDescGZIP(), []int{8} } func (x *PipelineStatus) GetEnvironments() map[string]*PipelineStatus_TargetStatusList { @@ -516,7 +603,7 @@ type Pipeline struct { func (x *Pipeline) Reset() { *x = Pipeline{} if protoimpl.UnsafeEnabled { - mi := &file_api_pipelines_types_proto_msgTypes[8] + mi := &file_api_pipelines_types_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -529,7 +616,7 @@ func (x *Pipeline) String() string { func (*Pipeline) ProtoMessage() {} func (x *Pipeline) ProtoReflect() protoreflect.Message { - mi := &file_api_pipelines_types_proto_msgTypes[8] + mi := &file_api_pipelines_types_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -542,7 +629,7 @@ func (x *Pipeline) ProtoReflect() protoreflect.Message { // Deprecated: Use Pipeline.ProtoReflect.Descriptor instead. func (*Pipeline) Descriptor() ([]byte, []int) { - return file_api_pipelines_types_proto_rawDescGZIP(), []int{8} + return file_api_pipelines_types_proto_rawDescGZIP(), []int{9} } func (x *Pipeline) GetName() string { @@ -598,7 +685,7 @@ type PipelineStatus_TargetStatusList struct { func (x *PipelineStatus_TargetStatusList) Reset() { *x = PipelineStatus_TargetStatusList{} if protoimpl.UnsafeEnabled { - mi := &file_api_pipelines_types_proto_msgTypes[9] + mi := &file_api_pipelines_types_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -611,7 +698,7 @@ func (x *PipelineStatus_TargetStatusList) String() string { func (*PipelineStatus_TargetStatusList) ProtoMessage() {} func (x *PipelineStatus_TargetStatusList) ProtoReflect() protoreflect.Message { - mi := &file_api_pipelines_types_proto_msgTypes[9] + mi := &file_api_pipelines_types_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -624,7 +711,7 @@ func (x *PipelineStatus_TargetStatusList) ProtoReflect() protoreflect.Message { // Deprecated: Use PipelineStatus_TargetStatusList.ProtoReflect.Descriptor instead. func (*PipelineStatus_TargetStatusList) Descriptor() ([]byte, []int) { - return file_api_pipelines_types_proto_rawDescGZIP(), []int{7, 0} + return file_api_pipelines_types_proto_rawDescGZIP(), []int{8, 0} } func (x *PipelineStatus_TargetStatusList) GetTargetsStatuses() []*PipelineTargetStatus { @@ -666,67 +753,80 @@ var file_api_pipelines_types_proto_rawDesc = []byte{ 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x70, 0x69, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x84, 0x01, 0x0a, 0x0e, 0x57, 0x6f, 0x72, - 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6b, - 0x69, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, - 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x30, 0x0a, - 0x13, 0x6c, 0x61, 0x73, 0x74, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x64, 0x52, 0x65, 0x76, 0x69, - 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x6c, 0x61, 0x73, 0x74, - 0x41, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x64, 0x52, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x22, - 0xaa, 0x01, 0x0a, 0x14, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x54, 0x61, 0x72, 0x67, - 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x38, 0x0a, 0x0a, 0x63, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x52, 0x65, 0x66, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x70, - 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x52, 0x65, 0x66, 0x52, 0x0a, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, - 0x65, 0x66, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x12, 0x3a, 0x0a, 0x09, 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x18, 0x03, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, - 0x76, 0x31, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x52, 0x09, 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x22, 0xb6, 0x02, 0x0a, - 0x0e, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, - 0x52, 0x0a, 0x0c, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, - 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x2e, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0c, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, - 0x6e, 0x74, 0x73, 0x1a, 0x60, 0x0a, 0x10, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x53, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x4c, 0x0a, 0x0f, 0x74, 0x61, 0x72, 0x67, 0x65, - 0x74, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x22, 0x2e, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, - 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x53, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x52, 0x0f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x53, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x65, 0x73, 0x1a, 0x6e, 0x0a, 0x11, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, - 0x6d, 0x65, 0x6e, 0x74, 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, 0x43, 0x0a, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x70, 0x69, - 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x69, 0x70, 0x65, 0x6c, - 0x69, 0x6e, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, - 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x8f, 0x02, 0x0a, 0x08, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, - 0x6e, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x12, 0x2c, 0x0a, 0x06, 0x61, 0x70, 0x70, 0x52, 0x65, 0x66, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, - 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x70, 0x70, 0x52, 0x65, 0x66, 0x52, 0x06, 0x61, 0x70, 0x70, 0x52, - 0x65, 0x66, 0x12, 0x3d, 0x0a, 0x0c, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, - 0x74, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x70, 0x69, 0x70, 0x65, 0x6c, - 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, - 0x65, 0x6e, 0x74, 0x52, 0x0c, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, - 0x73, 0x12, 0x2e, 0x0a, 0x07, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x18, 0x05, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x76, - 0x31, 0x2e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x07, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, - 0x73, 0x12, 0x34, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1c, 0x2e, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x76, 0x31, - 0x2e, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, - 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x3d, 0x5a, 0x3b, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x77, 0x65, 0x61, 0x76, 0x65, 0x77, 0x6f, 0x72, 0x6b, 0x73, - 0x2f, 0x77, 0x65, 0x61, 0x76, 0x65, 0x2d, 0x67, 0x69, 0x74, 0x6f, 0x70, 0x73, 0x2d, 0x65, 0x6e, - 0x74, 0x65, 0x72, 0x70, 0x72, 0x69, 0x73, 0x65, 0x2f, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, - 0x65, 0x73, 0x2f, 0x61, 0x70, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x87, 0x01, 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, 0x16, 0x0a, 0x06, 0x73, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 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, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, + 0x6d, 0x70, 0x22, 0xbd, 0x01, 0x0a, 0x0e, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, + 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, + 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x30, 0x0a, 0x13, 0x6c, 0x61, 0x73, 0x74, 0x41, + 0x70, 0x70, 0x6c, 0x69, 0x65, 0x64, 0x52, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x6c, 0x61, 0x73, 0x74, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x65, + 0x64, 0x52, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x37, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, + 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, + 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, + 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x22, 0xaa, 0x01, 0x0a, 0x14, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x54, + 0x61, 0x72, 0x67, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x38, 0x0a, 0x0a, 0x63, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x66, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x18, 0x2e, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x43, + 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x66, 0x52, 0x0a, 0x63, 0x6c, 0x75, 0x73, 0x74, + 0x65, 0x72, 0x52, 0x65, 0x66, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x12, 0x3a, 0x0a, 0x09, 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x73, + 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, + 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x52, 0x09, 0x77, 0x6f, 0x72, 0x6b, 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x22, + 0xb6, 0x02, 0x0a, 0x0e, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x12, 0x52, 0x0a, 0x0c, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, + 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x70, 0x69, 0x70, 0x65, 0x6c, + 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x45, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, + 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0c, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, + 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x1a, 0x60, 0x0a, 0x10, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x4c, 0x0a, 0x0f, 0x74, 0x61, + 0x72, 0x67, 0x65, 0x74, 0x73, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, + 0x76, 0x31, 0x2e, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, + 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x65, 0x73, 0x1a, 0x6e, 0x0a, 0x11, 0x45, 0x6e, 0x76, 0x69, + 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 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, + 0x43, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, + 0x2e, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x69, + 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x54, 0x61, 0x72, + 0x67, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x8f, 0x02, 0x0a, 0x08, 0x50, 0x69, 0x70, + 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, + 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, + 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x2c, 0x0a, 0x06, 0x61, 0x70, 0x70, 0x52, 0x65, + 0x66, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, + 0x6e, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x70, 0x70, 0x52, 0x65, 0x66, 0x52, 0x06, 0x61, + 0x70, 0x70, 0x52, 0x65, 0x66, 0x12, 0x3d, 0x0a, 0x0c, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, + 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x70, 0x69, + 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e, 0x76, 0x69, 0x72, + 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x0c, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, + 0x65, 0x6e, 0x74, 0x73, 0x12, 0x2e, 0x0a, 0x07, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x73, 0x18, + 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, + 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x52, 0x07, 0x74, 0x61, 0x72, + 0x67, 0x65, 0x74, 0x73, 0x12, 0x34, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x70, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x73, + 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x69, 0x70, 0x65, 0x6c, 0x69, 0x6e, 0x65, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x42, 0x3d, 0x5a, 0x3b, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x77, 0x65, 0x61, 0x76, 0x65, 0x77, 0x6f, + 0x72, 0x6b, 0x73, 0x2f, 0x77, 0x65, 0x61, 0x76, 0x65, 0x2d, 0x67, 0x69, 0x74, 0x6f, 0x70, 0x73, + 0x2d, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x69, 0x73, 0x65, 0x2f, 0x70, 0x69, 0x70, 0x65, + 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2f, 0x61, 0x70, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( @@ -741,37 +841,39 @@ func file_api_pipelines_types_proto_rawDescGZIP() []byte { return file_api_pipelines_types_proto_rawDescData } -var file_api_pipelines_types_proto_msgTypes = make([]protoimpl.MessageInfo, 11) +var file_api_pipelines_types_proto_msgTypes = make([]protoimpl.MessageInfo, 12) var file_api_pipelines_types_proto_goTypes = []interface{}{ (*ClusterRef)(nil), // 0: pipelines.v1.ClusterRef (*Target)(nil), // 1: pipelines.v1.Target (*Environment)(nil), // 2: pipelines.v1.Environment (*ObjectRef)(nil), // 3: pipelines.v1.ObjectRef (*AppRef)(nil), // 4: pipelines.v1.AppRef - (*WorkloadStatus)(nil), // 5: pipelines.v1.WorkloadStatus - (*PipelineTargetStatus)(nil), // 6: pipelines.v1.PipelineTargetStatus - (*PipelineStatus)(nil), // 7: pipelines.v1.PipelineStatus - (*Pipeline)(nil), // 8: pipelines.v1.Pipeline - (*PipelineStatus_TargetStatusList)(nil), // 9: pipelines.v1.PipelineStatus.TargetStatusList - nil, // 10: pipelines.v1.PipelineStatus.EnvironmentsEntry + (*Condition)(nil), // 5: pipelines.v1.Condition + (*WorkloadStatus)(nil), // 6: pipelines.v1.WorkloadStatus + (*PipelineTargetStatus)(nil), // 7: pipelines.v1.PipelineTargetStatus + (*PipelineStatus)(nil), // 8: pipelines.v1.PipelineStatus + (*Pipeline)(nil), // 9: pipelines.v1.Pipeline + (*PipelineStatus_TargetStatusList)(nil), // 10: pipelines.v1.PipelineStatus.TargetStatusList + nil, // 11: pipelines.v1.PipelineStatus.EnvironmentsEntry } var file_api_pipelines_types_proto_depIdxs = []int32{ 0, // 0: pipelines.v1.Target.clusterRef:type_name -> pipelines.v1.ClusterRef 1, // 1: pipelines.v1.Environment.targets:type_name -> pipelines.v1.Target - 0, // 2: pipelines.v1.PipelineTargetStatus.clusterRef:type_name -> pipelines.v1.ClusterRef - 5, // 3: pipelines.v1.PipelineTargetStatus.workloads:type_name -> pipelines.v1.WorkloadStatus - 10, // 4: pipelines.v1.PipelineStatus.environments:type_name -> pipelines.v1.PipelineStatus.EnvironmentsEntry - 4, // 5: pipelines.v1.Pipeline.appRef:type_name -> pipelines.v1.AppRef - 2, // 6: pipelines.v1.Pipeline.environments:type_name -> pipelines.v1.Environment - 1, // 7: pipelines.v1.Pipeline.targets:type_name -> pipelines.v1.Target - 7, // 8: pipelines.v1.Pipeline.status:type_name -> pipelines.v1.PipelineStatus - 6, // 9: pipelines.v1.PipelineStatus.TargetStatusList.targetsStatuses:type_name -> pipelines.v1.PipelineTargetStatus - 9, // 10: pipelines.v1.PipelineStatus.EnvironmentsEntry.value:type_name -> pipelines.v1.PipelineStatus.TargetStatusList - 11, // [11:11] is the sub-list for method output_type - 11, // [11:11] is the sub-list for method input_type - 11, // [11:11] is the sub-list for extension type_name - 11, // [11:11] is the sub-list for extension extendee - 0, // [0:11] is the sub-list for field type_name + 5, // 2: pipelines.v1.WorkloadStatus.conditions:type_name -> pipelines.v1.Condition + 0, // 3: pipelines.v1.PipelineTargetStatus.clusterRef:type_name -> pipelines.v1.ClusterRef + 6, // 4: pipelines.v1.PipelineTargetStatus.workloads:type_name -> pipelines.v1.WorkloadStatus + 11, // 5: pipelines.v1.PipelineStatus.environments:type_name -> pipelines.v1.PipelineStatus.EnvironmentsEntry + 4, // 6: pipelines.v1.Pipeline.appRef:type_name -> pipelines.v1.AppRef + 2, // 7: pipelines.v1.Pipeline.environments:type_name -> pipelines.v1.Environment + 1, // 8: pipelines.v1.Pipeline.targets:type_name -> pipelines.v1.Target + 8, // 9: pipelines.v1.Pipeline.status:type_name -> pipelines.v1.PipelineStatus + 7, // 10: pipelines.v1.PipelineStatus.TargetStatusList.targetsStatuses:type_name -> pipelines.v1.PipelineTargetStatus + 10, // 11: pipelines.v1.PipelineStatus.EnvironmentsEntry.value:type_name -> pipelines.v1.PipelineStatus.TargetStatusList + 12, // [12:12] is the sub-list for method output_type + 12, // [12:12] is the sub-list for method input_type + 12, // [12:12] is the sub-list for extension type_name + 12, // [12:12] is the sub-list for extension extendee + 0, // [0:12] is the sub-list for field type_name } func init() { file_api_pipelines_types_proto_init() } @@ -841,7 +943,7 @@ func file_api_pipelines_types_proto_init() { } } file_api_pipelines_types_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*WorkloadStatus); i { + switch v := v.(*Condition); i { case 0: return &v.state case 1: @@ -853,7 +955,7 @@ func file_api_pipelines_types_proto_init() { } } file_api_pipelines_types_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PipelineTargetStatus); i { + switch v := v.(*WorkloadStatus); i { case 0: return &v.state case 1: @@ -865,7 +967,7 @@ func file_api_pipelines_types_proto_init() { } } file_api_pipelines_types_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PipelineStatus); i { + switch v := v.(*PipelineTargetStatus); i { case 0: return &v.state case 1: @@ -877,7 +979,7 @@ func file_api_pipelines_types_proto_init() { } } file_api_pipelines_types_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Pipeline); i { + switch v := v.(*PipelineStatus); i { case 0: return &v.state case 1: @@ -889,6 +991,18 @@ func file_api_pipelines_types_proto_init() { } } file_api_pipelines_types_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Pipeline); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_pipelines_types_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PipelineStatus_TargetStatusList); i { case 0: return &v.state @@ -907,7 +1021,7 @@ func file_api_pipelines_types_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_api_pipelines_types_proto_rawDesc, NumEnums: 0, - NumMessages: 11, + NumMessages: 12, NumExtensions: 0, NumServices: 0, }, diff --git a/pkg/api/terraform/terraform.pb.go b/pkg/api/terraform/terraform.pb.go index 2eba2b41c..d91f64f1c 100644 --- a/pkg/api/terraform/terraform.pb.go +++ b/pkg/api/terraform/terraform.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.27.1 +// protoc-gen-go v1.28.0 // protoc (unknown) // source: api/terraform/terraform.proto diff --git a/pkg/api/terraform/types.pb.go b/pkg/api/terraform/types.pb.go index 19d71374e..14fc40286 100644 --- a/pkg/api/terraform/types.pb.go +++ b/pkg/api/terraform/types.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.27.1 +// protoc-gen-go v1.28.0 // protoc (unknown) // source: api/terraform/types.proto diff --git a/pkg/pipelines/server/get.go b/pkg/pipelines/server/get.go index ebd4fd05f..3e780d016 100644 --- a/pkg/pipelines/server/get.go +++ b/pkg/pipelines/server/get.go @@ -3,6 +3,7 @@ package server import ( "context" "fmt" + "time" helm "github.com/fluxcd/helm-controller/api/v2beta1" ctrl "github.com/weaveworks/pipeline-controller/api/v1alpha1" @@ -112,6 +113,16 @@ func getWorkloadStatus(obj *unstructured.Unstructured) (*pb.WorkloadStatus, erro ws.Name = hr.Name ws.Version = hr.Spec.Chart.Spec.Version ws.LastAppliedRevision = hr.Status.LastAppliedRevision + ws.Conditions = []*pb.Condition{} + for _, c := range hr.Status.Conditions { + ws.Conditions = append(ws.Conditions, &pb.Condition{ + Type: c.Type, + Status: string(c.Status), + Reason: c.Reason, + Message: c.Message, + Timestamp: c.LastTransitionTime.Format(time.RFC3339), + }) + } } return ws, nil diff --git a/ui-cra/src/api/pipelines/types.pb.ts b/ui-cra/src/api/pipelines/types.pb.ts index d29b25dce..37ad0d7b6 100644 --- a/ui-cra/src/api/pipelines/types.pb.ts +++ b/ui-cra/src/api/pipelines/types.pb.ts @@ -31,11 +31,20 @@ export type AppRef = { name?: string } +export type Condition = { + type?: string + status?: string + reason?: string + message?: string + timestamp?: string +} + export type WorkloadStatus = { kind?: string name?: string version?: string lastAppliedRevision?: string + conditions?: Condition[] } export type PipelineTargetStatus = { diff --git a/ui-cra/src/components/Pipelines/PipelineDetails/WorkloadStatus.tsx b/ui-cra/src/components/Pipelines/PipelineDetails/WorkloadStatus.tsx new file mode 100644 index 000000000..bd940ac77 --- /dev/null +++ b/ui-cra/src/components/Pipelines/PipelineDetails/WorkloadStatus.tsx @@ -0,0 +1,30 @@ +import { Flex, KubeStatusIndicator } from '@weaveworks/weave-gitops'; +import styled from 'styled-components'; +import { WorkloadStatus as WorkloadStatusType } from '../../../api/pipelines/types.pb'; + +interface Props { + className?: string; + workload?: WorkloadStatusType; +} + +function WorkloadStatus({ className, workload }: Props) { + return ( +
+ +
+ +
+
{workload?.name}
+
+
+ ); +} + +export default styled(WorkloadStatus).attrs({ className: 'WorkloadStatus' })` + font-size: ${props => props.theme.fontSizes.large}; + + /* Hack to hide the text; we only want the icon here */ + ${KubeStatusIndicator} span { + display: none; + } +`; diff --git a/ui-cra/src/components/Pipelines/PipelineDetails/__tests__/PipelineDetails.test.tsx b/ui-cra/src/components/Pipelines/PipelineDetails/__tests__/PipelineDetails.test.tsx index 22c1cd8bf..e59da97e6 100644 --- a/ui-cra/src/components/Pipelines/PipelineDetails/__tests__/PipelineDetails.test.tsx +++ b/ui-cra/src/components/Pipelines/PipelineDetails/__tests__/PipelineDetails.test.tsx @@ -1,10 +1,11 @@ /* eslint-disable testing-library/no-node-access */ import { act, render, RenderResult, screen } from '@testing-library/react'; -import { formatURL } from '@weaveworks/weave-gitops'; +import { CoreClientContextProvider, formatURL } from '@weaveworks/weave-gitops'; import PipelineDetails from '..'; import { GetPipelineResponse } from '../../../../api/pipelines/pipelines.pb'; import { PipelinesProvider } from '../../../../contexts/Pipelines'; import { + CoreClientMock, defaultContexts, PipelinesClientMock, withContext, @@ -156,14 +157,21 @@ interface MappedWorkload { describe('PipelineDetails', () => { let wrap: (el: JSX.Element) => JSX.Element; let api: PipelinesClientMock; + let core: CoreClientMock; beforeEach(() => { api = new PipelinesClientMock(); - wrap = withContext([...defaultContexts(), [PipelinesProvider, { api }]]); + core = new CoreClientMock(); + wrap = withContext([ + ...defaultContexts(), + [PipelinesProvider, { api }], + [CoreClientContextProvider, { api: core }], + ]); }); it('renders pipeline details', async () => { const params = res.pipeline; api.GetPipelineReturns = res; + core.GetObjectReturns = { object: {} }; await act(async () => { const c = wrap( @@ -230,7 +238,8 @@ describe('PipelineDetails', () => { ); //Target as a link - const linkToAutomation = target.querySelector('.workloadName > a'); + const linkToAutomation = target.querySelector('a'); + if (workloads![index].mappedClusterName) { const href = formatURL('/helm_release/details', { name: workloads![index].name, @@ -238,12 +247,6 @@ describe('PipelineDetails', () => { clusterName: workloads![index].mappedClusterName, }); linkToExists(linkToAutomation, href); - } else { - elementToBeNull(linkToAutomation); - checkTextContentToEqual( - target.querySelector('.workload-name'), - workloads![index].name || '', - ); } // Workload Last Applied Version const lastAppliedRevision = target.querySelector( diff --git a/ui-cra/src/components/Pipelines/PipelineDetails/__tests__/__snapshots__/PipelineDetails.test.tsx.snap b/ui-cra/src/components/Pipelines/PipelineDetails/__tests__/__snapshots__/PipelineDetails.test.tsx.snap index 4a92c3c18..8971a71d9 100644 --- a/ui-cra/src/components/Pipelines/PipelineDetails/__tests__/__snapshots__/PipelineDetails.test.tsx.snap +++ b/ui-cra/src/components/Pipelines/PipelineDetails/__tests__/__snapshots__/PipelineDetails.test.tsx.snap @@ -15,7 +15,44 @@ exports[`PipelineDetails snapshots renders 1`] = ` align-items: center; } -.c18 { +.c21 { + display: -webkit-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-flex-direction: row; + -ms-flex-direction: row; + flex-direction: row; + -webkit-align-items: center; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + -webkit-box-pack: start; + -webkit-justify-content: flex-start; + -ms-flex-pack: start; + justify-content: flex-start; +} + +.c26 { + display: -webkit-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-flex-direction: row; + -ms-flex-direction: row; + flex-direction: row; + -webkit-align-items: start; + -webkit-box-align: start; + -ms-flex-align: start; + align-items: start; + width: 100%; + -webkit-box-pack: justify; + -webkit-justify-content: space-between; + -ms-flex-pack: justify; + justify-content: space-between; +} + +.c19 { font-family: 'proxima-nova',Helvetica,Arial,sans-serif; font-size: 14px; font-weight: 400; @@ -24,29 +61,66 @@ exports[`PipelineDetails snapshots renders 1`] = ` color: #00b3ec; } -.c8 svg { +.c25 { + font-family: 'proxima-nova',Helvetica,Arial,sans-serif; + font-size: 14px; + font-weight: 800; + text-transform: none; + font-style: normal; + color: #BC381D; +} + +.c9 svg { fill: !important; height: 24px; width: 24px; } -.c8.downward { +.c9.downward { -webkit-transform: rotate(180deg); -ms-transform: rotate(180deg); transform: rotate(180deg); } -.c8.upward { +.c9.upward { -webkit-transform: initial; -ms-transform: initial; transform: initial; } -.c8 .c17 { +.c9 .c18 { margin-left: 4px; } -.c16 { +.c24 svg { + fill: #BC381D !important; + height: 16px; + width: 16px; +} + +.c24.downward { + -webkit-transform: rotate(180deg); + -ms-transform: rotate(180deg); + transform: rotate(180deg); +} + +.c24.upward { + -webkit-transform: initial; + -ms-transform: initial; + transform: initial; +} + +.c24 .c18 { + margin-left: 4px; + color: #BC381D; +} + +.c23 .c8 .c18 { + color: #1a1a1a; + font-weight: 400; +} + +.c17 { -webkit-text-decoration: none; text-decoration: none; } @@ -75,14 +149,14 @@ exports[`PipelineDetails snapshots renders 1`] = ` margin: 0 auto; } -.c9 { +.c10 { margin: 0 16px; padding: 24px; background-color: #fff; border-radius: 8px 8px 0 0; } -.c20 { +.c28 { padding: calc(24px - 4px) 24px; margin: 0 16px; background-color: rgba(255,255,255,0.7); @@ -98,7 +172,7 @@ exports[`PipelineDetails snapshots renders 1`] = ` justify-content: space-between; } -.c20 a { +.c28 a { color: #00b3ec; } @@ -164,7 +238,15 @@ exports[`PipelineDetails snapshots renders 1`] = ` min-width: 30px; } -.c11 { +.c20 { + font-size: 20px; +} + +.c20 .c22 span { + display: none; +} + +.c12 { font-size: 20px; margin-bottom: 12px; text-overflow: ellipsis; @@ -173,7 +255,7 @@ exports[`PipelineDetails snapshots renders 1`] = ` width: calc(250px - 32px); } -.c10 { +.c11 { background: #fff; padding: 12px; margin-bottom: 8px; @@ -182,38 +264,31 @@ exports[`PipelineDetails snapshots renders 1`] = ` font-weight: 600; } -.c12 { +.c13 { font-size: 14px; color: #1a1a1a; font-weight: 400; } -.c13 { +.c14 { margin-bottom: 12px; line-height: 24px; } -.c14 { +.c15 { font-size: 14px; } -.c15 { +.c16 { position: relative; } -.c15 .version { +.c16 .version { margin-left: 4px; } -.c15 .workloadName { - margin-bottom: 12px; -} - -.c19 { +.c27 { color: #737373; - position: absolute; - right: 0; - bottom: auto; font-size: 14px; border: 1px solid #d8d8d8; padding: 14px 6px; @@ -316,7 +391,7 @@ exports[`PipelineDetails snapshots renders 1`] = ` class="MuiIconButton-label" >
Cluster
dev
Namespace
podinfo-02-dev
-
+
- - Specification: - +
+ + Specification: + + + v6.2.0 + +
v6.2.0 @@ -450,110 +566,204 @@ exports[`PipelineDetails snapshots renders 1`] = `
Cluster
dev
Namespace
podinfo-02-qa
-
- - Specification: - - - v6.1.8 - + + Specification: + + + v6.1.8 + +
Cluster
dev
Namespace
podinfo-02-perf
-
- - Specification: - - - v6.1.8 - + + Specification: + + + v6.1.8 + +
@@ -578,56 +788,103 @@ exports[`PipelineDetails snapshots renders 1`] = `
Cluster
prod
Namespace
podinfo-02-prod
-
- - Specification: - - - v6.1.6 - + + Specification: + + + v6.1.6 + +
@@ -635,18 +892,18 @@ exports[`PipelineDetails snapshots renders 1`] = `
Need help? Raise a  support ticket diff --git a/ui-cra/src/components/Pipelines/PipelineDetails/index.tsx b/ui-cra/src/components/Pipelines/PipelineDetails/index.tsx index 74c7b2e4d..27d632b1b 100644 --- a/ui-cra/src/components/Pipelines/PipelineDetails/index.tsx +++ b/ui-cra/src/components/Pipelines/PipelineDetails/index.tsx @@ -1,11 +1,13 @@ import { createStyles, Grid, makeStyles } from '@material-ui/core'; +import { Flex, formatURL, Link, theme } from '@weaveworks/weave-gitops'; +import _ from 'lodash'; import styled from 'styled-components'; -import { formatURL, Link, theme } from '@weaveworks/weave-gitops'; import { PipelineTargetStatus } from '../../../api/pipelines/types.pb'; import { useGetPipeline } from '../../../contexts/Pipelines'; +import { Routes } from '../../../utils/nav'; import { ContentWrapper } from '../../Layout/ContentWrapper'; import { PageTemplate } from '../../Layout/PageTemplate'; -import { Routes } from '../../../utils/nav'; +import WorkloadStatus from './WorkloadStatus'; const { medium, xs, xxs, large } = theme.spacing; const { small } = theme.fontSizes; @@ -78,15 +80,9 @@ const WorkloadWrapper = styled.div` .version { margin-left: ${xxs}; } - .workloadName { - margin-bottom: ${small}; - } `; const LastAppliedVersion = styled.span` color: ${neutral30}; - position: absolute; - right: 0; - bottom: auto; font-size: ${theme.fontSizes.medium}; border: 1px solid ${neutral20}; padding: 14px 6px; @@ -147,18 +143,18 @@ const PipelineDetails = ({ name, namespace }: Props) => { {getTargetsCount(status || [])} Targets
- {status.map(target => - target?.workloads?.map((workload, wrkIndex) => ( + {status.map(target => { + const clusterName = target?.clusterRef?.name + ? `${target?.clusterRef?.namespace}/${target?.clusterRef?.name}` + : 'management'; + + return target?.workloads?.map((workload, wrkIndex) => ( - {target?.clusterRef?.name && ( - <> - Cluster - - {target?.clusterRef?.name} - - - )} + Cluster + + {target?.clusterRef?.name || clusterName} + Namespace @@ -166,38 +162,41 @@ const PipelineDetails = ({ name, namespace }: Props) => { -
- {target?.clusterRef?.namespace ? ( - - {workload?.name} - - ) : ( - - {workload?.name} +
+ + {workload && } + +
+ +
+ Specification: + + {`v${workload?.version}`} - )} +
{workload?.lastAppliedRevision && ( {`v${workload?.lastAppliedRevision}`} )} -
-
- Specification: - - {`v${workload?.version}`} - -
+
- )), - )} + )); + })} ); })} diff --git a/ui-cra/src/utils/test-utils.tsx b/ui-cra/src/utils/test-utils.tsx index 36bf4fae7..7ca8afc0b 100644 --- a/ui-cra/src/utils/test-utils.tsx +++ b/ui-cra/src/utils/test-utils.tsx @@ -7,6 +7,8 @@ import { } from '@weaveworks/progressive-delivery'; import { CoreClientContextProvider, theme } from '@weaveworks/weave-gitops'; import { + GetObjectRequest, + GetObjectResponse, ListObjectsRequest, ListObjectsResponse, } from '@weaveworks/weave-gitops/ui/lib/api/core/core.pb'; @@ -157,6 +159,7 @@ export class CoreClientMock { constructor() { this.ListObjects = this.ListObjects.bind(this); this.GetFeatureFlags = this.GetFeatureFlags.bind(this); + this.GetObject = this.GetObject.bind(this); } GetFeatureFlagsReturns: { flags: { [x: string]: string } } = { flags: { @@ -164,6 +167,7 @@ export class CoreClientMock { }, }; ListObjectsReturns: { [kind: string]: ListObjectsResponse } = {}; + GetObjectReturns: GetObjectResponse = {}; GetFeatureFlags() { return promisify(this.GetFeatureFlagsReturns); @@ -174,6 +178,10 @@ export class CoreClientMock { this.ListObjectsReturns[req.kind!] || defaultListObjectsResponse, ); } + + GetObject(req: GetObjectRequest) { + return promisify(this.GetObjectReturns); + } } export class ApplicationsClientMock { constructor() {