Skip to content

Commit

Permalink
Parameterize ramFraction
Browse files Browse the repository at this point in the history
  • Loading branch information
gardnervickers committed Nov 11, 2017
1 parent 67fd92b commit 0f78c9f
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion charts/zookeeper/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion charts/zookeeper/templates/ss.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion charts/zookeeper/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -14,6 +14,7 @@ resources:
limits:
memory: 512Mi
cpu: 100m
ramFraction: 2
Storage: "50Gi"
StorageClass : default
ServerPort: 2888
Expand Down
2 changes: 1 addition & 1 deletion images/zookeeper/zkGenConfig.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}

Expand Down

0 comments on commit 0f78c9f

Please sign in to comment.