Skip to content

Commit

Permalink
in_kubernetes_events: set default timestamp_key to $lastTimestamp
Browse files Browse the repository at this point in the history
Signed-off-by: ryanohnemus <[email protected]>
  • Loading branch information
ryanohnemus authored and edsiper committed Dec 22, 2023
1 parent ff160ac commit 78e79b7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion plugins/in_kubernetes_events/kubernetes_events.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion plugins/in_kubernetes_events/kubernetes_events_conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 78e79b7

Please sign in to comment.