You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by si...@apache.org on 2020/06/26 01:34:04 UTC
[pulsar-helm-chart] branch master updated: Fixed
apache/pulsar-helm-chart#25 (#27)
This is an automated email from the ASF dual-hosted git repository.
sijie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar-helm-chart.git
The following commit(s) were added to refs/heads/master by this push:
new 248f11c Fixed apache/pulsar-helm-chart#25 (#27)
248f11c is described below
commit 248f11c932348320cd8d8ffafba19d3d14995200
Author: tabalt <24...@qq.com>
AuthorDate: Fri Jun 26 09:33:54 2020 +0800
Fixed apache/pulsar-helm-chart#25 (#27)
---
charts/pulsar/templates/keytool.yaml | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/charts/pulsar/templates/keytool.yaml b/charts/pulsar/templates/keytool.yaml
index b3da4a0..aed05b0 100644
--- a/charts/pulsar/templates/keytool.yaml
+++ b/charts/pulsar/templates/keytool.yaml
@@ -40,19 +40,26 @@ data:
keyStoreFile=/pulsar/${component}.keystore.jks
trustStoreFile=/pulsar/${component}.truststore.jks
- function ensureFileNotEmpty() {
+ function checkFile() {
local file=$1
local len=$(wc -c ${file} | awk '{print $1}')
echo "processing ${file} : len = ${len}"
if [ ! -f ${file} ]; then
echo "${file} is not found"
- exit -1
+ return -1
fi
if [ $len -le 0 ]; then
echo "${file} is empty"
- exit -1
+ return -1
fi
}
+
+ function ensureFileNotEmpty() {
+ local file=$1
+ until checkFile ${file}; do
+ echo "file isn't initialized yet ... check in 3 seconds ..." && sleep 3;
+ done;
+ }
ensureFileNotEmpty ${crtFile}
ensureFileNotEmpty ${keyFile}