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
Add support for aws filter plugin #173
Conversation
// The availability zone; for example, "us-east-1a". Default is true. | ||
Az *bool `json:"az,omitempty"` | ||
//The EC2 instance ID.Default is true. | ||
Ec2InstanceId *bool `json:"ec2InstanceId,omitempty"` |
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.
Ec2InstanceId => EC2InstanceID
Ec2InstanceType => EC2InstanceType
PrivateIp => PrivateIP
AmiId => AmiID
AccountId => AccountID
VpcId => VpcID
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.
Thanks, fixed
// +kubebuilder:object:generate:=true | ||
|
||
// The AWS Filter Enriches logs with AWS Metadata. Currently the plugin adds the EC2 instance ID and availability zone to log records. | ||
type Aws struct { |
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.
Aws => AWS
@@ -61,6 +61,8 @@ type FilterItem struct { | |||
Throttle *filter.Throttle `json:"throttle,omitempty"` | |||
// RewriteTag defines a RewriteTag configuration. | |||
RewriteTag *filter.RewriteTag `json:"rewriteTag,omitempty"` | |||
//Aws defines a Aws configuration. | |||
Aws *filter.Aws `json:"aws,omitempty"` |
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.
Aws => AWS
// The availability zone; for example, "us-east-1a". Default is true. | ||
Az *bool `json:"az,omitempty"` | ||
//The EC2 instance ID.Default is true. | ||
EC2InstanceID *bool `json:"ec2InstanceId,omitempty"` |
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.
ec2InstanceId => ec2InstanceID
privateIp => privateIP
amiId => amiID
accountId => accountID
vpcId => vpcID
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.
Sorry, I overlooked that
// +kubebuilder:validation:Enum:=v1;v2 | ||
ImdsVersion string `json:"imdsVersion,omitempty"` | ||
// The availability zone; for example, "us-east-1a". Default is true. | ||
Az *bool `json:"az,omitempty"` |
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.
Az could be changed to AZ too
Signed-off-by: chengdehao <dehaocheng@yunify.com>
What this PR dose?
Adds support for https://docs.fluentbit.io/manual/pipeline/filters/aws-metadata filter plugin
Why we need it?
Fluentbit supports a variety of plug-ins, but not all fluentbit-operator adaptations. More plug-ins will be supported in the future, see the fields supported by the Filter plug-in
The final results
The configuration is written to secret
Signed-off-by: chengdehao dehaocheng@yunify.com