feat: support seeding default superuser via application.properties #565
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
implementedseedDefaultSuperuser
Removed obsolete
pulsar-manager.account
Verifying this change
./gradlew build
checks.