Skip to content

Commit 78e79b7

Browse files
ryanohnemusedsiper
authored andcommitted
in_kubernetes_events: set default timestamp_key to $lastTimestamp
Signed-off-by: ryanohnemus <[email protected]>
1 parent ff160ac commit 78e79b7

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

plugins/in_kubernetes_events/kubernetes_events.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -892,7 +892,7 @@ static struct flb_config_map config_map[] = {
892892
{
893893
FLB_CONFIG_MAP_STR, "timestamp_key", K8S_EVENTS_RA_TIMESTAMP,
894894
0, FLB_TRUE, offsetof(struct k8s_events, timestamp_key),
895-
"Record accessor for the timestamp from the event. Default is $metadata['creationTimestamp']."
895+
"Record accessor for the timestamp from the event. Default is $lastTimestamp."
896896
},
897897

898898
#ifdef FLB_HAVE_SQLDB

plugins/in_kubernetes_events/kubernetes_events_conf.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
#define K8S_EVENTS_KUBE_TOKEN "/var/run/secrets/kubernetes.io/serviceaccount/token"
3939
#define K8S_EVENTS_KUBE_CA "/var/run/secrets/kubernetes.io/serviceaccount/ca.crt"
4040

41-
#define K8S_EVENTS_RA_TIMESTAMP "$metadata['creationTimestamp']"
41+
#define K8S_EVENTS_RA_TIMESTAMP "$lastTimestamp"
4242
#define K8S_EVENTS_RA_RESOURCE_VERSION "$metadata['resourceVersion']"
4343

4444
struct k8s_events *k8s_events_conf_create(struct flb_input_instance *ins);

0 commit comments

Comments
 (0)