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

Alerting: UI changes required to support v3 and Auth in Kafka Contact Point #61123

Merged
merged 5 commits into from Jan 13, 2023
Merged

Conversation

ghost
Copy link

@ghost ghost commented Jan 8, 2023

What is this feature?

This PR adds the code required to automatically create UI elements to match changes made in this alerting PR: grafana/alerting#28

This adds UI elements to perform the following,

  1. A checkbox to opt for basic auth.
  2. A text field to supply the username
  3. A dropdown to select a way to supply the password: The password can be entered in the UI or be supplied a file on the grafana server.
  4. A dropdown to select the API version to use when publishing kafka messages.

Why do we need this feature?

  1. Using this feature without auth is fine in simple projects but doesn't really work in larger companies.
  2. The existing Kafka Contact Point only supported v2 APIs. While this was fine till now - newer systems are moving towards v3. Confluent is already only deploying v3 APIs for their Kafka Cloud Clusters.

Who is this feature for?

Anyone using the Kafka REST Contact Point with Grafana.

Which issue(s) does this PR fix?

Fixes #41176

Screenshots

The user can supply a password right here.
Screenshot 2023-01-09 at 12 09 52 AM

Or, they can choose to give a file path,
Screenshot 2023-01-09 at 12 08 58 AM

The user can select the desired API version like this,
Screenshot 2023-01-09 at 12 11 07 AM

References

Corresponding change in grafana/alerting: grafana/alerting#28

Need help with

  1. How do I make sure that this and the corresponding alerting changes go in together? If one goes in without the other, things might break. Do I wait for the alerting change to merge and then update the go.mod file to pick a newer version of the alerting package? Or is this somehow handled automatically?

@ghost ghost self-requested a review January 8, 2023 18:54
@CLAassistant
Copy link

CLAassistant commented Jan 8, 2023

CLA assistant check
All committers have signed the CLA.

@ghost
Copy link
Author

ghost commented Jan 9, 2023

Given #60655, I am assuming that the earliest release this change can only go into is 9.4. Is that correct?

@ghost ghost changed the title [Draft] Alerting: UI changes required to support v3 and Auth in Kafka Contact Point Alerting: UI changes required to support v3 and Auth in Kafka Contact Point Jan 10, 2023
@ghost
Copy link
Author

ghost commented Jan 10, 2023

Can someone help me add 9.4 as the milestone for this please? Doesn't look like I have the permissions to do so.

@ghost
Copy link
Author

ghost commented Jan 12, 2023

Post comments, final UI looks like this,
Screenshot 2023-01-13 at 2 17 57 AM

@yuri-tceretian yuri-tceretian added this to the 9.4.0 milestone Jan 13, 2023
@yuri-tceretian
Copy link
Contributor

@MohammadGhazanfar, I updated Grafana to import changes from your PR grafana/alerting#28.

Copy link
Contributor

@yuri-tceretian yuri-tceretian left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks for contributing!

@ghost
Copy link
Author

ghost commented Jan 13, 2023

Here's the latest UI,
Screenshot 2023-01-14 at 1 49 05 AM

@yuri-tceretian yuri-tceretian merged commit d553a01 into grafana:main Jan 13, 2023
@yuri-tceretian
Copy link
Contributor

Tested:

  • V3 mode with Kafka Rest Proxy.
  • V2 mode with config created prior this change and after

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
add to changelog area/backend no-backport Skip backport of PR pr/external This PR is from external contributor
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Kafka REST Proxy authentication
5 participants