This is an automated email from the ASF dual-hosted git repository.
rabbah pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/openwhisk.git
The following commit(s) were added to refs/heads/master by this push:
new 6254477 Copy jmx files instead of moving to support k8s (#5045)
6254477 is described below
commit 6254477d5f95ee8d693e16daf52e9b1938f87b59
Author: Seonghyun Oh <[email protected]>
AuthorDate: Thu Jan 14 00:22:05 2021 +0900
Copy jmx files instead of moving to support k8s (#5045)
---
common/scala/copyJMXFiles.sh | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/common/scala/copyJMXFiles.sh b/common/scala/copyJMXFiles.sh
index 85265b7..97364bb 100644
--- a/common/scala/copyJMXFiles.sh
+++ b/common/scala/copyJMXFiles.sh
@@ -18,6 +18,11 @@
if [[ $( ls /conf/jmxremote.* 2> /dev/null ) ]]
then
- mv /conf/jmxremote.* /home/owuser
+ # JMX auth files would be mounted as a symbolic link (read-only mode)
+ # with `root` privileges by the k8s secret.
+ cp -rL /conf/jmxremote.* /home/owuser
+ rm -f /conf/jmxremote.* 2>/dev/null || true
+
+ # The owner must be `owuser` and the file only have read permission.
chmod 600 /home/owuser/jmxremote.*
fi