[CASSANDRA] Add option to set the resource limits
add resources entry to the _cassOp template
add resources setting to the cassandra instance
add additional settings to improve the performance
Issue-ID: OOM-3312
Change-Id: Iaa18e7c55a933f2403eff2dd93cb36f9786b3a41
Signed-off-by: Andreas Geissler <andreas-geissler@telekom.de>
diff --git a/kubernetes/common/cassandra/Chart.yaml b/kubernetes/common/cassandra/Chart.yaml
index 81f5c5d..544ebb2 100644
--- a/kubernetes/common/cassandra/Chart.yaml
+++ b/kubernetes/common/cassandra/Chart.yaml
@@ -18,7 +18,7 @@
apiVersion: v2
description: ONAP cassandra
name: cassandra
-version: 13.1.0
+version: 13.1.1
dependencies:
- name: common
diff --git a/kubernetes/common/cassandra/values.yaml b/kubernetes/common/cassandra/values.yaml
index 0ab1f09..842c268 100644
--- a/kubernetes/common/cassandra/values.yaml
+++ b/kubernetes/common/cassandra/values.yaml
@@ -40,16 +40,30 @@
superuserPassword: &superuserpassword cassandra
casOptions:
authorizer: AllowAllAuthorizer
- read_request_timeout: 10000ms
- write_request_timeout: 10000ms
+ read_request_timeout: 15000ms
+ write_request_timeout: 15000ms
counter_write_request_timeout: 15000ms
+ request_timeout: 15000ms
+ auto_snapshot: false
+ commitlog_segment_size: 128MiB
+ commitlog_sync_period: 15000ms
+ concurrent_reads: 16
+ concurrent_writes: 16
+ counter_cache_size: 16MiB
jvmOptions:
heap_initial_size: 512M
- heap_max_size: 8192M
+ heap_max_size: 4096M
hostNetwork: false
datacenters:
- name: dc1
size: 3
+ resources:
+ requests:
+ cpu: 2
+ memory: 8Gi
+ limits:
+ cpu: 8
+ memory: 8Gi
reaper:
enabled: true
stargate:
diff --git a/kubernetes/common/common/Chart.yaml b/kubernetes/common/common/Chart.yaml
index c8609d6..6fa2926 100644
--- a/kubernetes/common/common/Chart.yaml
+++ b/kubernetes/common/common/Chart.yaml
@@ -17,4 +17,4 @@
apiVersion: v2
description: Common templates for inclusion in other charts
name: common
-version: 13.2.5
+version: 13.2.6
diff --git a/kubernetes/common/common/templates/_cassOp.tpl b/kubernetes/common/common/templates/_cassOp.tpl
index 588af1a..c707312 100644
--- a/kubernetes/common/common/templates/_cassOp.tpl
+++ b/kubernetes/common/common/templates/_cassOp.tpl
@@ -133,6 +133,10 @@
- metadata:
name: {{ $datacenter.name }}
size: {{ $datacenter.size }}
+ {{ if $datacenter.resources -}}
+ resources:
+ {{ toYaml $datacenter.resources | nindent 10 }}
+ {{- end }}
{{- end }}
initContainers:
- name: server-config-init-base