From 17c2ca2c382362216a0bfa74c6bd1bdd1d16ba54 Mon Sep 17 00:00:00 2001 From: ryanohnemus Date: Thu, 21 Dec 2023 17:00:14 -0600 Subject: [PATCH] in_kubernetes_events: set default timestamp_key to lastTimestamp Signed-off-by: ryanohnemus --- plugins/in_kubernetes_events/kubernetes_events.c | 2 +- plugins/in_kubernetes_events/kubernetes_events_conf.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/in_kubernetes_events/kubernetes_events.c b/plugins/in_kubernetes_events/kubernetes_events.c index 2be73a68aed..aba69de4666 100644 --- a/plugins/in_kubernetes_events/kubernetes_events.c +++ b/plugins/in_kubernetes_events/kubernetes_events.c @@ -892,7 +892,7 @@ static struct flb_config_map config_map[] = { { FLB_CONFIG_MAP_STR, "timestamp_key", K8S_EVENTS_RA_TIMESTAMP, 0, FLB_TRUE, offsetof(struct k8s_events, timestamp_key), - "Record accessor for the timestamp from the event. Default is $metadata['creationTimestamp']." + "Record accessor for the timestamp from the event. Default is lastTimestamp." }, #ifdef FLB_HAVE_SQLDB diff --git a/plugins/in_kubernetes_events/kubernetes_events_conf.h b/plugins/in_kubernetes_events/kubernetes_events_conf.h index 9d6b54197f1..c5a95b48914 100644 --- a/plugins/in_kubernetes_events/kubernetes_events_conf.h +++ b/plugins/in_kubernetes_events/kubernetes_events_conf.h @@ -38,7 +38,7 @@ #define K8S_EVENTS_KUBE_TOKEN "/var/run/secrets/kubernetes.io/serviceaccount/token" #define K8S_EVENTS_KUBE_CA "/var/run/secrets/kubernetes.io/serviceaccount/ca.crt" -#define K8S_EVENTS_RA_TIMESTAMP "$metadata['creationTimestamp']" +#define K8S_EVENTS_RA_TIMESTAMP "lastTimestamp" #define K8S_EVENTS_RA_RESOURCE_VERSION "$metadata['resourceVersion']" struct k8s_events *k8s_events_conf_create(struct flb_input_instance *ins);