pulsar-manager icon indicating copy to clipboard operation
pulsar-manager copied to clipboard

feat: support seeding default superuser via application.properties

Open maranmaran opened this issue 1 year ago • 1 comments

Fixes #563

Motivation

I'm working on integrating apache pulsar into .NET Aspire Next to pulsar I wish to deliver a management UI, pulsar manager. Like Kafka and Rabbit do.

Here's my implementation

Right now, in order for me to seed default superuser, I must do this gymnastics of waiting for container and backend to be ready then acquire token, then issue put request.

This is clumsy a little and there should be a way to provide some default superuser via configuration. Like rabbit does, SQL, bunch of other tools.

In particular I'm afraid that Aspire team won't accept a solution like this one

Where I subscribe lifecycle hooks of container and then retry loop till I seed the user. It works, but it feels too "hacky"

Modifications

In PulsarApplicationListener implemented seedDefaultSuperuser Removed obsolete pulsar-manager.account

Verifying this change

  • [x] Make sure that the change passes the ./gradlew build checks.

maranmaran avatar May 03 '24 15:05 maranmaran

👋 👋 @lhotari Hey man, some tiny hiccups, I just adjusted my IDE and am good to go. The build and tests should be okay now (./gradlew build ✅ ).

I have another branch ready to update docs about this change.

Additionally, I have experienced this https://github.com/apache/pulsar-manager/issues/567 and I can't run the backend. I have some proposal fix for it. Would you be so kind and just put some 👀 on the GH issue?

maranmaran avatar May 03 '24 20:05 maranmaran