Fix RAM issue with deploy

A deploy was running the same max ram for both the pod and the java
app. This led to issues where the java app would use its max ram and the
pod would think it was out of memory. It would kill the pod and the
minecraft server with it, often not saving the last few minutes of
progress.

Now the deploy runs 1GiB extra ram than the java app.
This commit is contained in:
ducoterra
2021-09-11 14:08:38 -04:00
parent 44053abdf8
commit dae5a097e9
3 changed files with 8 additions and 8 deletions

View File

@@ -6,8 +6,8 @@ spec:
selector:
matchLabels:
app: {{ .Release.Name }}
updateStrategy:
type: Recreate
strategy:
type: Recreate
template:
metadata:
labels:
@@ -33,13 +33,13 @@ spec:
- name: MAX_RAM
value: {{ .Values.max_ram | quote }}
- name: MIN_RAM
value: {{ .Values.max_ram | quote }}
value: "1"
resources:
requests:
memory: {{ .Values.max_ram }}Gi
memory: {{ div .Values.max_ram 2 }}Gi
cpu: 1m
limits:
memory: {{ .Values.max_ram }}Gi
memory: {{ add 1 .Values.max_ram }}Gi
cpu: {{ .Values.max_cpu | quote }}
volumes:
- name: data