summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKrzysztof Opasiak <k.opasiak@samsung.com>2021-02-11 21:30:25 +0000
committerGerrit Code Review <gerrit@onap.org>2021-02-11 21:30:25 +0000
commit2ea763f92819d6290fa90a98cd7c2af55364ec6a (patch)
tree510d459cad96063dbde9b136be6be82b8ba4fc44
parent3465ee1be5636b48753bc7bf4d0bf8ca1fac5147 (diff)
parent6e41a2c787c9c719fcc2226f0cd9740d2b9df43f (diff)
Merge "[PORTAL][CASSANDRA] Configure Heap"
-rw-r--r--kubernetes/portal/components/portal-cassandra/templates/deployment.yaml8
-rw-r--r--kubernetes/portal/components/portal-cassandra/values.yaml12
2 files changed, 17 insertions, 3 deletions
diff --git a/kubernetes/portal/components/portal-cassandra/templates/deployment.yaml b/kubernetes/portal/components/portal-cassandra/templates/deployment.yaml
index 84a78ab977..39cd0294c8 100644
--- a/kubernetes/portal/components/portal-cassandra/templates/deployment.yaml
+++ b/kubernetes/portal/components/portal-cassandra/templates/deployment.yaml
@@ -1,7 +1,7 @@
{{/*
# Copyright (c) 2017 Amdocs, Bell Canada
# Modifications Copyright (c) 2018 AT&T
-# Modifications Copyright (c) 2020 Nokia
+# Modifications Copyright (c) 2020 Nokia, Orange
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -108,6 +108,12 @@ spec:
value: rack1
- name: CASSANDRA_ENABLE_RPC
value: "true"
+ {{- if eq "small" .Values.flavor }}
+ - name: MAX_HEAP_SIZE
+ value: {{ .Values.resources.small.heap.max }}
+ - name: HEAP_NEWSIZE
+ value: {{ .Values.resources.small.heap.new }}
+ {{- end }}
volumeMounts:
- mountPath: /etc/localtime
name: localtime
diff --git a/kubernetes/portal/components/portal-cassandra/values.yaml b/kubernetes/portal/components/portal-cassandra/values.yaml
index ec76d08b72..c185155f09 100644
--- a/kubernetes/portal/components/portal-cassandra/values.yaml
+++ b/kubernetes/portal/components/portal-cassandra/values.yaml
@@ -1,6 +1,6 @@
# Copyright (c) 2017 Amdocs, Bell Canada
# Modifications Copyright (c) 2018 AT&T
-# Modifications Copyright (c) 2020 Nokia
+# Modifications Copyright (c) 2020 Nokia, Orange
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -112,12 +112,20 @@ flavor: 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
requests:
cpu: 160m
- memory: 2.8Gi
+ memory: 3.1Gi
large:
limits:
cpu: 4