Skip to content

Commit 0f78c9f

Browse files
Parameterize ramFraction
1 parent 67fd92b commit 0f78c9f

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

charts/zookeeper/Chart.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ name: zookeeper
99
sources:
1010
- https://github.com/apache/zookeeper
1111
- https://github.com/kubernetes/contrib/tree/master/statefulset/zookeeper
12-
version: 0.2.5
12+
version: 0.2.6

charts/zookeeper/templates/ss.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ spec:
112112
- name: ZK_ELECTION_PORT
113113
value: "{{.Values.LeaderElectionPort}}"
114114
- name: SERVER_JVMFLAGS
115-
value: "-server -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap -XshowSettings:vm -XX:MaxRAMFraction=1"
115+
value: "-server -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap -XshowSettings:vm -XX:MaxRAMFraction={{ .Values.ramFraction }}"
116116
command:
117117
- sh
118118
- -c

charts/zookeeper/values.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Declare name/value pairs to be passed into your templates.
44
# name: value
55
Image: onyxplatform/k8szk
6-
Tag: 20
6+
Tag: 21
77
Servers: 3
88
Cpu: "100m"
99
Memory: "512Mi"
@@ -14,6 +14,7 @@ resources:
1414
limits:
1515
memory: 512Mi
1616
cpu: 100m
17+
ramFraction: 2
1718
Storage: "50Gi"
1819
StorageClass : default
1920
ServerPort: 2888

images/zookeeper/zkGenConfig.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ function create_java_env() {
144144
rm -f $JAVA_ENV_FILE
145145
echo "Creating JVM configuration file"
146146
echo "ZOO_LOG_DIR=$ZK_LOG_DIR" >> $JAVA_ENV_FILE
147-
echo "JVMFLAGS=\"-XshowSettings:vm -XX:MaxRAMFraction=1 -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap\"" >> $JAVA_ENV_FILE
147+
echo "JVMFLAGS=\"-XshowSettings:vm -XX:MaxRAMFraction=2 -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap\"" >> $JAVA_ENV_FILE
148148
echo "Wrote JVM configuration to $JAVA_ENV_FILE"
149149
}
150150

0 commit comments

Comments
 (0)