Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ jobs:
- cockpit
- grounds-service
- agones-fleet
- grounds-velocity
- plugin-velocity-jar
- grounds-gamemode
steps:
- name: 📥 Checkout code
uses: actions/checkout@v6
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ jobs:
- cockpit
- grounds-service
- agones-fleet
- grounds-velocity
- plugin-velocity-jar
- grounds-gamemode
env:
MATCHES_REF: ${{ startsWith(github.ref, format('refs/tags/{0}-v', matrix.chart)) }}
steps:
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,6 @@ build/
*.tar
*.tar.gz

# AI
.codex
.cursor
5 changes: 4 additions & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,8 @@
"charts/grounds-api": "0.2.0",
"charts/cockpit": "0.1.1",
"charts/grounds-service": "0.1.0",
"charts/agones-fleet": "0.2.0"
"charts/agones-fleet": "0.2.0",
"charts/grounds-velocity": "0.0.1",
"charts/plugin-velocity-jar": "0.0.1",
"charts/grounds-gamemode": "0.0.1"
}
6 changes: 6 additions & 0 deletions charts/grounds-gamemode/Chart.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
dependencies:
- name: common
repository: oci://ghcr.io/groundsgg/charts
version: 0.2.0
digest: sha256:cc3072b8b38019dbcb82c3adde2774f0ade4c29ea47b961c49936a99d44556d2
generated: "2026-05-03T20:27:15.738113+02:00"
10 changes: 10 additions & 0 deletions charts/grounds-gamemode/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: v2
name: grounds-gamemode
description: Minecraft game-server (Paper / Minestom) — Deployment by default, Agones Fleet when scaling
type: application
version: 0.1.0

dependencies:
- name: common
version: "0.2.0"
repository: "oci://ghcr.io/groundsgg/charts"
31 changes: 31 additions & 0 deletions charts/grounds-gamemode/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{{/*
Returns the env block for the game-server container, picking the right
velocity-secret env-var name based on `.Values.kind`.
*/}}
{{- define "grounds-gamemode.env" -}}
{{- $secretEnvName := "" -}}
{{- if eq .Values.kind "lobby" -}}
{{- $secretEnvName = "GROUNDS_LOBBY_VELOCITY_SECRET" -}}
{{- else -}}
{{- $secretEnvName = "PAPER_VELOCITY_SECRET" -}}
{{- end -}}
- name: {{ $secretEnvName }}
valueFrom:
secretKeyRef:
name: {{ .Values.forwardingSecret.name }}
key: {{ .Values.forwardingSecret.key }}
{{- with .Values.extraEnv }}
{{ toYaml . }}
Comment thread
lusu007 marked this conversation as resolved.
{{- end }}
{{- end -}}

{{/*
Resolves the fully-qualified image reference.
*/}}
{{- define "grounds-gamemode.image" -}}
{{- $repo := .Values.image.repository -}}
{{- if .Values.image.registry -}}
{{- $repo = printf "%s/%s" .Values.image.registry .Values.image.repository -}}
{{- end -}}
{{ printf "%s:%s" $repo .Values.image.tag }}
{{- end -}}
54 changes: 54 additions & 0 deletions charts/grounds-gamemode/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{{- if not .Values.agones.enabled }}
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Release.Name }}
labels:
{{- include "common.labels" . | nindent 4 }}
grounds/component: gamemode
grounds/server-type: {{ .Values.kind }}
{{- with .Values.global.commonLabels }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.global.commonAnnotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
replicas: {{ .Values.replicas }}
selector:
matchLabels:
{{- include "common.selectorLabels" . | nindent 6 }}
template:
metadata:
labels:
{{- include "common.podLabels" . | nindent 8 }}
grounds/component: gamemode
grounds/server-type: {{ .Values.kind }}
{{- with .Values.global.commonLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.global.commonAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
containers:
- name: {{ .Release.Name }}
image: {{ include "grounds-gamemode.image" . | quote }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- with .Values.command }}
command:
{{- toYaml . | nindent 12 }}
{{- end }}
ports:
- name: minecraft
containerPort: {{ .Values.containerPort }}
protocol: TCP
env:
{{- include "grounds-gamemode.env" . | nindent 12 }}
{{- with .Values.resources }}
resources:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- end }}
61 changes: 61 additions & 0 deletions charts/grounds-gamemode/templates/fleet.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
{{- if .Values.agones.enabled }}
apiVersion: agones.dev/v1
kind: Fleet
metadata:
name: {{ .Release.Name }}
labels:
{{- include "common.labels" . | nindent 4 }}
grounds/component: gamemode
grounds/server-type: {{ .Values.kind }}
{{- with .Values.global.commonLabels }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.global.commonAnnotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
replicas: {{ .Values.agones.fleet.minReplicas }}
template:
metadata:
labels:
grounds/component: gamemode
grounds/server-type: {{ .Values.kind }}
spec:
ports:
- name: minecraft
portPolicy: Dynamic
containerPort: {{ .Values.containerPort }}
protocol: TCP
container: {{ .Release.Name }}
sdkServer:
logLevel: Info
httpPort: 9358
health:
disabled: true
template:
metadata:
labels:
{{- include "common.podLabels" . | nindent 12 }}
grounds/component: gamemode
grounds/server-type: {{ .Values.kind }}
spec:
containers:
- name: {{ .Release.Name }}
image: {{ include "grounds-gamemode.image" . | quote }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- with .Values.command }}
command:
{{- toYaml . | nindent 16 }}
{{- end }}
ports:
- name: minecraft
containerPort: {{ .Values.containerPort }}
protocol: TCP
env:
{{- include "grounds-gamemode.env" . | nindent 16 }}
{{- with .Values.resources }}
resources:
{{- toYaml . | nindent 16 }}
{{- end }}
{{- end }}
25 changes: 25 additions & 0 deletions charts/grounds-gamemode/templates/service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{{- if not .Values.agones.enabled }}
apiVersion: v1
kind: Service
metadata:
name: {{ .Release.Name }}
labels:
{{- include "common.labels" . | nindent 4 }}
grounds/server-type: {{ .Values.kind }}
{{- with .Values.global.commonLabels }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.global.commonAnnotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
type: {{ .Values.service.type }}
ports:
- port: {{ .Values.containerPort }}
targetPort: minecraft
protocol: TCP
name: minecraft
selector:
{{- include "common.selectorLabels" . | nindent 4 }}
{{- end }}
68 changes: 68 additions & 0 deletions charts/grounds-gamemode/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# Default values for grounds-gamemode.
#
# A grounds-gamemode release is one Minecraft game-server kind. The
# chart picks between two backings:
# - `agones.enabled: true` → Agones Fleet (autoscaled, dynamic ports)
# - `agones.enabled: false` → Deployment + Service (fixed port 25565)
#
# Used in the platform-test environment for both:
# - minestom-lobby (kind: lobby, Deployment, single replica)
# - paper-game (kind: paper, Agones Fleet, scales 0..N)
#
# kind drives which Velocity-secret env-var the container expects:
# - "lobby" → GROUNDS_LOBBY_VELOCITY_SECRET
# - "paper" → PAPER_VELOCITY_SECRET
# - "match" → PAPER_VELOCITY_SECRET
# - "game" → PAPER_VELOCITY_SECRET

global:
commonLabels: {}
commonAnnotations: {}

# Logical kind of the game-server. See note above.
kind: "paper"

image:
registry: "ghcr.io"
repository: "groundsgg/paper-game"
tag: "latest"
pullPolicy: IfNotPresent

# Agones Fleet mode — set agones.enabled=true to switch from Deployment
# to a Fleet. Bundle.yaml's `helm.agones.fleet` map maps directly here.
# This chart currently uses only `minReplicas` as the Fleet `.spec.replicas`
# value; it does not define a FleetAutoscaler.
agones:
enabled: false
fleet:
minReplicas: 0
maxReplicas: 2
Comment thread
lusu007 marked this conversation as resolved.

# Deployment-mode config (ignored when agones.enabled).
replicas: 1

# velocity-forwarding-secret is provisioned out-of-band; the chart
# only references it. Same convention as grounds-velocity.
forwardingSecret:
name: "velocity-forwarding-secret"
key: "secret"

# Container port. Minecraft default 25565.
containerPort: 25565

# Optional command override.
command: []

# extraEnv merges into env after the kind-specific velocity-secret.
extraEnv: []

resources:
requests:
cpu: "500m"
memory: "2Gi"
limits:
cpu: "2"
memory: "4Gi"

service:
type: ClusterIP
6 changes: 6 additions & 0 deletions charts/grounds-velocity/Chart.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
dependencies:
- name: common
repository: oci://ghcr.io/groundsgg/charts
version: 0.2.0
digest: sha256:cc3072b8b38019dbcb82c3adde2774f0ade4c29ea47b961c49936a99d44556d2
generated: "2026-05-03T20:26:58.10509+02:00"
10 changes: 10 additions & 0 deletions charts/grounds-velocity/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: v2
name: grounds-velocity
description: Velocity Minecraft proxy with per-plugin JAR fetching for the platform-test environment
type: application
version: 0.1.0

dependencies:
- name: common
version: "0.2.0"
repository: "oci://ghcr.io/groundsgg/charts"
Loading