filter_kubernetes: set context before meta initialization
@@ -48,6 +48,9 @@ static int cb_kube_init(struct flb_filter_instance *f_ins,
return -1;
}
+ /* Set context */
+ flb_filter_set_context(f_ins, ctx);
+
/*
* Get Kubernetes Metadata: we gather this at the beginning
* as we need this information to process logs in Kubernetes
@@ -55,9 +58,6 @@ static int cb_kube_init(struct flb_filter_instance *f_ins,
*/
flb_kube_meta_init(ctx, config);
- /* Set context */
- flb_filter_set_context(f_ins, ctx);
-
return 0;
}
