Skip to content

Commit

Permalink
feat(minecraft): Deploy a new server
Browse files Browse the repository at this point in the history
eaglesemanation committed Nov 30, 2024
1 parent 2accf2a commit ddf3929
Showing 18 changed files with 109 additions and 555 deletions.
7 changes: 0 additions & 7 deletions k8s/apps/games/minecraft/infrared-config/config.yaml

This file was deleted.

Binary file not shown.
21 changes: 0 additions & 21 deletions k8s/apps/games/minecraft/infrared-config/kustomization.yaml

This file was deleted.

33 changes: 0 additions & 33 deletions k8s/apps/games/minecraft/infrared-config/plugins/api.yaml

This file was deleted.

10 changes: 0 additions & 10 deletions k8s/apps/games/minecraft/infrared-config/plugins/prometheus.yaml

This file was deleted.

This file was deleted.

This file was deleted.

49 changes: 0 additions & 49 deletions k8s/apps/games/minecraft/infrared-config/plugins/webhook.yaml

This file was deleted.

172 changes: 0 additions & 172 deletions k8s/apps/games/minecraft/infrared-config/proxies/defaults.yaml

This file was deleted.

12 changes: 0 additions & 12 deletions k8s/apps/games/minecraft/infrared-config/proxies/gateway.yaml

This file was deleted.

16 changes: 0 additions & 16 deletions k8s/apps/games/minecraft/infrared-config/proxies/vanilla.yaml

This file was deleted.

77 changes: 0 additions & 77 deletions k8s/apps/games/minecraft/infrared.k8s.yaml

This file was deleted.

40 changes: 4 additions & 36 deletions k8s/apps/games/minecraft/ingress.k8s.yaml
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
apiVersion: traefik.io/v1alpha1
kind: IngressRouteTCP
metadata:
name: infrared-java-internal
name: mc-router-internal
namespace: minecraft
annotations:
kubernetes.io/ingress.class: ingress-internal-traefik
@@ -12,14 +12,14 @@ spec:
routes:
- match: HostSNI(`*`)
services:
- name: infrared
- name: minecraft-mc-router
port: 25565
---
# yaml-language-server: $schema=https://raw.githubusercontent.com/datreeio/CRDs-catalog/main/traefik.io/ingressroutetcp_v1alpha1.json
apiVersion: traefik.io/v1alpha1
kind: IngressRouteTCP
metadata:
name: infrared-java-external
name: mc-router-external
namespace: minecraft
annotations:
kubernetes.io/ingress.class: ingress-external-traefik
@@ -29,37 +29,5 @@ spec:
routes:
- match: HostSNI(`*`)
services:
- name: infrared
- name: minecraft-mc-router
port: 25565
---
# yaml-language-server: $schema=https://raw.githubusercontent.com/datreeio/CRDs-catalog/main/traefik.io/ingressrouteudp_v1alpha1.json
apiVersion: traefik.io/v1alpha1
kind: IngressRouteUDP
metadata:
name: infrared-bedrock-internal
namespace: minecraft
annotations:
kubernetes.io/ingress.class: ingress-internal-traefik
spec:
entryPoints:
- mc-bedrock
routes:
- services:
- name: infrared
port: 19132
---
# yaml-language-server: $schema=https://raw.githubusercontent.com/datreeio/CRDs-catalog/main/traefik.io/ingressrouteudp_v1alpha1.json
apiVersion: traefik.io/v1alpha1
kind: IngressRouteUDP
metadata:
name: infrared-bedrock-external
namespace: minecraft
annotations:
kubernetes.io/ingress.class: ingress-external-traefik
spec:
entryPoints:
- mc-bedrock
routes:
- services:
- name: infrared
port: 19132
4 changes: 2 additions & 2 deletions k8s/apps/games/minecraft/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -4,11 +4,11 @@ namespace: minecraft
resources:
- namespace.k8s.yaml
- curseforge-apikey.sops.yaml
- infrared-config
- infrared.k8s.yaml
- service-monitor.k8s.yaml
- ingress.k8s.yaml
- trailing-slash-middleware.k8s.yaml
- mc-router.k8s.yaml
- maria-mc.k8s.yaml
configMapGenerator:
- name: minecraft-dashboard
options:
72 changes: 72 additions & 0 deletions k8s/apps/games/minecraft/maria-mc.k8s.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/datreeio/CRDs-catalog/main/helm.toolkit.fluxcd.io/helmrelease_v2.json
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
name: maria-mc
namespace: flux-system
spec:
interval: 30m
targetNamespace: minecraft
chart:
spec:
chart: minecraft
version: 4.23.2
sourceRef:
kind: HelmRepository
name: itzg-minecraft
namespace: flux-system
interval: 30m
install:
crds: CreateReplace
upgrade:
crds: CreateReplace
values:
resources:
requests:
memory: 4Gi
cpu: 1
persistence:
storageClass: freenas-api-iscsi-csi
extraVolumes:
- volumeMounts:
- name: config
mountPath: /data/config
volumes:
- name: config
persistentVolumeClaim:
claimName: maria-mc-config
serviceAnnotations:
mc-router.itzg.me/externalServerName: maria-mc.${CLUSTER_DOMAIN}
minecraftServer:
eula: "TRUE"
type: "PAPER"
version: "1.21.1"
difficulty: normal
motd: "Welcome to Maria's Minecraft server!"
icon: https://avatars.githubusercontent.com/u/65277548?v=4
modrinth:
projects:
- Vebnzrzj # https://modrinth.com/plugin/luckperms
- UmLGoGij # https://modrinth.com/plugin/discordsrv
- pZ2wrerK # https://modrinth.com/plugin/emotecraft
- fALzjamp # https://modrinth.com/plugin/chunky
- P1OZGk5p # https://modrinth.com/plugin/viaversion
- NpvuJQoq # https://modrinth.com/plugin/viabackwards
- DzD7S3mv # https://modrinth.com/plugin/bending
- evkiwA7V # https://modrinth.com/plugin/axiom-paper-plugin
- tFLdoQMh # https://modrinth.com/plugin/stairsit
- fD1X4Kwd # https://modrinth.com/plugin/lagfixer
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: maria-mc-config
namespace: minecraft
spec:
accessModes:
- ReadWriteMany
volumeMode: Filesystem
resources:
requests:
storage: 1Gi
storageClassName: freenas-api-smb-csi
31 changes: 31 additions & 0 deletions k8s/apps/games/minecraft/mc-router.k8s.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/datreeio/CRDs-catalog/main/helm.toolkit.fluxcd.io/helmrelease_v2.json
apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
name: mc-router
namespace: flux-system
spec:
interval: 30m
targetNamespace: minecraft
chart:
spec:
chart: mc-router
version: 1.2.3
sourceRef:
kind: HelmRepository
name: itzg-minecraft
namespace: flux-system
interval: 30m
install:
crds: CreateReplace
upgrade:
crds: CreateReplace
values:
resources:
requests:
memory: 50Mi
cpu: 100m
limits:
memory: 100Mi
minecraftRouter:
useProxyProtocol: true
8 changes: 0 additions & 8 deletions k8s/apps/network/ingress/helmrelease-external.k8s.yaml
Original file line number Diff line number Diff line change
@@ -170,14 +170,6 @@ spec:
exposedPort: 10000
proxyProtocol:
trustedIPs: [10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16]
mc-bedrock:
protocol: UDP
port: 19132
expose:
default: true
exposedPort: 19132
proxyProtocol:
trustedIPs: [10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16]
mc-java:
protocol: TCP
port: 25565
8 changes: 0 additions & 8 deletions k8s/apps/network/ingress/helmrelease-internal.k8s.yaml
Original file line number Diff line number Diff line change
@@ -139,14 +139,6 @@ spec:
exposedPort: 10000
proxyProtocol:
trustedIPs: [10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16]
mc-bedrock:
protocol: UDP
port: 19132
expose:
default: true
exposedPort: 19132
proxyProtocol:
trustedIPs: [10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16]
mc-java:
protocol: TCP
port: 25565

0 comments on commit ddf3929

Please sign in to comment.