When tried to apply heap configuration for small flavors, weird side
effects have appeared.
This patch solves them by doing a more generic way of configuring heap
variables for cassandra.
Issue-ID: PORTAL-1037
Signed-off-by: Sylvain Desbureaux <sylvain.desbureaux@orange.com>
Change-Id: Iebe2edd5281213580d9e1d4d86f9ca0b2abd2601
value: rack1
- name: CASSANDRA_ENABLE_RPC
value: "true"
value: rack1
- name: CASSANDRA_ENABLE_RPC
value: "true"
- {{- if eq "small" .Values.flavor }}
+ {{- $flavor := include "common.flavor" . }}
+ {{- $heap := pluck $flavor .Values.heap | first }}
+ {{- if (hasKey $heap "max") }}
- value: {{ .Values.resources.small.heap.max }}
+ value: {{ $heap.max }}
+ {{- end }}
+ {{- if (hasKey $heap "new") }}
- value: {{ .Values.resources.small.heap.new }}
{{- end }}
volumeMounts:
- mountPath: /etc/localtime
{{- end }}
volumeMounts:
- mountPath: /etc/localtime
# Segregation for Different environment (Small and Large)
resources:
small:
# Segregation for Different environment (Small and Large)
resources:
small:
- # Heap size is tightly correlated to RAM limits.
- # If limit > 8G, Cassandra should define itself the best value.
- # If not, you must set up it in a coherent way with limits set
- # Refer to https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/operations/opsTuneJVM.html#Determiningtheheapsize
- # for more informations.
- heap:
- max: 3G
- new: 100M
limits:
cpu: 500m
memory: 3.75Gi
limits:
cpu: 500m
memory: 3.75Gi
cpu: 2
memory: 6Gi
unlimited: {}
cpu: 2
memory: 6Gi
unlimited: {}
+
+heap:
+ # Heap size is tightly correlated to RAM limits.
+ # If limit > 8G, Cassandra should define itself the best value.
+ # If not, you must set up it in a coherent way with limits set
+ # Refer to https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/operations/opsTuneJVM.html#Determiningtheheapsize
+ # for more informations.
+ small:
+ max: 3G
+ new: 100M
+ large: {}
+ unlimited: {}
\ No newline at end of file