Skip to content

Commit 6f6498f

Browse files
committed
in_kubernetes_events: add support for configuring input upstream network setup
- pass the input net_setup into network_init to reuse configured options - apply flb_input_upstream_set so the upstream inherits the input context
1 parent 4f8c50b commit 6f6498f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

plugins/in_kubernetes_events/kubernetes_events_conf.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,13 @@ static int network_init(struct k8s_events *ctx, struct flb_config *config)
128128
return -1;
129129
}
130130

131+
if (flb_input_upstream_set(ctx->upstream, ctx->ins) != 0) {
132+
flb_plg_error(ctx->ins, "network upstream setup failed");
133+
flb_upstream_destroy(ctx->upstream);
134+
ctx->upstream = NULL;
135+
return -1;
136+
}
137+
131138
return 0;
132139
}
133140

0 commit comments

Comments
 (0)