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

Karapace router #482

Merged
merged 1 commit into from
Aug 2, 2024
Merged

Karapace router #482

merged 1 commit into from
Aug 2, 2024

Conversation

EandrewJones
Copy link
Contributor

Problem

We need to switch branches in order to make UserALE conform with TAP's Karapace Kafka proxy. This is inconvenient.

Solution

This PR adds a expressJS proxy server to the example folder that transforms the payload to conform to the expected Karapace Kafka proxy payload and will forward the payload to a user-supplied payload.

I multiplexed the existing example server docker container so that it can launch whichever node server the user specifies at runtime. Users can also pass additional arguments to the entrypoint script.

Example on how to launch the proxy:

docker build -t <image-tag-name> .
docker run \
-p 8000:8000 \
userale-test:latest example/karapace-router.js -f http://localhost:2727 -v 

The -f flag is where the user specifies the upstream url for the Karapace proxy, -v triggers verbose logs, -p specifies the port which defaults to 8000.

@EandrewJones EandrewJones requested a review from Jyyjy July 30, 2024 21:18
example/karapace-router.js Outdated Show resolved Hide resolved
Dockerfile Outdated Show resolved Hide resolved
@EandrewJones EandrewJones merged commit c46dc52 into master Aug 2, 2024
4 checks passed
@Jyyjy Jyyjy deleted the karapace-router branch August 12, 2024 01:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants