Resource Limits for multicloud 13/65813/2
authorMukul <mukul.joshi@amdocs.com>
Tue, 11 Sep 2018 11:42:00 +0000 (11:42 +0000)
committerMandeep Khinda <Mandeep.Khinda@amdocs.com>
Wed, 12 Sep 2018 14:29:06 +0000 (14:29 +0000)
Issue-ID: OOM-1155

Change-Id: Ie727d224eb0ffbd619b46cf66d765b0b0afd454e
Signed-off-by: Mukul <mukul.joshi@amdocs.com>
kubernetes/multicloud/charts/multicloud-ocata/templates/deployment.yaml
kubernetes/multicloud/charts/multicloud-ocata/values.yaml
kubernetes/multicloud/charts/multicloud-vio/templates/deployment.yaml
kubernetes/multicloud/charts/multicloud-vio/values.yaml
kubernetes/multicloud/charts/multicloud-windriver/templates/deployment.yaml
kubernetes/multicloud/charts/multicloud-windriver/values.yaml
kubernetes/multicloud/templates/deployment.yaml
kubernetes/multicloud/values.yaml

index ba249be..1c91e8a 100644 (file)
@@ -62,6 +62,8 @@ spec:
        - mountPath: /opt/ocata/ocata/pub/config/log.yml
          name: ocata-logconfig
          subPath: log.yml
+       resources:
+{{ toYaml (pluck .Values.flavor .Values.resources| first) | indent 12 }}
        image: "{{ include "common.repository" . }}/{{ .Values.image }}"
        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
        ports:
@@ -80,17 +82,6 @@ spec:
          successThreshold: {{ .Values.liveness.successThreshold }}
          failureThreshold: {{ .Values.liveness.failureThreshold }}
        {{ end }}
-       resources:
-{{ toYaml .Values.resources | indent 12 }}
-        {{- if .Values.nodeSelector }}
-     nodeSelector:
-{{ toYaml .Values.nodeSelector | indent 10 }}
-     {{- end -}}
-     {{- if .Values.affinity }}
-     affinity:
-{{ toYaml .Values.affinity | indent 10 }}
-     {{- end }}
-
      # side car containers
      - image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}"
        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
index 286f839..25b21d6 100644 (file)
@@ -66,21 +66,21 @@ service:
 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
+# Resource Limit flavor -By Default using small
+flavor: small
+# Segregation for Different environment (Small and Large)
+resources:
+  small:
+    limits:
+      cpu: 1
+      memory: 4Gi
+    requests:
+      cpu: 10m
+      memory: 1Gi
+  large:
+    limits:
+      cpu: 2
+      memory: 8Gi
+    requests:
+      cpu: 20m
+      memory: 2Gi
index 82804a4..b555d46 100644 (file)
@@ -62,6 +62,8 @@ spec:
        - mountPath: /opt/vio/vio/pub/config/log.yml
          name: vio-logconfig
          subPath: log.yml
+       resources:
+{{ toYaml (pluck .Values.flavor .Values.resources| first) | indent 12 }}
        image: "{{ include "common.repository" . }}/{{ .Values.image }}"
        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
        ports:
@@ -92,17 +94,6 @@ spec:
          name: vio-log
        - mountPath: /usr/share/filebeat/data
          name: vio-data-filebeat
-       resources:
-{{ toYaml .Values.resources | indent 12 }}
-        {{- if .Values.nodeSelector }}
-     nodeSelector:
-{{ toYaml .Values.nodeSelector | indent 10 }}
-     {{- end -}}
-     {{- if .Values.affinity }}
-     affinity:
-{{ toYaml .Values.affinity | indent 10 }}
-     {{- end }}
-
      volumes:
      - name: vio-log
        emptyDir: {}
index 473ccf6..bc207ef 100644 (file)
@@ -66,21 +66,21 @@ service:
 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
+# Resource Limit flavor -By Default using small
+flavor: small
+# Segregation for Different environment (Small and Large)
+resources:
+  small:
+    limits:
+      cpu: 1
+      memory: 4Gi
+    requests:
+      cpu: 10m
+      memory: 1Gi
+  large:
+    limits:
+      cpu: 2
+      memory: 8Gi
+    requests:
+      cpu: 20m
+      memory: 2Gi
index 353cb7b..2e89974 100644 (file)
@@ -62,6 +62,8 @@ spec:
        - mountPath: /opt/windriver/titanium_cloud/pub/config/log.yml
          name: windriver-logconfig
          subPath: log.yml
+       resources:
+{{ toYaml (pluck .Values.flavor .Values.resources| first) | indent 12 }}
        image: "{{ include "common.repository" . }}/{{ .Values.image }}"
        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
        ports:
@@ -80,17 +82,6 @@ spec:
          successThreshold: {{ .Values.liveness.successThreshold }}
          failureThreshold: {{ .Values.liveness.failureThreshold }}
        {{ end }}
-       resources:
-{{ toYaml .Values.resources | indent 12 }}
-        {{- if .Values.nodeSelector }}
-     nodeSelector:
-{{ toYaml .Values.nodeSelector | indent 10 }}
-     {{- end -}}
-     {{- if .Values.affinity }}
-     affinity:
-{{ toYaml .Values.affinity | indent 10 }}
-     {{- end }}
-
      # side car containers
      - image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}"
        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
index d6af600..dce2343 100644 (file)
@@ -66,21 +66,21 @@ liveness:
 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
+# Resource Limit flavor -By Default using small
+flavor: small
+# Segregation for Different environment (Small and Large)
+resources:
+  small:
+    limits:
+      cpu: 1
+      memory: 4Gi
+    requests:
+      cpu: 10m
+      memory: 1Gi
+  large:
+    limits:
+      cpu: 2
+      memory: 8Gi
+    requests:
+      cpu: 20m
+      memory: 2Gi
index 84a8cc2..5c524fb 100644 (file)
@@ -53,6 +53,8 @@ spec:
          value: "{{ .Values.config.aai.username }}"
        - name: AAI_PASSWORD
          value: "{{ .Values.config.aai.password }}"
+       resources:
+{{ toYaml (pluck .Values.flavor .Values.resources| first) | indent 12 }}
        image: "{{ include "common.repository" . }}/{{ .Values.image }}"
        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
        name: {{ include "common.name" . }}
@@ -94,17 +96,6 @@ spec:
          name: framework-log
        - mountPath: /usr/share/filebeat/data
          name: framework-data-filebeat
-       resources:
-{{ toYaml .Values.resources | indent 12 }}
-        {{- if .Values.nodeSelector }}
-     nodeSelector:
-{{ toYaml .Values.nodeSelector | indent 10 }}
-     {{- end -}}
-     {{- if .Values.affinity }}
-     affinity:
-{{ toYaml .Values.affinity | indent 10 }}
-     {{- end }}
-
      volumes:
      - name: framework-log
        emptyDir: {}
index aeed9e1..dc04dbb 100644 (file)
@@ -70,21 +70,21 @@ service:
 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
+# Resource Limit flavor -By Default using small
+flavor: small
+# Segregation for Different environment (Small and Large)
+resources:
+  small:
+    limits:
+      cpu: 1
+      memory: 4Gi
+    requests:
+      cpu: 10m
+      memory: 1Gi
+  large:
+    limits:
+      cpu: 2
+      memory: 8Gi
+    requests:
+      cpu: 20m
+      memory: 2Gi