diff --git a/templates/consumer_limitrange.yaml b/templates/consumer_limitrange.yaml new file mode 100644 index 0000000..d108f4e --- /dev/null +++ b/templates/consumer_limitrange.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: LimitRange +metadata: + name: {{ .Release.Name }}-limit-range + namespace: {{ .Values.namespace }} +spec: + limits: + - default: + memory: {{.Values.resources.limits.memory}} + cpu: {{.Values.resources.limits.cpu}} + defaultRequest: + memory: {{.Values.resources.requests.memory}} + cpu: {{.Values.resources.requests.cpu}} + type: Container diff --git a/templates/deployment.yaml b/templates/deployment.yaml index 43ecf7b..59962e4 100644 --- a/templates/deployment.yaml +++ b/templates/deployment.yaml @@ -48,6 +48,13 @@ spec: - name: {{ .Chart.Name }}-consumer image: "{{ .Values.image.repository }}/{{ .Values.image.name }}:{{ .Values.image.tag }}" imagePullPolicy: {{ .Values.image.pullPolicy }} + resources: + requests: + memory: {{ .Values.resources.requests.memory}} + cpu: {{ .Values.resources.requests.cpu}} + limits: + memory: {{ .Values.resources.limits.memory}} + cpu: {{ .Values.resources.limits.cpu}} env: - name: BROKER_0 valueFrom: diff --git a/values.yaml b/values.yaml index 05ff6c8..f6697b9 100644 --- a/values.yaml +++ b/values.yaml @@ -50,6 +50,14 @@ service: type: ClusterIP port: 80 +resources: + limits: + memory: "512Mi" + cpu: "0.8" + requests: + memory: "128Mi" + cpu: "0.4" + psql: enabled: true @@ -67,6 +75,13 @@ postgresql: app: consumer-db podLabels: app: consumer-db + resources: + limits: + memory: "1024Mi" + cpu: "1" + requests: + memory: "512Mi" + cpu: "0.5" kafka: listeners: @@ -84,6 +99,13 @@ kafka: replicaCount: 3 persistence: size: 1Gi + resources: + limits: + memory: "1024Mi" + cpu: "1" + requests: + memory: "512Mi" + cpu: "0.5" serviceAccount: create: false provisioning: