[CONTRIB] Add requests/limits to EJBCA 41/114141/4
authorSylvain Desbureaux <sylvain.desbureaux@orange.com>
Thu, 22 Oct 2020 07:49:54 +0000 (09:49 +0200)
committerSylvain Desbureaux <sylvain.desbureaux@orange.com>
Mon, 2 Nov 2020 07:23:00 +0000 (07:23 +0000)
Having limits is important in order to have safe deployment.
EJBCA didn't had one so let's add them.

Issue-ID: OOM-2230
Signed-off-by: Sylvain Desbureaux <sylvain.desbureaux@orange.com>
Change-Id: I435afa6b0f065a66e180379b267227f4b8766478

kubernetes/contrib/components/ejbca/templates/deployment.yaml
kubernetes/contrib/components/ejbca/values.yaml

index 3034366..55de54f 100644 (file)
@@ -89,6 +89,7 @@ spec:
         {{- if .Values.affinity }}
         affinity: {{ toYaml .Values.affinity | nindent 10 }}
         {{- end }}
+        resources: {{ include "common.resources" . | nindent 10 }}
       volumes:
       - configMap:
           name: "{{ include "common.fullname" . }}-config-script"
index 1a9a34b..35160e4 100644 (file)
@@ -13,7 +13,7 @@
 # limitations under the License.
 global:
   readinessImage: onap/oom/readiness:3.0.1
-  mariadbGalera: &mariadbGalera
+  mariadbGalera: &mariadbGalera 
     #This flag allows EJBCA to instantiate its own mariadb-galera cluster
     localCluster: false
     service: mariadb-galera
@@ -104,3 +104,23 @@ service:
       port: 8443
       plain_port: 8080
       port_protocol: http
+
+# Resource Limit flavor -By Default using small
+flavor: small
+# Segregation for Different environment (Small and Large)
+resources:
+  small:
+    limits:
+      cpu: 1500m
+      memory: 1536Mi
+    requests:
+      cpu: 10m
+      memory: 750Mi
+  large:
+    limits:
+      cpu: 2
+      memory: 2Gi
+    requests:
+      cpu: 20m
+      memory: 1Gi
+  unlimited: {}