Resource Limit enablement in Robot 55/67555/2
authorvaibhav_16dec <vaibhav.chopra@amdocs.com>
Wed, 19 Sep 2018 02:36:17 +0000 (02:36 +0000)
committervaibhav_16dec <vaibhav.chopra@amdocs.com>
Wed, 19 Sep 2018 02:41:22 +0000 (02:41 +0000)
Issue-ID: OOM-1160

Change-Id: I3e76e18c968ebbb8d5e472419346a32d579eb199
Signed-off-by: vaibhav_16dec <vaibhav.chopra@amdocs.com>
kubernetes/robot/templates/deployment.yaml
kubernetes/robot/values.yaml

index cebc7f5..319ef59 100644 (file)
@@ -57,7 +57,7 @@ spec:
         - name: robot-logs
           mountPath: /share/logs
         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 2951b60..146c0be 100755 (executable)
@@ -84,6 +84,25 @@ nodeSelector: {}
 
 affinity: {}
 
+# Resource Limit flavor -By Default using small 
+flavor: small
+# Segregation for Different environment (Small and Large)
+resources:
+  small:
+    limits:
+      cpu: 2000m
+      memory: 4Gi
+    requests:
+      cpu: 500m
+      memory: 1Gi
+  large:
+    limits:
+      cpu: 4000m
+      memory: 8Gi
+    requests:
+      cpu: 1000m
+      memory: 2Gi
+
 # probe configuration parameters
 liveness:
   initialDelaySeconds: 10
@@ -96,7 +115,6 @@ readiness:
   initialDelaySeconds: 10
   periodSeconds: 10
 
-
 service:
   name: robot
   type: NodePort
@@ -105,30 +123,9 @@ service:
   internalPort: 88
   nodePort: "09"
 
-
 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
-
 ## Persist data to a persitent volume
 persistence:
   enabled: true