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

@@ -15,7 +15,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 1.0.1
version: 1.0.2
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to

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

View File

@@ -1,7 +1,7 @@
image: hub.ducoterra.net/ducoterra/minecraft:1.16.4
port: 20101
max_cpu: 8
max_ram: 6
max_ram: 8
server_props: |
max-tick-time=60000
generator-settings=
@@ -39,4 +39,4 @@ server_props: |
prevent-proxy-connections=false
use-native-transport=true
motd=This is gonna be interesting
enable-rcon=false
enable-rcon=false