From cee3b5c5e6dd9edd1e7c584a941f076e5edf5a53 Mon Sep 17 00:00:00 2001 From: Aaron Johnson Date: Wed, 5 Jan 2022 10:26:55 -0600 Subject: [PATCH] added additionalCommand parameter (#150) Co-authored-by: Aaron Johnson --- charts/pulsar/templates/bookkeeper-statefulset.yaml | 3 +++ charts/pulsar/templates/broker-statefulset.yaml | 3 +++ charts/pulsar/templates/proxy-statefulset.yaml | 3 +++ charts/pulsar/templates/toolset-statefulset.yaml | 3 +++ charts/pulsar/templates/zookeeper-statefulset.yaml | 3 +++ charts/pulsar/values.yaml | 10 ++++++++++ 6 files changed, 25 insertions(+) diff --git a/charts/pulsar/templates/bookkeeper-statefulset.yaml b/charts/pulsar/templates/bookkeeper-statefulset.yaml index 9ada5aa..985f00b 100644 --- a/charts/pulsar/templates/bookkeeper-statefulset.yaml +++ b/charts/pulsar/templates/bookkeeper-statefulset.yaml @@ -165,6 +165,9 @@ spec: command: ["sh", "-c"] args: - > + {{- if .Values.bookkeeper.additionalCommand }} + {{ .Values.bookkeeper.additionalCommand }} + {{- end }} bin/apply-config-from-env.py conf/bookkeeper.conf; {{- include "pulsar.bookkeeper.zookeeper.tls.settings" . | nindent 10 }} OPTS="${OPTS} -Dlog4j2.formatMsgNoLookups=true" exec bin/pulsar bookie; diff --git a/charts/pulsar/templates/broker-statefulset.yaml b/charts/pulsar/templates/broker-statefulset.yaml index 3da522a..1b56d95 100644 --- a/charts/pulsar/templates/broker-statefulset.yaml +++ b/charts/pulsar/templates/broker-statefulset.yaml @@ -198,6 +198,9 @@ spec: command: ["sh", "-c"] args: - > + {{- if .Values.broker.additionalCommand }} + {{ .Values.broker.additionalCommand }} + {{- end }} bin/apply-config-from-env.py conf/broker.conf; bin/gen-yml-from-env.py conf/functions_worker.yml; echo "OK" > status; diff --git a/charts/pulsar/templates/proxy-statefulset.yaml b/charts/pulsar/templates/proxy-statefulset.yaml index 41f85de..1dc739b 100644 --- a/charts/pulsar/templates/proxy-statefulset.yaml +++ b/charts/pulsar/templates/proxy-statefulset.yaml @@ -178,6 +178,9 @@ spec: command: ["sh", "-c"] args: - > + {{- if .Values.proxy.additionalCommand }} + {{ .Values.proxy.additionalCommand }} + {{- end }} bin/apply-config-from-env.py conf/proxy.conf && echo "OK" > status && OPTS="${OPTS} -Dlog4j2.formatMsgNoLookups=true" exec bin/pulsar proxy diff --git a/charts/pulsar/templates/toolset-statefulset.yaml b/charts/pulsar/templates/toolset-statefulset.yaml index 8e3b8d5..308e30f 100644 --- a/charts/pulsar/templates/toolset-statefulset.yaml +++ b/charts/pulsar/templates/toolset-statefulset.yaml @@ -70,6 +70,9 @@ spec: command: ["sh", "-c"] args: - > + {{- if .Values.toolset.additionalCommand }} + {{ .Values.toolset.additionalCommand }} + {{- end }} bin/apply-config-from-env.py conf/client.conf; bin/apply-config-from-env.py conf/bookkeeper.conf; {{- include "pulsar.toolset.zookeeper.tls.settings" . | nindent 10 }} diff --git a/charts/pulsar/templates/zookeeper-statefulset.yaml b/charts/pulsar/templates/zookeeper-statefulset.yaml index a94ae87..d2a2bb4 100644 --- a/charts/pulsar/templates/zookeeper-statefulset.yaml +++ b/charts/pulsar/templates/zookeeper-statefulset.yaml @@ -112,6 +112,9 @@ spec: command: ["sh", "-c"] args: - > + {{- if .Values.zookeeper.additionalCommand }} + {{ .Values.zookeeper.additionalCommand }} + {{- end }} bin/apply-config-from-env.py conf/zookeeper.conf; {{- include "pulsar.zookeeper.tls.settings" . | nindent 10 }} bin/generate-zookeeper-config.sh conf/zookeeper.conf; diff --git a/charts/pulsar/values.yaml b/charts/pulsar/values.yaml index a69ccfb..8e3cbdf 100644 --- a/charts/pulsar/values.yaml +++ b/charts/pulsar/values.yaml @@ -390,6 +390,8 @@ zookeeper: -XX:+DoEscapeAnalysis -XX:+DisableExplicitGC -XX:+PerfDisableSharedMem + ## Add a custom command to the start up process of the zookeeper pods (e.g. update-ca-certificates, jvm commands, etc) + additionalCommand: ## Zookeeper service ## templates/zookeeper-service.yaml ## @@ -551,6 +553,8 @@ bookkeeper: dbStorage_readAheadCacheMaxSizeMb: "32" dbStorage_rocksDB_writeBufferSizeMB: "8" dbStorage_rocksDB_blockCacheSize: "8388608" + ## Add a custom command to the start up process of the bookie pods (e.g. update-ca-certificates, jvm commands, etc) + additionalCommand: ## Bookkeeper Service ## templates/bookkeeper-service.yaml ## @@ -722,6 +726,8 @@ broker: managedLedgerDefaultEnsembleSize: "2" managedLedgerDefaultWriteQuorum: "2" managedLedgerDefaultAckQuorum: "2" + ## Add a custom command to the start up process of the broker pods (e.g. update-ca-certificates, jvm commands, etc) + additionalCommand: ## Broker service ## templates/broker-service.yaml ## @@ -828,6 +834,8 @@ proxy: -XX:-ResizePLAB -XX:+ExitOnOutOfMemoryError -XX:+PerfDisableSharedMem + ## Add a custom command to the start up process of the proxy pods (e.g. update-ca-certificates, jvm commands, etc) + additionalCommand: ## Proxy service ## templates/proxy-service.yaml ## @@ -942,6 +950,8 @@ toolset: -Xms64M -Xmx128M -XX:MaxDirectMemorySize=128M + ## Add a custom command to the start up process of the toolset pods (e.g. update-ca-certificates, jvm commands, etc) + additionalCommand: ############################################################# ### Monitoring Stack : Prometheus / Grafana