Merge "[CONSUL] Add limits to consul chart."
authorKrzysztof Opasiak <k.opasiak@samsung.com>
Tue, 27 Oct 2020 17:00:58 +0000 (17:00 +0000)
committerGerrit Code Review <gerrit@onap.org>
Tue, 27 Oct 2020 17:00:58 +0000 (17:00 +0000)
kubernetes/consul/charts/consul-server/templates/statefulset.yaml
kubernetes/consul/charts/consul-server/values.yaml
kubernetes/consul/templates/deployment.yaml
kubernetes/consul/values.yaml

index 02263ee..430b6dd 100644 (file)
@@ -70,3 +70,4 @@ spec:
             port: {{ .Values.service.internalPort }}
           initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
           periodSeconds: {{ .Values.readiness.periodSeconds }}
+        resources: {{ include "common.resources" . | nindent 10 }}
index f4f3b16..81472e7 100644 (file)
@@ -63,4 +63,30 @@ service:
 ingress:
   enabled: false
 
-resources: {}
+#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:
+  small:
+    limits:
+      cpu: 100m
+      memory: 100Mi
+    requests:
+      cpu: 30m
+      memory: 25Mi
+  large:
+    limits:
+      cpu: 2
+      memory: 4Gi
+    requests:
+      cpu: 1
+      memory: 2Gi
+  unlimited: {}
index a5b72ae..51c6eb7 100644 (file)
@@ -61,6 +61,7 @@ spec:
           name: consul-agent-scripts-config
         - mountPath: /consul/certs
           name: consul-agent-certs-config
+        resources: {{ include "common.resources" . | nindent 10 }}
       volumes:
       - configMap:
           name: {{ include "common.fullname" . }}-configmap
index 72d9a38..512c4c3 100644 (file)
@@ -65,8 +65,34 @@ ingress:
       port: 8800
   config:
     ssl: "none"
-    
-resources: {}
+
+#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:
+  small:
+    limits:
+      cpu: 1
+      memory: 1500Mi
+    requests:
+      cpu: 650m
+      memory: 530Mi
+  large:
+    limits:
+      cpu: 2
+      memory: 4Gi
+    requests:
+      cpu: 1
+      memory: 2Gi
+  unlimited: {}
 
 odl:
   jolokia: