Add support for BookKeeper indexDirectories configuration #645
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.
Motivation
When running BookKeeper with
DbLedgerStorage, RocksDB index placement (indexDirectories) can have a significant impact on IO behavior and tail latency. The current Helm chart does not provide first-class support for configuringindexDirectoriesor mounting a dedicated volume for it, so index and ledger data often end up sharing the same storage unless users manually customize templates, increasing operational overhead and limiting performance tuning.Modifications
pulsar.bookkeeper.indexDirectorieshelper that supports bothstringandstring[], and defaults tobookkeeper.volumes.index.mountPathwhen an index volume is enabled and no explicit value is provided.indexDirectoriesinto the rendered BookKeeper configuration when applicable (also settingPULSAR_PREFIX_indexDirectories).mkdir -pfor all configuredindexDirectoriespaths to ensure they exist at runtime.bookkeeper.volumes.indexvolume for a dedicated index mount, including PVC/volumeClaimTemplates support and StorageClass generation when needed.values.yamlwith documentation and examples forbookkeeper.volumes.indexandbookkeeper.indexDirectories.Verifying this change