Skip to content
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

kafka: refactor kafka to use another library #139

Merged
merged 1 commit into from
Dec 12, 2020

Conversation

cpanato
Copy link
Member

@cpanato cpanato commented Dec 11, 2020

What type of PR is this?
/kind cleanup

Any specific area of the project related to this PR?
/area outputs

What this PR does / why we need it:

  • Refactor the kafka output to use another go library that does not need to have a C lib installed in the host.
  • Update dockerfile to remove the lib dependency
  • add missing stats

Tested, in the log below is a container that can consume messages

root@kafka:/# curl -X POST localhost:2801/test

root@kafka:/# kafka-console-consumer --bootstrap-server localhost:9092 --from-beginning --topic to-do-list --property "print.key=true"
null    {"output":"This is a test from falcosidekick","priority":"Debug","rule":"Test rule","time":"2020-12-11T13:13:40Z","output_fields":null}

Which issue(s) this PR fixes:

Fixes #137

Special notes for your reviewer:

/assign @Issif

@poiana
Copy link

poiana commented Dec 11, 2020

@cpanato: The label(s) area/outputs cannot be applied, because the repository doesn't have them

In response to this:

What type of PR is this?
/kind cleanup

Any specific area of the project related to this PR?
/area outputs

What this PR does / why we need it:

  • Refactor the kafka output to use another go library that does not need to have a C lib installed in the host.
  • Update dockerfile to remove the lib dependency
  • add missing stats

Tested, in the log below is a container that can consume messages

root@kafka:/# curl -X POST localhost:2801/test

root@kafka:/# kafka-console-consumer --bootstrap-server localhost:9092 --from-beginning --topic to-do-list --property "print.key=true"
null    {"output":"This is a test from falcosidekick","priority":"Debug","rule":"Test rule","time":"2020-12-11T13:13:40Z","output_fields":null}

Which issue(s) this PR fixes:

Fixes #137

Special notes for your reviewer:

/assign @Issif

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

config_example.yaml Outdated Show resolved Hide resolved
outputs/kafka.go Outdated Show resolved Hide resolved
types/types.go Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
@cpanato cpanato requested a review from Issif December 12, 2020 14:10
@Issif Issif modified the milestones: 2., 2.20.0 Dec 12, 2020
Copy link
Member

@Issif Issif left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@poiana poiana added the lgtm label Dec 12, 2020
@poiana
Copy link

poiana commented Dec 12, 2020

LGTM label has been added.

Git tree hash: 73276ec94dac408116f02ffa82d1db94ad30d9e9

@poiana
Copy link

poiana commented Dec 12, 2020

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Issif

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@poiana poiana merged commit dc75be3 into falcosecurity:master Dec 12, 2020
@cpanato cpanato deleted the refactor-kafka branch December 12, 2020 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

replace https://github.com/confluentinc/confluent-kafka-go
3 participants