-
Notifications
You must be signed in to change notification settings - Fork 0
filter_aws: Adds resource entity to PLE calls in cloudwatch logs plugin for dataplane and host logs #7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 1.9.10
Are you sure you want to change the base?
Conversation
In the entity, Type should be |
} | ||
|
||
/* Create an Upstream context */ | ||
ctx->kubernetes_upstream = flb_upstream_create(config, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any scenario where we don't need TLS to communicate with Kubernetes API server? I see the original code uses TCP instead of TLS connection as default so just curious:
int io_type = FLB_IO_TCP; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Though the default is TCP, in the code, we have the below definitions for k8s API server info
/* Kubernetes API server info */
#define FLB_API_HOST "kubernetes.default.svc"
#define FLB_API_PORT 443
#define FLB_API_TLS FLB_TRUE
FLB_API_TLS is true in this case, for which we used the FLB_IO_TLS flag in creating the upstream
…luent-bit into cloudwatch-dp
@@ -165,6 +190,12 @@ static int cb_aws_init(struct flb_filter_instance *f_ins, | |||
/* Remove async flag from upstream */ | |||
ctx->ec2_upstream->flags &= ~(FLB_IO_ASYNC); | |||
|
|||
/*Create kubernetes upstream to query k8s api to define the platform type*/ | |||
if (ctx->enable_entity && strncmp(ctx->entity_type, FLB_FILTER_ENTITY_TYPE_RESOURCE, FLB_FILTER_ENTITY_TYPE_RESOURCE_LEN) == 0) { | |||
create_kubernetes_upstream(ctx, config); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is the enable_entity
flag only applicable to kubernetes? What would happen here if someone enabled this flag and are not using kubernetes?
Enter
[N/A]
in the box, if an item is not applicable to your change.Testing
Before we can approve your change; please submit the following in a comment:
For Dataplane logs on EKS cluster
Verifying entity by calling ListEntitiesForLogGroup
Log event on cloudwatch console
For Host logs in EKS cluster
Verifying entity by calling ListEntitiesForLogGroup
Log event on cloudwatch console
For cloudwatch logs output plugin: flb-rt-out_cloudwatch
If this is a change to packaging of containers or native binaries then please confirm it works for all targets.
ok-package-test
label to test for all targets (requires maintainer to do).Documentation
Backporting
Fluent Bit is licensed under Apache 2.0, by submitting this pull request I understand that this code will be released under the terms of that license.