Resource Limit for VID 59/67659/1
authorvaibhavjayas <vaibhav.jayas@amdocs.com>
Wed, 19 Sep 2018 09:33:41 +0000 (09:33 +0000)
committervaibhavjayas <vaibhav.jayas@amdocs.com>
Wed, 19 Sep 2018 09:35:26 +0000 (09:35 +0000)
Issue-ID: OOM-1167

Change-Id: Ib598b25bbf8fbda5b0fb41e3dfaf13dd7a31bd6c
Signed-off-by: vaibhavjayas <vaibhav.jayas@amdocs.com>
kubernetes/vid/charts/vid-mariadb-galera/templates/statefulset.yaml
kubernetes/vid/charts/vid-mariadb-galera/values.yaml
kubernetes/vid/templates/deployment.yaml
kubernetes/vid/values.yaml

index 816d473..8ddcb4a 100644 (file)
@@ -97,7 +97,7 @@ spec:
             timeoutSeconds: {{ .Values.liveness.timeoutSeconds }}
       {{- end }}
           resources:
-{{ toYaml .Values.resources | indent 12 }}
+{{ toYaml (pluck .Values.flavor .Values.resources| first) | indent 12 }}
           volumeMounts:
         {{- if .Values.externalConfig }}
           - mountPath: /etc/config
index e9464b6..22b4397 100644 (file)
@@ -106,25 +106,24 @@ ingress:
 #externalConfig: {}
 externalConfig: |-
   lower_case_table_names = 1
-#resources: {}
-  # We usually recommend not to specify default resources and to leave this as a conscious
-  # choice for the user. This also increases chances charts run on environments with little
-  # resources, such as Minikube. If you do want to specify resources, uncomment the following
-  # lines, adjust them as necessary, and remove the curly braces after 'resources:'.
-  #
-  # Example:
-  # Configure resource requests and limits
-  # ref: http://kubernetes.io/docs/user-guide/compute-resources/
-  # Minimum memory for development is 2 CPU cores and 4GB memory
-  # Minimum memory for production is 4 CPU cores and 8GB memory
+# Resource Limit flavor -By Default using small 
+flavor: small
+# Segregation for Different environment (Small and Large)
 resources:
-  limits:
-    cpu: 2
-    memory: 4Gi
-  requests:
-    cpu: 2
-    memory: 4Gi
-
+  small:
+    limits:
+      cpu: 10m
+      memory: 1Gi
+    requests:
+      cpu: 10m
+      memory: 1Gi
+  large:
+    limits:
+      cpu: 20m
+      memory: 2Gi
+    requests:
+      cpu: 20m
+      memory: 2Gi
 # Name for mariadb-galera cluster - should be unique accross all projects or other clusters
 nameOverride: vid-mariadb-galera
 
index 5cd4f38..9b9ee8d 100644 (file)
@@ -118,7 +118,7 @@ spec:
             name: vid-logback
             subPath: logback.xml
           resources:
-{{ toYaml .Values.resources | indent 12 }}
+{{ toYaml (pluck .Values.flavor .Values.resources| first) | indent 12 }}
         {{- if .Values.nodeSelector }}
         nodeSelector:
 {{ toYaml .Values.nodeSelector | indent 10 }}
index 34a265c..23812c9 100644 (file)
@@ -91,21 +91,21 @@ service:
 ingress:
   enabled: false
 
-resources: {}
-  # We usually recommend not to specify default resources and to leave this as a conscious
-  # choice for the user. This also increases chances charts run on environments with little
-  # resources, such as Minikube. If you do want to specify resources, uncomment the following
-  # lines, adjust them as necessary, and remove the curly braces after 'resources:'.
-  #
-  # Example:
-  # Configure resource requests and limits
-  # ref: http://kubernetes.io/docs/user-guide/compute-resources/
-  # Minimum memory for development is 2 CPU cores and 4GB memory
-  # Minimum memory for production is 4 CPU cores and 8GB memory
-#resources:
-#  limits:
-#    cpu: 2
-#    memory: 4Gi
-#  requests:
-#    cpu: 2
-#    memory: 4Gi
+# Resource Limit flavor -By Default using small 
+flavor: small
+# Segregation for Different environment (Small and Large)
+resources:
+  small:
+    limits:
+      cpu: 20m
+      memory: 2Gi
+    requests:
+      cpu: 20m
+      memory: 2Gi
+  large:
+    limits:
+      cpu: 40m
+      memory: 4Gi
+    requests:
+      cpu: 40
+      memory: 4Gi
\ No newline at end of file