mcing

module
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 10, 2023 License: MIT

README

CI

MCing

MCing is a Kubernetes operator for Minecraft server.

Supported software

Quick start

You can quickly run MCing using kind.

$ cd e2e
$ make start bootstrap
$ cat <<EOF > minecraft-sample.yaml
apiVersion: mcing.kmdkuk.com/v1alpha1
kind: Minecraft
metadata:
  name: minecraft-sample
spec:
  # whitelist:
  #   enabled: true
  #   users:
  #     - <invite player name>
  # ops:
  #   users:
  #     - <operator player name>
  podTemplate:
    spec:
      containers:
      - name: minecraft
        image: itzg/minecraft-server:java17
        env:
        - name: TYPE
          value: "PAPER"
        - name: EULA
          value: "true"
  serviceTemplate:
    spec:
      type: NodePort
  volumeClaimTemplates:
  - metadata:
      name: minecraft-data
    spec:
      accessModes: [ "ReadWriteOnce" ]
      storageClassName: standard
      resources:
        requests:
          storage: 1Gi
  serverPropertiesConfigMapName: mcing-server-props
---
apiVersion: v1
kind: ConfigMap
metadata:
  name: mcing-server-props
data:
  motd: "[this is test]A Vanilla Minecraft Server powered by MCing"
  pvp: "true"
  difficulty: "hard"
EOF
$ ../bin/kubectl --kubeconfig .kubeconfig apply -f minecraft-sample.yaml
$ ../bin/kubectl --kubeconfig .kubeconfig port-forward svc/mcing-minecraft-sample 25565:25565

if you can use aqua, it can be developed as follows

$ cd MCing
$ aqua i
$ make start
$ tilt up
Tilt started on http://localhost:10350/
v0.30.4, built 2022-06-16

(space) to open the browser
(s) to stream logs (--stream=true)
(t) to open legacy terminal mode (--legacy=true)
(ctrl-c) to exit

You can access localhost:10350 to check build and controller logs.

For termination, the following

# Exit the tilt up command by typing ctrl-c
$ tilt down
$ make stop

Documentation

See https://kmdk.uk/MCing

Docker images

Docker images are available on ghcr.io/kmdkuk/mcing.

Directories

Path Synopsis
api
v1alpha1
Package v1alpha1 contains API Schema definitions for the mcing v1alpha1 API group +kubebuilder:object:generate=true +groupName=mcing.kmdkuk.com
Package v1alpha1 contains API Schema definitions for the mcing v1alpha1 API group +kubebuilder:object:generate=true +groupName=mcing.kmdkuk.com
cmd
internal
pkg
log

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL