From 9b0e0236d50b567240f271cd63bc72373eb5657c Mon Sep 17 00:00:00 2001 From: Steven Blumenthal Date: Mon, 20 Mar 2023 13:16:16 -0400 Subject: [PATCH] Add optionalExitTimestamp to contlcycle.PodEvent (#240) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Lénaïc Huard --- contimage/contimage.pb.go | 2 +- contlcycle/contlcycle.pb.go | 29 +++++++++++++++++++++-------- cyclonedx_v1_4/bom-1.4.pb.go | 2 +- proto/contlcycle/contlcycle.proto | 1 + sbom/sbom.pb.go | 2 +- 5 files changed, 25 insertions(+), 11 deletions(-) diff --git a/contimage/contimage.pb.go b/contimage/contimage.pb.go index 8c38b0cb..525706be 100644 --- a/contimage/contimage.pb.go +++ b/contimage/contimage.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.29.1 +// protoc-gen-go v1.30.0 // protoc v3.21.12 // source: proto/contimage/contimage.proto diff --git a/contlcycle/contlcycle.pb.go b/contlcycle/contlcycle.pb.go index 00040b9d..035d6221 100644 --- a/contlcycle/contlcycle.pb.go +++ b/contlcycle/contlcycle.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.29.1 +// protoc-gen-go v1.30.0 // protoc v3.21.12 // source: proto/contlcycle/contlcycle.proto @@ -386,8 +386,9 @@ type PodEvent struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - PodUID string `protobuf:"bytes,1,opt,name=podUID,proto3" json:"podUID,omitempty"` // podUID contains the pod UID - Source string `protobuf:"bytes,2,opt,name=source,proto3" json:"source,omitempty"` // source contains the pod source (kubelet) + PodUID string `protobuf:"bytes,1,opt,name=podUID,proto3" json:"podUID,omitempty"` // podUID contains the pod UID + Source string `protobuf:"bytes,2,opt,name=source,proto3" json:"source,omitempty"` // source contains the pod source (kubelet) + ExitTimestamp *int64 `protobuf:"varint,3,opt,name=exitTimestamp,proto3,oneof" json:"exitTimestamp,omitempty"` // exitTimestamp contains the exit timestamp of the pod } func (x *PodEvent) Reset() { @@ -436,6 +437,13 @@ func (x *PodEvent) GetSource() string { return "" } +func (x *PodEvent) GetExitTimestamp() int64 { + if x != nil && x.ExitTimestamp != nil { + return *x.ExitTimestamp + } + return 0 +} + var File_proto_contlcycle_contlcycle_proto protoreflect.FileDescriptor var file_proto_contlcycle_contlcycle_proto_rawDesc = []byte{ @@ -483,14 +491,18 @@ var file_proto_contlcycle_contlcycle_proto_rawDesc = []byte{ 0x69, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x12, 0x0a, 0x10, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x45, 0x78, 0x69, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x42, 0x17, 0x0a, 0x15, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x45, 0x78, 0x69, 0x74, 0x54, - 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x3a, 0x0a, 0x08, 0x50, 0x6f, 0x64, 0x45, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x77, 0x0a, 0x08, 0x50, 0x6f, 0x64, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x6f, 0x64, 0x55, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x6f, 0x64, 0x55, 0x49, 0x44, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x42, 0x30, 0x5a, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x44, 0x61, 0x74, 0x61, 0x44, 0x6f, 0x67, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, - 0x2d, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x2f, 0x76, 0x35, 0x2f, 0x63, 0x6f, 0x6e, 0x74, - 0x6c, 0x63, 0x79, 0x63, 0x6c, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x75, 0x72, 0x63, 0x65, 0x12, 0x29, 0x0a, 0x0d, 0x65, 0x78, 0x69, 0x74, 0x54, 0x69, 0x6d, 0x65, + 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x0d, 0x65, + 0x78, 0x69, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x88, 0x01, 0x01, 0x42, + 0x10, 0x0a, 0x0e, 0x5f, 0x65, 0x78, 0x69, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x42, 0x30, 0x5a, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x44, 0x61, 0x74, 0x61, 0x44, 0x6f, 0x67, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2d, 0x70, 0x61, + 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x2f, 0x76, 0x35, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x6c, 0x63, 0x79, + 0x63, 0x6c, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -591,6 +603,7 @@ func file_proto_contlcycle_contlcycle_proto_init() { (*ContainerEvent_ExitCode)(nil), (*ContainerEvent_ExitTimestamp)(nil), } + file_proto_contlcycle_contlcycle_proto_msgTypes[3].OneofWrappers = []interface{}{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/cyclonedx_v1_4/bom-1.4.pb.go b/cyclonedx_v1_4/bom-1.4.pb.go index 5f999bdd..a2acb8e4 100644 --- a/cyclonedx_v1_4/bom-1.4.pb.go +++ b/cyclonedx_v1_4/bom-1.4.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.29.1 +// protoc-gen-go v1.30.0 // protoc v3.21.12 // source: proto/deps/github.com/CycloneDX/specification/schema/bom-1.4.proto diff --git a/proto/contlcycle/contlcycle.proto b/proto/contlcycle/contlcycle.proto index c68b49fa..0f76d706 100644 --- a/proto/contlcycle/contlcycle.proto +++ b/proto/contlcycle/contlcycle.proto @@ -44,4 +44,5 @@ message ContainerEvent { message PodEvent { string podUID = 1; // podUID contains the pod UID string source = 2; // source contains the pod source (kubelet) + optional int64 exitTimestamp = 3; // exitTimestamp contains the exit timestamp of the pod } diff --git a/sbom/sbom.pb.go b/sbom/sbom.pb.go index ff7f55e1..b23fcc63 100644 --- a/sbom/sbom.pb.go +++ b/sbom/sbom.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.29.1 +// protoc-gen-go v1.30.0 // protoc v3.21.12 // source: proto/sbom/sbom.proto