From b1aa0ae0ae679a0986da5da8ebf21782325e5f3f Mon Sep 17 00:00:00 2001 From: Michael Thomson Date: Mon, 8 Dec 2025 16:58:04 -0500 Subject: [PATCH] minecraft --- apps/minecraft/dns-endpoint.yaml | 15 +++++++ apps/minecraft/namespace.yaml | 4 ++ apps/minecraft/release.yaml | 49 +++++++++++++++++++++ apps/minecraft/repository.yaml | 9 ++++ bootstrap/apps/kustomization-minecraft.yaml | 15 +++++++ 5 files changed, 92 insertions(+) create mode 100644 apps/minecraft/dns-endpoint.yaml create mode 100644 apps/minecraft/namespace.yaml create mode 100644 apps/minecraft/release.yaml create mode 100644 apps/minecraft/repository.yaml create mode 100644 bootstrap/apps/kustomization-minecraft.yaml diff --git a/apps/minecraft/dns-endpoint.yaml b/apps/minecraft/dns-endpoint.yaml new file mode 100644 index 0000000..a3a39b2 --- /dev/null +++ b/apps/minecraft/dns-endpoint.yaml @@ -0,0 +1,15 @@ +apiVersion: externaldns.k8s.io/v1alpha1 +kind: DNSEndpoint +metadata: + name: mc.michaelthomson.dev + namespace: minecraft +spec: + endpoints: + - dnsName: mc.michaelthomson.dev + recordTTL: 180 + recordType: CNAME + targets: + - michaelthomson.ddns.net + providerSpecific: + - name: external-dns.alpha.kubernetes.io/cloudflare-proxied + value: "false" diff --git a/apps/minecraft/namespace.yaml b/apps/minecraft/namespace.yaml new file mode 100644 index 0000000..4ad4f70 --- /dev/null +++ b/apps/minecraft/namespace.yaml @@ -0,0 +1,4 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: minecraft diff --git a/apps/minecraft/release.yaml b/apps/minecraft/release.yaml new file mode 100644 index 0000000..951425f --- /dev/null +++ b/apps/minecraft/release.yaml @@ -0,0 +1,49 @@ +apiVersion: helm.toolkit.fluxcd.io/v2 +kind: HelmRelease +metadata: + name: minecraft + namespace: minecraft +spec: + chart: + spec: + chart: minecraft + version: 5.x + sourceRef: + kind: HelmRepository + name: minecraft + interval: 15m + releaseName: minecraft + values: + nodeSelector: + kubernetes.io/hostname: larry + + minecraftServer: + # This must be overridden, since we can't accept this for the user. + eula: true + # One of: LATEST, SNAPSHOT, or a specific version (ie: "1.7.9"). + version: "LATEST" + ## The type of Minecraft server to run, check for related settings below + ## Common types: "VANILLA", "FABRIC", "FORGE", "SPIGOT", "BUKKIT", "PAPER", + ## "FTBA", "SPONGEVANILLA", "AUTO_CURSEFORGE" + ## ref: https://docker-minecraft-server.readthedocs.io/en/latest/types-and-platforms + type: "VANILLA" + # One of: peaceful, easy, normal, and hard + difficulty: normal + # A comma-separated list of player names to whitelist. + whitelist: DrDeww + # A comma-separated list of player names who should be admins. + ops: DrDeww + # A server icon URL for server listings. Auto-scaled and transcoded. + icon: + # Message of the Day + motd: "Welcome to Michael's Minecraft Server" + worldSaveName: world + # If you adjust this, you may need to adjust resources.requests above to match. + memory: 1024M + + persistence: + dataDir: + enabled: true + Size: 8Gi + accessModes: + - ReadWriteOnce diff --git a/apps/minecraft/repository.yaml b/apps/minecraft/repository.yaml new file mode 100644 index 0000000..1d30b33 --- /dev/null +++ b/apps/minecraft/repository.yaml @@ -0,0 +1,9 @@ +apiVersion: source.toolkit.fluxcd.io/v1 +kind: HelmRepository +metadata: + name: minecraft + namespace: minecraft +spec: + interval: 15m + url: https://itzg.github.io/minecraft-server-charts/ + diff --git a/bootstrap/apps/kustomization-minecraft.yaml b/bootstrap/apps/kustomization-minecraft.yaml new file mode 100644 index 0000000..bf97b6f --- /dev/null +++ b/bootstrap/apps/kustomization-minecraft.yaml @@ -0,0 +1,15 @@ +apiVersion: kustomize.toolkit.fluxcd.io/v1 +kind: Kustomization +metadata: + name: minecraft + namespace: flux-system +spec: + interval: 15m + path: ./apps/minecraft + prune: true # remove any elements later removed from the above path + wait: true + sourceRef: + kind: GitRepository + name: flux-system + dependsOn: + - name: infra-configs