Skip to content

Commit 79074f2

Browse files
committed
feat: Print timestamp_nanos in hexadecimal
Following the same pattern than the go-client.
1 parent bebbb10 commit 79074f2

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

kube-runtime/src/events.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,9 @@ pub enum EventType {
7474
Warning,
7575
}
7676

77-
/// ObjectReference with Hash and Eq implementations
77+
/// [`ObjectReference`] with Hash and Eq implementations
78+
///
79+
/// [`ObjectReference`]: k8s_openapi::api::core::v1::ObjectReference
7880
#[derive(Clone, Debug, PartialEq)]
7981
pub struct Reference(ObjectReference);
8082

@@ -265,7 +267,7 @@ impl Recorder {
265267
metadata: ObjectMeta {
266268
namespace: reference.namespace.clone(),
267269
name: Some(format!(
268-
"{}.{}",
270+
"{}.{:x}",
269271
reference.name.as_ref().unwrap_or(&self.reporter.controller),
270272
now.timestamp_nanos_opt().unwrap_or_else(|| now.timestamp())
271273
)),

0 commit comments

Comments
 (0)