From 973bfad52ba90a96ce77a3efd2b572d7e5c6f2e0 Mon Sep 17 00:00:00 2001 From: GregSulek Date: Wed, 19 Sep 2018 06:48:37 -0400 Subject: Add Resource Limits for APP-C flavor names removed from global Issue-ID: OOM-1148 Change-Id: Ib8ccb694786d15be2830c067d5c3b10fc7054f0b Signed-off-by: GregSulek --- .../appc-ansible-server/templates/deployment.yaml | 2 +- .../appc/charts/appc-ansible-server/values.yaml | 27 +++++++++++++++------- 2 files changed, 20 insertions(+), 9 deletions(-) (limited to 'kubernetes/appc/charts/appc-ansible-server') diff --git a/kubernetes/appc/charts/appc-ansible-server/templates/deployment.yaml b/kubernetes/appc/charts/appc-ansible-server/templates/deployment.yaml index 8fb2776566..b7ef21f023 100644 --- a/kubernetes/appc/charts/appc-ansible-server/templates/deployment.yaml +++ b/kubernetes/appc/charts/appc-ansible-server/templates/deployment.yaml @@ -75,8 +75,8 @@ spec: name: config subPath: RestServer_config resources: -{{ toYaml .Values.resources | indent 12 }} {{- if .Values.nodeSelector }} +{{ toYaml (pluck .Values.flavor .Values.resources| first) | indent 12 }} nodeSelector: {{ toYaml .Values.nodeSelector | indent 10 }} {{- end -}} diff --git a/kubernetes/appc/charts/appc-ansible-server/values.yaml b/kubernetes/appc/charts/appc-ansible-server/values.yaml index bfbadd97d1..b9dd41854a 100644 --- a/kubernetes/appc/charts/appc-ansible-server/values.yaml +++ b/kubernetes/appc/charts/appc-ansible-server/values.yaml @@ -25,6 +25,8 @@ global: ################################################################# # Application configuration defaults. ################################################################# +flavor: small + # application image repository: nexus3.onap.org:10001 image: onap/sdnc-ansible-server-image:1.4-STAGING-latest @@ -68,11 +70,20 @@ service: ingress: enabled: false -resources: {} -#resources: -# limits: -# cpu: 2 -# memory: 4Gi -# requests: -# cpu: 2 -# memory: 4Gi +resources: + small: + limits: + cpu: 1 + memory: 1Gi + requests: + cpu: 1 + memory: 1Gi + large: + limits: + cpu: 2 + memory: 2Gi + requests: + cpu: 2 + memory: 2Gi + + -- cgit 1.2.3-korg