aboutsummaryrefslogtreecommitdiffstats
path: root/kubernetes/portal/components/portal-cassandra/templates
diff options
context:
space:
mode:
authorSylvain Desbureaux <sylvain.desbureaux@orange.com>2021-02-15 15:28:19 +0100
committerSylvain Desbureaux <sylvain.desbureaux@orange.com>2021-02-16 07:04:22 +0000
commitc23aa42a3c3f7c864544be41837f8601d264f1a5 (patch)
tree1dc9a60e1e9837d6a8bb08c08c00a1aeaefa342c /kubernetes/portal/components/portal-cassandra/templates
parent8d99c0d80b9335eab7d20bb074d0b007358ce013 (diff)
[PORTAL] Fix Heap config generation
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
Diffstat (limited to 'kubernetes/portal/components/portal-cassandra/templates')
-rw-r--r--kubernetes/portal/components/portal-cassandra/templates/deployment.yaml10
1 files changed, 7 insertions, 3 deletions
diff --git a/kubernetes/portal/components/portal-cassandra/templates/deployment.yaml b/kubernetes/portal/components/portal-cassandra/templates/deployment.yaml
index 39cd0294c8..20c396fa42 100644
--- a/kubernetes/portal/components/portal-cassandra/templates/deployment.yaml
+++ b/kubernetes/portal/components/portal-cassandra/templates/deployment.yaml
@@ -108,11 +108,15 @@ spec:
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") }}
- name: MAX_HEAP_SIZE
- value: {{ .Values.resources.small.heap.max }}
+ value: {{ $heap.max }}
+ {{- end }}
+ {{- if (hasKey $heap "new") }}
- name: HEAP_NEWSIZE
- value: {{ .Values.resources.small.heap.new }}
+ value: {{ $heap.new }}
{{- end }}
volumeMounts:
- mountPath: /etc/localtime