Skip to content

Commit

Permalink
Add memory request/limit for ComPAIR
Browse files Browse the repository at this point in the history
  • Loading branch information
xcompass committed Jan 15, 2022
1 parent 05ff75b commit 65b1c3a
Show file tree
Hide file tree
Showing 7 changed files with 48 additions and 1 deletion.
2 changes: 1 addition & 1 deletion compair/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ keywords:
- peer learning
- education
name: compair
version: 0.6.5
version: 0.6.6
appVersion: 1.2.7
home: http://ubc.github.io/compair/
sources:
Expand Down
2 changes: 2 additions & 0 deletions compair/templates/compair-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,8 @@ spec:
httpGet:
path: /app/
port: {{ .Values.app.service.internalPort }}
resources:
{{ toYaml .Values.app.resources | indent 10 }}
{{- if .Values.app.persistence.enabled }}
volumeMounts:
- name: {{ template "fullname" . }}-persistent-storage
Expand Down
2 changes: 2 additions & 0 deletions compair/templates/compair-worker-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,8 @@ spec:
- name: LOGIN_ADDITIONAL_INSTRUCTIONS_HTML
value: {{ .Values.loginAdditionalInstructionsHTML | quote }}
{{- end }}
resources:
{{ toYaml .Values.worker.resources | indent 10 }}
{{- if .Values.app.persistence.enabled }}
volumeMounts:
- name: {{ template "fullname" . }}-persistent-storage
Expand Down
2 changes: 2 additions & 0 deletions compair/templates/compair-worker-scheduler-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -250,4 +250,6 @@ spec:
- name: LOGIN_ADDITIONAL_INSTRUCTIONS_HTML
value: {{ .Values.loginAdditionalInstructionsHTML | quote }}
{{- end }}
resources:
{{ toYaml .Values.scheduler.resources | indent 10 }}
{{- end }}
2 changes: 2 additions & 0 deletions compair/templates/mysql-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ spec:
key: mysql_password
ports:
- containerPort: 3306
resources:
{{ toYaml .Values.db.resources | indent 10 }}
{{- if .Values.db.persistence.enabled }}
volumeMounts:
- name: mysql-persistent-storage
Expand Down
2 changes: 2 additions & 0 deletions compair/templates/redis-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ spec:
volumeMounts:
- name: redis-persistent-storage
mountPath: /data
resources:
{{ toYaml .Values.redis.resources | indent 10 }}
volumes:
- name: redis-persistent-storage
persistentVolumeClaim:
Expand Down
37 changes: 37 additions & 0 deletions compair/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -141,13 +141,36 @@ app:
kubernetes.io/ingress.class: nginx
kubernetes.io/tls-acme: "true"
nginx.ingress.kubernetes.io/proxy-body-size: *uploadLimit
resources:
limits:
# cpu: 100m
memory: 512Mi
requests:
# cpu: 100m
memory: 256Mi

worker:
replicaCount: 1
image:
repository: ubcctlt/compair-app
tag: latest
pullPolicy: IfNotPresent
resources:
limits:
# cpu: 100m
memory: 800Mi
requests:
# cpu: 100m
memory: 512Mi

scheduler:
resources:
limits:
# cpu: 100m
memory: 100Mi
requests:
# cpu: 100m
memory: 64Mi

db:
image:
Expand All @@ -159,6 +182,13 @@ db:
#storageClass: fast
#accessMode: ReadWriteOnce
#size: 8Gi
resources:
limits:
# cpu: 100m
memory: 512Mi
requests:
# cpu: 100m
memory: 256Mi

redis:
image:
Expand All @@ -172,3 +202,10 @@ redis:
#storageClass: fast
#accessMode: ReadWriteOnce
#size: 1Gi
resources:
limits:
# cpu: 100m
memory: 100Mi
requests:
# cpu: 100m
memory: 64Mi

0 comments on commit 65b1c3a

Please sign in to comment.