From 0f78c9f90b83e545a9b38f1f757f4283c6097f39 Mon Sep 17 00:00:00 2001 From: Gardner Vickers Date: Fri, 10 Nov 2017 22:39:42 -0500 Subject: [PATCH] Parameterize ramFraction --- charts/zookeeper/Chart.yaml | 2 +- charts/zookeeper/templates/ss.yaml | 2 +- charts/zookeeper/values.yaml | 3 ++- images/zookeeper/zkGenConfig.sh | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/charts/zookeeper/Chart.yaml b/charts/zookeeper/Chart.yaml index 3809a45..1de78de 100755 --- a/charts/zookeeper/Chart.yaml +++ b/charts/zookeeper/Chart.yaml @@ -9,4 +9,4 @@ name: zookeeper sources: - https://github.com/apache/zookeeper - https://github.com/kubernetes/contrib/tree/master/statefulset/zookeeper -version: 0.2.5 +version: 0.2.6 diff --git a/charts/zookeeper/templates/ss.yaml b/charts/zookeeper/templates/ss.yaml index 1d72cbe..01a30a1 100755 --- a/charts/zookeeper/templates/ss.yaml +++ b/charts/zookeeper/templates/ss.yaml @@ -112,7 +112,7 @@ spec: - name: ZK_ELECTION_PORT value: "{{.Values.LeaderElectionPort}}" - name: SERVER_JVMFLAGS - value: "-server -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap -XshowSettings:vm -XX:MaxRAMFraction=1" + value: "-server -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap -XshowSettings:vm -XX:MaxRAMFraction={{ .Values.ramFraction }}" command: - sh - -c diff --git a/charts/zookeeper/values.yaml b/charts/zookeeper/values.yaml index c08784b..4f53e04 100755 --- a/charts/zookeeper/values.yaml +++ b/charts/zookeeper/values.yaml @@ -3,7 +3,7 @@ # Declare name/value pairs to be passed into your templates. # name: value Image: onyxplatform/k8szk -Tag: 20 +Tag: 21 Servers: 3 Cpu: "100m" Memory: "512Mi" @@ -14,6 +14,7 @@ resources: limits: memory: 512Mi cpu: 100m +ramFraction: 2 Storage: "50Gi" StorageClass : default ServerPort: 2888 diff --git a/images/zookeeper/zkGenConfig.sh b/images/zookeeper/zkGenConfig.sh index 966ba16..b7a2726 100755 --- a/images/zookeeper/zkGenConfig.sh +++ b/images/zookeeper/zkGenConfig.sh @@ -144,7 +144,7 @@ function create_java_env() { rm -f $JAVA_ENV_FILE echo "Creating JVM configuration file" echo "ZOO_LOG_DIR=$ZK_LOG_DIR" >> $JAVA_ENV_FILE - echo "JVMFLAGS=\"-XshowSettings:vm -XX:MaxRAMFraction=1 -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap\"" >> $JAVA_ENV_FILE + echo "JVMFLAGS=\"-XshowSettings:vm -XX:MaxRAMFraction=2 -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap\"" >> $JAVA_ENV_FILE echo "Wrote JVM configuration to $JAVA_ENV_FILE" }