Migrate minecraft
This commit is contained in:
parent
6855a5c43c
commit
8a595bfdbc
@ -1,5 +1,5 @@
|
||||
#helmDefaults:
|
||||
# kubeContext: "{{ `{{ .StateValues.kubeContext }}` }}"
|
||||
helmDefaults:
|
||||
kubeContext: {{ .StateValues.kubeContext }}
|
||||
|
||||
templates:
|
||||
# ---------------------------
|
||||
@ -71,7 +71,7 @@ templates:
|
||||
version: 2.0.0
|
||||
alias: traefik
|
||||
values:
|
||||
- '{{ requiredEnv "PWD" }}/values/common/values.tcp-route.yaml'
|
||||
- '../values/common/values.tcp-route.yaml'
|
||||
ext-udp-routes:
|
||||
dependencies:
|
||||
- chart: bedag/raw
|
||||
|
@ -4,6 +4,10 @@ bases:
|
||||
repositories:
|
||||
- name: gitea
|
||||
url: https://dl.gitea.io/charts/
|
||||
- name: bedag
|
||||
url: https://bedag.github.io/helm-charts/
|
||||
- name: minecraft
|
||||
url: https://itzg.github.io/minecraft-server-charts/
|
||||
|
||||
releases:
|
||||
- name: app-gitea
|
||||
@ -13,3 +17,12 @@ releases:
|
||||
inherit:
|
||||
- template: env-values
|
||||
- template: env-secrets
|
||||
|
||||
- name: minecraft
|
||||
chart: minecraft/minecraft
|
||||
namespace: games
|
||||
version: 4.26.1
|
||||
inherit:
|
||||
- template: common-values-tpl
|
||||
- template: env-values
|
||||
- template: env-secrets
|
||||
|
@ -1,33 +1,15 @@
|
||||
service-account:
|
||||
enabled: true
|
||||
resources:
|
||||
- name: minecraft-exporter
|
||||
label:
|
||||
app: minecraft-minecraft-metrics
|
||||
endpoints:
|
||||
port: metrics
|
||||
traefik:
|
||||
enabled: true
|
||||
tcpRoutes:
|
||||
- name: minecraft-tcp
|
||||
entrypoint: minecraft
|
||||
gateway: istio-system/badhouseplants-minecraft
|
||||
match: HostSNI(`*`)
|
||||
service: minecraft
|
||||
port: 25565
|
||||
# --------------------------------------------------
|
||||
# -- Main values
|
||||
# --------------------------------------------------
|
||||
image:
|
||||
#tag: java21-graalvm
|
||||
tag: java21-jdk
|
||||
tag: java23-graalvm
|
||||
pullPolicy: Always
|
||||
resources:
|
||||
requests:
|
||||
memory: 3.5Gi
|
||||
memory: 2.5Gi
|
||||
cpu: 2.5
|
||||
limits:
|
||||
memory: 3.5Gi
|
||||
memory: 2.5Gi
|
||||
lifecycle:
|
||||
postStart:
|
||||
- bash
|
||||
@ -52,11 +34,11 @@ readinessProbe:
|
||||
successThreshold: 1
|
||||
timeoutSeconds: 20
|
||||
minecraftServer:
|
||||
memory: 3000M
|
||||
memory: 2000M
|
||||
jvmOpts: |
|
||||
-server
|
||||
jvmXXOpts: |
|
||||
-Xms3000G -Xmx3500G -XX:+UseG1GC -XX:+UnlockExperimentalVMOptions -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=32M
|
||||
-Xms2000G -Xmx2500G -XX:+UseG1GC -XX:+UnlockExperimentalVMOptions -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=32M
|
||||
overrideServerProperties: true
|
||||
eula: "TRUE"
|
||||
onlineMode: false
|
||||
@ -89,7 +71,6 @@ minecraftServer:
|
||||
enabled: false
|
||||
persistence:
|
||||
storageClass: openebs-hostpath
|
||||
#storageClass: local-path
|
||||
dataDir:
|
||||
enabled: true
|
||||
Size: 9Gi
|
||||
@ -112,35 +93,6 @@ mcbackup:
|
||||
persistence:
|
||||
backupDir:
|
||||
enabled: false
|
||||
# ---------------------------------------------
|
||||
# -- Install Plugins
|
||||
# ---------------------------------------------
|
||||
initContainers:
|
||||
- name: 0-download-mods
|
||||
image: alpine/curl
|
||||
command:
|
||||
- curl
|
||||
- -L
|
||||
- "https://s3.badhouseplants.net/minecraft-mods/server_mods.tar"
|
||||
- -o
|
||||
- /download/server_mods.tar
|
||||
volumeMounts:
|
||||
- name: download
|
||||
mountPath: /download
|
||||
readOnly: false
|
||||
- name: 1-copy-plugins-to-minecraft
|
||||
image: ubuntu
|
||||
command:
|
||||
- sh
|
||||
- -c
|
||||
- cd /mods && tar -xvf /download/server_mods.tar || true
|
||||
volumeMounts:
|
||||
- name: plugins
|
||||
mountPath: /mods
|
||||
readOnly: false
|
||||
- name: download
|
||||
mountPath: /download
|
||||
readOnly: false
|
||||
extraVolumes:
|
||||
- volumeMounts:
|
||||
- name: plugins
|
||||
@ -171,3 +123,18 @@ extraDeploy:
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/instance: minecraft
|
||||
- |-
|
||||
apiVersion: traefik.io/v1alpha1
|
||||
kind: IngressRouteTCP
|
||||
metadata:
|
||||
name: minecraft-tcp
|
||||
spec:
|
||||
entryPoints:
|
||||
- minecraft
|
||||
routes:
|
||||
- match: HostSNI(`*`)
|
||||
services:
|
||||
- name: minecraft
|
||||
nativeLB: true
|
||||
port: 25565
|
||||
|
33
values/common/games/minecraft/values.gotmpl
Normal file
33
values/common/games/minecraft/values.gotmpl
Normal file
@ -0,0 +1,33 @@
|
||||
image:
|
||||
repository: {{ .Values.registry }}/itzg/minecraft-server
|
||||
pullSecret: regcred
|
||||
|
||||
# ---------------------------------------------
|
||||
# -- Install Plugins
|
||||
# ---------------------------------------------
|
||||
initContainers:
|
||||
- name: 0-download-mods
|
||||
image: {{.Values.registry}}/alpine/curl
|
||||
command:
|
||||
- curl
|
||||
- -L
|
||||
- "https://s3.badhouseplants.net/minecraft-mods/server_mods.tar"
|
||||
- -o
|
||||
- /download/server_mods.tar
|
||||
volumeMounts:
|
||||
- name: download
|
||||
mountPath: /download
|
||||
readOnly: false
|
||||
- name: 1-copy-plugins-to-minecraft
|
||||
image: {{ .Values.registry }}/ubuntu
|
||||
command:
|
||||
- sh
|
||||
- -c
|
||||
- cd /mods && tar -xvf /download/server_mods.tar || true
|
||||
volumeMounts:
|
||||
- name: plugins
|
||||
mountPath: /mods
|
||||
readOnly: false
|
||||
- name: download
|
||||
mountPath: /download
|
||||
readOnly: false
|
Loading…
x
Reference in New Issue
Block a user