[Music] Adjust Pods Requests/Limits 99/97699/1
authorSylvain Desbureaux <sylvain.desbureaux@orange.com>
Tue, 29 Oct 2019 17:00:15 +0000 (18:00 +0100)
committerSylvain Desbureaux <sylvain.desbureaux@orange.com>
Tue, 29 Oct 2019 17:00:15 +0000 (18:00 +0100)
I've adjusted the Requests / Limits of portal pods according to real
usage of "Orange Openlab" and "Onap daily master".

Calculation is the following:

per deployment:
 * CPU/Mem requests is max of average from the two deployments
 * CPU/Mem limits is (max of max from the two deployments) * 1.2

Change-Id: I3fce54e6be495a7014bf346d66721976fa2dab8b
Issue-ID: MUSIC-533
Signed-off-by: Sylvain Desbureaux <sylvain.desbureaux@orange.com>
kubernetes/common/music/charts/music-cassandra/templates/statefulset.yaml
kubernetes/common/music/charts/music-cassandra/values.yaml
kubernetes/common/music/charts/music-tomcat/templates/deployment.yaml
kubernetes/common/music/charts/music-tomcat/values.yaml
kubernetes/common/music/charts/zookeeper/values.yaml
kubernetes/portal/charts/portal-cassandra/templates/deployment.yaml

index ae5f7c5..514bccc 100644 (file)
@@ -106,7 +106,7 @@ spec:
           - name: {{ template "common.name" . }}-data
             mountPath: /var/lib/cassandra
         resources:
-{{ toYaml .Values.resources | indent 10 }}
+{{ include "common.resources" . | indent 12 }}
       volumes:
       - name: localtime
         hostPath:
index d18dc68..f0888c1 100644 (file)
@@ -110,10 +110,22 @@ persistence:
   storageType: local
   storageClass: ""
 
+# Resource Limit flavor -By Default using small
+flavor: small
+# Segregation for Different environment (Small and Large)
 resources:
-  limits:
-    cpu: 4
-    memory: 8Gi
-  requests:
-    cpu: 2
-    memory: 4Gi
+  small:
+    limits:
+      cpu: 500m
+      memory: 1.2Gi
+    requests:
+      cpu: 160m
+      memory: 900Mi
+  large:
+    limits:
+      cpu: 4
+      memory: 10Gi
+    requests:
+      cpu: 2
+      memory: 6Gi
+  unlimited: {}
index 2e04b15..2a38a6a 100755 (executable)
@@ -40,7 +40,7 @@ spec:
         - /root/ready.py
         args:
         - --container-name
-        - zookeeper 
+        - zookeeper
         env:
         - name: NAMESPACE
           valueFrom:
@@ -101,7 +101,7 @@ spec:
             mountPath: /opt/app/music/etc/music.properties
             subPath: music.properties
           resources:
-{{ toYaml .Values.resources | indent 10 }}
+{{ include "common.resources" . | indent 12 }}
       volumes:
         - name: shared-data
           emptyDir: {}
index 05a1b17..b91ffbd 100755 (executable)
@@ -81,14 +81,26 @@ service:
 ingress:
   enabled: false
 
-#resources: {}
+# Resource Limit flavor -By Default using small
+flavor: small
+# Segregation for Different environment (Small and Large)
 resources:
-  limits:
-    cpu: 2
-    memory: 2Gi
-  requests:
-    cpu: 2
-    memory: 1Gi
+  small:
+    limits:
+      cpu: 900m
+      memory: 460Mi
+    requests:
+      cpu: 550m
+      memory: 360Mi
+  large:
+    limits:
+      cpu: 4
+      memory: 2Gi
+    requests:
+      cpu: 2
+      memory: 1Gi
+  unlimited: {}
+
 
 
 properties:
@@ -100,4 +112,3 @@ properties:
   # Admin API
   # ONAP AAF
   aafAdminUrl:
-
index ea02e61..550dbf2 100644 (file)
@@ -54,23 +54,23 @@ ports:
     protocol: TCP  # Protocol for zookeeper container server port.
 
 # Resource Limit flavor -By Default using small
-flavor: large 
+flavor: small
 # Segregation for Different environment (Small and Large)
 resources:
   small:
     limits:
-      cpu: 
-      memory: 1Gi 
+      cpu: 500m
+      memory: 900Mi
     requests:
-      cpu: 500m 
-      memory: 500Mi 
+      cpu: 10m
+      memory: 730Mi
   large:
     limits:
       cpu: 3
       memory: 2Gi
     requests:
-      cpu: 2 
-      memory: 1Gi 
+      cpu: 2
+      memory: 1Gi
   unlimited: {}
 
 nodeSelector: {}  # Node label-values required to run zookeeper pods.
@@ -78,7 +78,7 @@ nodeSelector: {}  # Node label-values required to run zookeeper pods.
 tolerations: []  # Node taint overrides for zookeeper pods.
 
 affinity: {}  # Criteria by which pod label-values influence scheduling for zookeeper pods.
-affinity: 
+affinity:
   podAntiAffinity:
     requiredDuringSchedulingIgnoredDuringExecution:
     - topologyKey: "kubernetes.io/hostname"
index 2040794..96e865d 100644 (file)
@@ -65,7 +65,7 @@ spec:
           - name: CASSPASS
             value: "{{ .Values.config.cassandraPassword }}"
           - name: JVM_OPTS
-            value: "{{ .Values.config.cassandraJvmOpts }}"  
+            value: "{{ .Values.config.cassandraJvmOpts }}"
           - name: POD_IP
             valueFrom:
               fieldRef: