diff --git a/core-services/traefik/values.yaml b/core-services/traefik/values.yaml index 564deef..cc6df75 100644 --- a/core-services/traefik/values.yaml +++ b/core-services/traefik/values.yaml @@ -26,6 +26,7 @@ additionalArguments: - "--entryPoints.ssh.address=:22/tcp" - "--entryPoints.minecraft-gtnh.address=:25566/tcp" - "--entryPoints.minecraft-tfg.address=:25567/tcp" + - "--entryPoints.minecraft-star-technology.address=:25568/tcp" ports: ssh: name: ssh @@ -48,3 +49,10 @@ ports: expose: default: true protocol: TCP + minecraft-star-technology: + name: minecraft-star-technology + port: 25568 + exposedPort: 25568 + expose: + default: true + protocol: TCP diff --git a/gaming-services/minecraft/index.ts b/gaming-services/minecraft/index.ts index 3b21e1e..456cf68 100644 --- a/gaming-services/minecraft/index.ts +++ b/gaming-services/minecraft/index.ts @@ -5,6 +5,7 @@ import { NamespaceV1 } from "@cdktf/provider-kubernetes/lib/namespace-v1"; import { OnePasswordSecret } from "../../utils"; import { TerraFirmaGreg } from "./tfg"; import { GTNH } from "./gtnh"; +import { StarTechnology } from "./star-technology"; export class GamingServices extends TerraformStack { constructor(scope: Construct, id: string) { @@ -31,5 +32,6 @@ export class GamingServices extends TerraformStack { new TerraFirmaGreg(this, "tfg", provider, namespace); new GTNH(this, "gtnh", provider, namespace); + new StarTechnology(this, "star-technology", provider, namespace); } } diff --git a/gaming-services/minecraft/star-technology.ts b/gaming-services/minecraft/star-technology.ts new file mode 100644 index 0000000..8899591 --- /dev/null +++ b/gaming-services/minecraft/star-technology.ts @@ -0,0 +1,74 @@ +import { Construct } from "constructs"; +import { KubernetesProvider } from "@cdktf/provider-kubernetes/lib/provider"; + +import { MinecraftServer } from "./utils"; + +export class StarTechnology extends Construct { + constructor( + scope: Construct, + id: string, + provider: KubernetesProvider, + namespace: string, + ) { + super(scope, id); + + new MinecraftServer(this, "star-technology", { + provider, + namespace, + image: "itzg/minecraft-server:java21", + name: "star-technology", + env: [ + { + name: "EULA", + value: "TRUE", + }, + { + name: "MODE", + value: "survival", + }, + { + name: "MODPACK_PLATFORM", + value: "AUTO_CURSEFORGE", + }, + { + name: "CF_API_KEY", + valueFrom: { + secretKeyRef: { + name: "curseforge", + key: "credential", + }, + }, + }, + { + name: "CF_PAGE_URL", + value: + "https://www.curseforge.com/minecraft/modpacks/star-technology", + }, + { + name: "VERSION", + value: "1.20.1", + }, + { + name: "INIT_MEMORY", + value: "2G", + }, + { + name: "MAX_MEMORY", + value: "12G", + }, + { + name: "ALLOW_FLIGHT", + value: "TRUE", + }, + { + name: "ENABLE_ROLLING_LOGS", + value: "TRUE", + }, + { + name: "USE_MEOWICE_FLAGS", + value: "TRUE", + }, + ], + }); + } +}