[Issue:5687] Add prefix for new keys from Env (#5790)

Signed-off-by: xiaolong.ran <rxl@apache.org>

Fixes #5687 

### Motivation

When the user wants to add new keys for Env, adding fails if no prefix is added. 

Currently, add new keys for Env use the script of [apply-config-from-env.py](https://github.com/apache/pulsar/commits/master/docker/pulsar/scripts/apply-config-from-env.py), to ensure that the env set by the user can take effect, add the prefix(**PULSAR_PREFIX_**) for all keys.

### Modifications

- Add prefix for new keys from Env
This commit is contained in:
冉小龙 2019-12-06 18:07:08 +08:00 committed by Jia Zhai
parent 298f63483c
commit 76b45b46a2
2 changed files with 21 additions and 21 deletions

View File

@ -143,11 +143,11 @@ bookkeeper:
## ##
configData: configData:
PULSAR_MEM: "\"-Xms128m -Xmx256m -XX:MaxDirectMemorySize=128m -Dio.netty.leakDetectionLevel=disabled -Dio.netty.recycler.linkCapacity=1024 -XX:+UseG1GC -XX:MaxGCPauseMillis=10 -XX:+ParallelRefProcEnabled -XX:+UnlockExperimentalVMOptions -XX:+AggressiveOpts -XX:+DoEscapeAnalysis -XX:ParallelGCThreads=32 -XX:ConcGCThreads=32 -XX:G1NewSizePercent=50 -XX:+DisableExplicitGC -XX:-ResizePLAB -XX:+ExitOnOutOfMemoryError -XX:+PerfDisableSharedMem -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCApplicationStoppedTime -XX:+PrintHeapAtGC -verbosegc -XX:G1LogLevel=finest\"" PULSAR_MEM: "\"-Xms128m -Xmx256m -XX:MaxDirectMemorySize=128m -Dio.netty.leakDetectionLevel=disabled -Dio.netty.recycler.linkCapacity=1024 -XX:+UseG1GC -XX:MaxGCPauseMillis=10 -XX:+ParallelRefProcEnabled -XX:+UnlockExperimentalVMOptions -XX:+AggressiveOpts -XX:+DoEscapeAnalysis -XX:ParallelGCThreads=32 -XX:ConcGCThreads=32 -XX:G1NewSizePercent=50 -XX:+DisableExplicitGC -XX:-ResizePLAB -XX:+ExitOnOutOfMemoryError -XX:+PerfDisableSharedMem -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCApplicationStoppedTime -XX:+PrintHeapAtGC -verbosegc -XX:G1LogLevel=finest\""
dbStorage_writeCacheMaxSizeMb: "32" PULSAR_PREFIX_dbStorage_writeCacheMaxSizeMb: "32"
dbStorage_readAheadCacheMaxSizeMb: "32" PULSAR_PREFIX_dbStorage_readAheadCacheMaxSizeMb: "32"
journalMaxSizeMB: "2048" PULSAR_PREFIX_journalMaxSizeMB: "2048"
statsProviderClass: org.apache.bookkeeper.stats.prometheus.PrometheusMetricsProvider PULSAR_PREFIX_statsProviderClass: org.apache.bookkeeper.stats.prometheus.PrometheusMetricsProvider
useHostNameAsBookieID: "true" PULSAR_PREFIX_useHostNameAsBookieID: "true"
## Bookkeeper configmap ## Bookkeeper configmap
## templates/bookkeeper-service.yaml ## templates/bookkeeper-service.yaml
## ##
@ -187,11 +187,11 @@ broker:
configData: configData:
PULSAR_MEM: "\"-Xms128m -Xmx256m -XX:MaxDirectMemorySize=128m -Dio.netty.leakDetectionLevel=disabled -Dio.netty.recycler.linkCapacity=1024 -XX:+ParallelRefProcEnabled -XX:+UnlockExperimentalVMOptions -XX:+AggressiveOpts -XX:+DoEscapeAnalysis -XX:ParallelGCThreads=32 -XX:ConcGCThreads=32 -XX:G1NewSizePercent=50 -XX:+DisableExplicitGC -XX:-ResizePLAB -XX:+ExitOnOutOfMemoryError -XX:+PerfDisableSharedMem\"" PULSAR_MEM: "\"-Xms128m -Xmx256m -XX:MaxDirectMemorySize=128m -Dio.netty.leakDetectionLevel=disabled -Dio.netty.recycler.linkCapacity=1024 -XX:+ParallelRefProcEnabled -XX:+UnlockExperimentalVMOptions -XX:+AggressiveOpts -XX:+DoEscapeAnalysis -XX:ParallelGCThreads=32 -XX:ConcGCThreads=32 -XX:G1NewSizePercent=50 -XX:+DisableExplicitGC -XX:-ResizePLAB -XX:+ExitOnOutOfMemoryError -XX:+PerfDisableSharedMem\""
PULSAR_GC: "\"-XX:+UseG1GC -XX:MaxGCPauseMillis=10\"" PULSAR_GC: "\"-XX:+UseG1GC -XX:MaxGCPauseMillis=10\""
managedLedgerDefaultEnsembleSize: "2" PULSAR_PREFIX_managedLedgerDefaultEnsembleSize: "2"
managedLedgerDefaultWriteQuorum: "2" PULSAR_PREFIX_managedLedgerDefaultWriteQuorum: "2"
managedLedgerDefaultAckQuorum: "2" PULSAR_PREFIX_managedLedgerDefaultAckQuorum: "2"
deduplicationEnabled: "false" PULSAR_PREFIX_deduplicationEnabled: "false"
exposeTopicLevelMetricsInPrometheus: "true" PULSAR_PREFIX_exposeTopicLevelMetricsInPrometheus: "true"
## Broker service ## Broker service
## templates/broker-service.yaml ## templates/broker-service.yaml
## ##

View File

@ -164,12 +164,12 @@ bookkeeper:
## ##
configData: configData:
PULSAR_MEM: "\"-Xms15g -Xmx15g -XX:MaxDirectMemorySize=15g -Dio.netty.leakDetectionLevel=disabled -Dio.netty.recycler.linkCapacity=1024 -XX:+UseG1GC -XX:MaxGCPauseMillis=10 -XX:+ParallelRefProcEnabled -XX:+UnlockExperimentalVMOptions -XX:+AggressiveOpts -XX:+DoEscapeAnalysis -XX:ParallelGCThreads=32 -XX:ConcGCThreads=32 -XX:G1NewSizePercent=50 -XX:+DisableExplicitGC -XX:-ResizePLAB -XX:+ExitOnOutOfMemoryError -XX:+PerfDisableSharedMem -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCApplicationStoppedTime -XX:+PrintHeapAtGC -verbosegc -XX:G1LogLevel=finest\"" PULSAR_MEM: "\"-Xms15g -Xmx15g -XX:MaxDirectMemorySize=15g -Dio.netty.leakDetectionLevel=disabled -Dio.netty.recycler.linkCapacity=1024 -XX:+UseG1GC -XX:MaxGCPauseMillis=10 -XX:+ParallelRefProcEnabled -XX:+UnlockExperimentalVMOptions -XX:+AggressiveOpts -XX:+DoEscapeAnalysis -XX:ParallelGCThreads=32 -XX:ConcGCThreads=32 -XX:G1NewSizePercent=50 -XX:+DisableExplicitGC -XX:-ResizePLAB -XX:+ExitOnOutOfMemoryError -XX:+PerfDisableSharedMem -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCApplicationStoppedTime -XX:+PrintHeapAtGC -verbosegc -XX:G1LogLevel=finest\""
dbStorage_writeCacheMaxSizeMb: "2048" PULSAR_PREFIX_dbStorage_writeCacheMaxSizeMb: "2048"
dbStorage_readAheadCacheMaxSizeMb: "2048" PULSAR_PREFIX_dbStorage_readAheadCacheMaxSizeMb: "2048"
dbStorage_rocksDB_blockCacheSize: "268435456" PULSAR_PREFIX_dbStorage_rocksDB_blockCacheSize: "268435456"
journalMaxSizeMB: "2048" PULSAR_PREFIX_journalMaxSizeMB: "2048"
statsProviderClass: org.apache.bookkeeper.stats.prometheus.PrometheusMetricsProvider PULSAR_PREFIX_statsProviderClass: org.apache.bookkeeper.stats.prometheus.PrometheusMetricsProvider
useHostNameAsBookieID: "true" PULSAR_PREFIX_useHostNameAsBookieID: "true"
## Bookkeeper configmap ## Bookkeeper configmap
## templates/bookkeeper-service.yaml ## templates/bookkeeper-service.yaml
## ##
@ -209,11 +209,11 @@ broker:
configData: configData:
PULSAR_MEM: "\"-Xms15g -Xmx15g -XX:MaxDirectMemorySize=15g -Dio.netty.leakDetectionLevel=disabled -Dio.netty.recycler.linkCapacity=1024 -XX:+ParallelRefProcEnabled -XX:+UnlockExperimentalVMOptions -XX:+AggressiveOpts -XX:+DoEscapeAnalysis -XX:ParallelGCThreads=32 -XX:ConcGCThreads=32 -XX:G1NewSizePercent=50 -XX:+DisableExplicitGC -XX:-ResizePLAB -XX:+ExitOnOutOfMemoryError -XX:+PerfDisableSharedMem\"" PULSAR_MEM: "\"-Xms15g -Xmx15g -XX:MaxDirectMemorySize=15g -Dio.netty.leakDetectionLevel=disabled -Dio.netty.recycler.linkCapacity=1024 -XX:+ParallelRefProcEnabled -XX:+UnlockExperimentalVMOptions -XX:+AggressiveOpts -XX:+DoEscapeAnalysis -XX:ParallelGCThreads=32 -XX:ConcGCThreads=32 -XX:G1NewSizePercent=50 -XX:+DisableExplicitGC -XX:-ResizePLAB -XX:+ExitOnOutOfMemoryError -XX:+PerfDisableSharedMem\""
PULSAR_GC: "\"-XX:+UseG1GC -XX:MaxGCPauseMillis=10\"" PULSAR_GC: "\"-XX:+UseG1GC -XX:MaxGCPauseMillis=10\""
managedLedgerDefaultEnsembleSize: "3" PULSAR_PREFIX_managedLedgerDefaultEnsembleSize: "3"
managedLedgerDefaultWriteQuorum: "3" PULSAR_PREFIX_managedLedgerDefaultWriteQuorum: "3"
managedLedgerDefaultAckQuorum: "2" PULSAR_PREFIX_managedLedgerDefaultAckQuorum: "2"
deduplicationEnabled: "false" PULSAR_PREFIX_deduplicationEnabled: "false"
exposeTopicLevelMetricsInPrometheus: "true" PULSAR_PREFIX_exposeTopicLevelMetricsInPrometheus: "true"
## Broker service ## Broker service
## templates/broker-service.yaml ## templates/broker-service.yaml
## ##