[VOL-4300]: Resource limits defined
Change-Id: Iad73584a4119dfb82d5059de1ef31283f5c85a9b
diff --git a/voltha/Chart.yaml b/voltha/Chart.yaml
index c2e957c..60088be 100644
--- a/voltha/Chart.yaml
+++ b/voltha/Chart.yaml
@@ -14,7 +14,7 @@
---
apiVersion: "v1"
name: "voltha"
-version: "2.10.2"
+version: "2.10.3"
description: "A Helm chart for Voltha based on K8S resources in Voltha project"
keywords:
- "onf"
diff --git a/voltha/templates/core-deploy.yaml b/voltha/templates/core-deploy.yaml
index 55d36c5..7134aca 100644
--- a/voltha/templates/core-deploy.yaml
+++ b/voltha/templates/core-deploy.yaml
@@ -122,3 +122,18 @@
port: 8080
initialDelaySeconds: 3
periodSeconds: 3
+ resources:
+ requests:
+ {{- if .Values.resources.rw_core.requests.memory }}
+ memory: {{ .Values.resources.rw_core.requests.memory }}
+ {{- end }}
+ {{- if .Values.resources.rw_core.requests.cpu }}
+ cpu: {{ .Values.resources.rw_core.requests.cpu }}
+ {{- end }}
+ limits:
+ {{- if .Values.resources.rw_core.limits.memory }}
+ memory: {{ .Values.resources.rw_core.limits.memory }}
+ {{- end }}
+ {{- if .Values.resources.rw_core.limits.cpu }}
+ cpu: {{ .Values.resources.rw_core.limits.cpu }}
+ {{- end }}
diff --git a/voltha/templates/ofagent-deploy.yaml b/voltha/templates/ofagent-deploy.yaml
index ef04d2d..112b348 100644
--- a/voltha/templates/ofagent-deploy.yaml
+++ b/voltha/templates/ofagent-deploy.yaml
@@ -122,3 +122,18 @@
port: 8080
initialDelaySeconds: 10
periodSeconds: 5
+ resources:
+ requests:
+ {{- if .Values.resources.ofagent.requests.memory }}
+ memory: {{ .Values.resources.ofagent.requests.memory }}
+ {{- end }}
+ {{- if .Values.resources.ofagent.requests.cpu }}
+ cpu: {{ .Values.resources.ofagent.requests.cpu }}
+ {{- end }}
+ limits:
+ {{- if .Values.resources.ofagent.limits.memory }}
+ memory: {{ .Values.resources.ofagent.limits.memory }}
+ {{- end }}
+ {{- if .Values.resources.ofagent.limits.cpu }}
+ cpu: {{ .Values.resources.ofagent.limits.cpu }}
+ {{- end }}
diff --git a/voltha/values.yaml b/voltha/values.yaml
index c499be6..2bc6ea6 100644
--- a/voltha/values.yaml
+++ b/voltha/values.yaml
@@ -125,3 +125,19 @@
onos_classic:
onosOfPort: 6653
replicas: 1
+
+resources:
+ rw_core:
+ requests:
+ cpu: 500m
+ memory: 100Mi
+ limits:
+ cpu: ~
+ memory: ~
+ ofagent:
+ requests:
+ cpu: 300m
+ memory: 50Mi
+ limits:
+ cpu: ~
+ memory: ~