feat(kafka topic): add topic commands#309
Conversation
|
CC @dlabaj - Enda is doing some mocking for the server. It is worth to collaborate on this |
d414799 to
6f4287d
Compare
|
@dlabaj in case you were interested - I have written some mock handlers from Strimzi API mock here |
ba4afa3 to
dcd56e5
Compare
|
|
|
Sorry, need to add a confirmation dialogue for deleting a topic. |
|
Ready for review again. |
mas-mock/src/index.js
Outdated
| // start server | ||
| app.listen(8000, () => console.info("api listening at http://localhost:8000")); | ||
| strimziApiServer.use((req, res) => topicAPI.handleRequest(req, req, res)) | ||
| .listen(8001, () => console.info("Strimzi Admin API listening at http://localhost:8001")) No newline at end of file |
There was a problem hiding this comment.
How this works? 2 diffrent ports
There was a problem hiding this comment.
I decided to hard-code the URL to the API for now as I could not get any of the solutions we discussed to work. This is why this PR should not be merged until the data plane API goes live.
There was a problem hiding this comment.
Right. Any reason to not combine those API or use different middlewares?
There was a problem hiding this comment.
I could not resolve the path issue we were chatting about the other day and it was blocking me from proceeding with the topic commands work.
There was a problem hiding this comment.
SO this will be resolved when merging or will requires some extra changes in code to test?
Let's sync tomorrow on this (short call)
There was a problem hiding this comment.
IMO this PR should not be merged until the API is available on staging because the current topic commands work (somewhat) and are useful to test connecting to the data plane. The new commands only work with a mock environment. Once the API is ready code will be adjusted with original API base url.
If I get time I can try and resolve the URL issue but i have other priorities too and do not want to spend too long on it.
9e60f74 to
3068e3b
Compare
3068e3b to
add742a
Compare
|
Verified with the mock |
7e8239d to
78ddc11
Compare
|
Updated guides |
7655765 to
104cc25
Compare
104cc25 to
4aabb15
Compare
cd02870 to
8f6d7da
Compare
|
This is now at 109 files..needs to be merged as keeping it up to date with master is a huge burden. Disabling the topics commands on master. |
This PR contains changes related to
kafka topicsubcommands.This is a work in progress branch that should not get merged until the data plane UI server is live on api.stage.openshift.com.
Running this branch
This branch uses a mocked server hosting in-memory topics. To run the mock server run
make mock-api/start. You can see the results API data at http://localhost:8001/topics.Now you can run
rhoas kafka topic listetc.Tasks
KeycloakConnectionEpic Stories
I want create a topic, defining its name and , optionally number of partitions , replication factor and message retention
Run
rhoas kafka topic create topic-4 --partitions 2 --replicas 1 --retention-ms -1to set a custom partition count. The default value is 1.update the number of partitions configuration of my topic
You can pass
--partitionsto update the number of partitions. The partition number cannot be decreased.Example:
rhoas kafka topic update topic-4 --replicas 3I wan to update the topic replication factor
rhoas kafka topic update topic-4 --replicas 3update the topic message retention
rhoas kafka topic update topic-4 --retention-ms -1delete an existing topic from my Kafka cluster, including all its messages
rhoas kafka topic delete topic-4describe a topic and see the detailed configuration of my Kafka topic
rhoas kafka topic topic-4 describe