-
Notifications
You must be signed in to change notification settings - Fork 41
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
feat: Return Kafka admin server URL in kas-fleet-manager Kafka Resource. #1026
feat: Return Kafka admin server URL in kas-fleet-manager Kafka Resource. #1026
Conversation
openapi/kas-fleet-manager.yaml
Outdated
@@ -1660,6 +1663,7 @@ components: | |||
owner: "api_kafka_service" | |||
name: "serviceapi" | |||
bootstrap_server_host: "serviceapi-1isy6rq3jki8q0otmjqfd3ocfrg.apps.mk-bttg0jn170hp.x5u8.s1.devshift.org" | |||
admin_api_server_url: "admin-server-mk-e-e-e-e-c---{}ld{-}-n-vp--bltg.bf2.kafka-stage.rhcloud.com" |
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.
admin_api_server_url: "admin-server-mk-e-e-e-e-c---{}ld{-}-n-vp--bltg.bf2.kafka-stage.rhcloud.com" | |
admin_api_server_url: "https://admin-server-mk-e-e-e-e-c---{}ld{-}-n-vp--bltg.rhcloud.com" |
openapi/kas-fleet-manager.yaml
Outdated
@@ -1685,6 +1689,7 @@ components: | |||
owner: "api_kafka_service" | |||
name: "serviceapi" | |||
bootstrap_server_host: "serviceapi-1isy6rq3jki8q0otmjqfd3ocfrg.apps.mk-bttg0jn170hp.x5u8.s1.devshift.org" | |||
admin_api_server_url: "admin-server-mk-e-e-e-e-c---{}ld{-}-n-vp--bltg.bf2.kafka-stage.rhcloud.com" |
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.
admin_api_server_url: "admin-server-mk-e-e-e-e-c---{}ld{-}-n-vp--bltg.bf2.kafka-stage.rhcloud.com" | |
admin_api_server_url: "https://admin-server-mk-e-e-e-e-c---{}ld{-}-n-vp--bltg.bf2.rhcloud.com" |
endpoint: | ||
type: object | ||
properties: | ||
adminServerURI: | ||
type: string |
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.
@VanillaSpoon why the endpoint
object? I was expecting something similar to
endpoint: | |
type: object | |
properties: | |
adminServerURI: | |
type: string | |
adminServerURI: | |
type: string |
internal/kafka/internal/migrations/202205061532_add_admin_api_server_url.go
Outdated
Show resolved
Hide resolved
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 @VanillaSpoon, this is really great work.
I've left a couple of comments in line with each code change.
I also think we could add an integration test
And also perform a verification against a real OpenShift cluster.
40c368e
to
82e3e7b
Compare
eeed6c1
to
9b16e39
Compare
9b16e39
to
ec3cdf2
Compare
ec3cdf2
to
0dbce58
Compare
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.
Great work on this @VanillaSpoon!
Because the admin_api_server_url
is not required, if it's empty, this field isn't going to be included in the response. Once the kafka is in a ready
state, only then it will appear in the response. Might be good to confirm this behaviour with UI/CLI team
Other than that, looks good to me 👍
/cc @wtrocki @riccardo-forina FYI |
Thank you for looping me in @machi1990. I think we are good with this, we show skeleton loaders for the connection details panel for a pending Kafka instance. Not getting the field should be ok. |
This doesnt matter for consumers. Consumers will not rely on responses but rather on sdk objects where this field is always present but can be empty |
Thanks for the great work @VanillaSpoon |
Description
Return Admin Server URL as it is currently being manually constructed
MGDSTRM-8163
Note:
The Admin Server URL will only be returned when a kafka is in a
ready
status.Verification Steps
To get the kafka information,you may run:
curl -v -XGET -H "Authorization: Bearer $(ocm token)" http://localhost:8000/api/kafkas_mgmt/v1/kafkas/<kafkaID> | jq
Once
"status": "ready",
your output should look like this:Note:
This is the URL we have returned:
+ "admin_api_server_url": "http://admin-server-serviceapi-ca-ao-f--honsptlr-mg.kas.egallina-kfm.qgrd.s1.devshift.org/",
Check the Database:
You may also check that the url has been added to the database in the kafka_requests table as
admin_api_server_url
make db/login
.select admin_api_server_url from kafka_requests;
Your output should look as follows:
Checklist (Definition of Done)