Skip to content

Commit

Permalink
fix cache for namespace meta
Browse files Browse the repository at this point in the history
Signed-off-by: ryanohnemus <[email protected]>
  • Loading branch information
ryanohnemus committed Feb 9, 2024
1 parent 085bddd commit ee8b176
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion plugins/filter_kubernetes/kube_conf.c
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ struct flb_kube *flb_kube_conf_create(struct flb_filter_instance *ins,
FLB_HASH_TABLE_SIZE);
}

if (ctx->kube_meta_cache_ttl > 0) {
if (ctx->kube_meta_namespace_cache_ttl > 0) {
ctx->namespace_hash_table = flb_hash_table_create_with_ttl(
ctx->kube_meta_namespace_cache_ttl,
FLB_HASH_TABLE_EVICT_OLDER,
Expand Down
6 changes: 3 additions & 3 deletions plugins/filter_kubernetes/kubernetes.c
Original file line number Diff line number Diff line change
Expand Up @@ -1040,11 +1040,11 @@ static struct flb_config_map config_map[] = {
"which have been created more than 60s will be evicted"
},
{
FLB_CONFIG_MAP_TIME, "kube_meta_namespace_cache_ttl", "900",
FLB_CONFIG_MAP_TIME, "kube_meta_namespace_cache_ttl", "15m",
0, FLB_TRUE, offsetof(struct flb_kube, kube_meta_namespace_cache_ttl),
"configurable TTL for K8s cached namespace metadata. "
"By default, it is set to 900 and cached entries will be evicted after "
" 900s (15m). Setting this to 0 will disable the cache TTL and "
"By default, it is set to 15m and cached entries will be evicted after 15m."
"Setting this to 0 will disable the cache TTL and "
"will evict entries once the cache reaches capacity."
},
/* EOF */
Expand Down

0 comments on commit ee8b176

Please sign in to comment.