Giter VIP home page Giter VIP logo

k8s-minecraft's Introduction

k8s-minecraft

Minecraft in K8S because why not?

Goals

Goal of this repo is to provide kind of easy to use container images to be used in Kubernetes. In addition to container images, Helm Charts for Paper (can be used as a base for generic Minecraft Server) and Waterfall deployment.

Helm Charts

The Helm charts default values.yaml assume that you agree to the Minecraft EULA.

Flow

Flow

Click to expand

sequenceDiagram
  participant Entrypoint
  participant GitRepo
  participant MCServer

  Entrypoint --> GitRepo: Check if a new revision is available
  Entrypoint -->> MCServer: Copy all or changed files to data dir (including jars)
  Entrypoint --> Entrypoint: Run envsubst + other scripts on files
  Entrypoint --> MCServer: Start Server
  MCServer --> MCServer: Run
  MCServer --> MCServer: Restarted (/restart Command)
  Entrypoint --> GitRepo: Check for new revision
  Entrypoint -->> MCServer: Copy all or changed files to data dir (including jars)
  Entrypoint --> Entrypoint: Run envsubst + other scripts on files
  Entrypoint --> MCServer: Start Server
  MCServer --> MCServer: Run
  GitRepo --> GitRepo: Commit pushed
  Entrypoint --> GitRepo: Checks for new revision every 10-20 seconds
  Entrypoint -->> MCServer: Copy all or changed files to data dir (without jars)
  Entrypoint --> Entrypoint: Run envsubst + other scripts on files

  note left of GitRepo: All files are only copied if the server's revision is not found in the git history
  note right of Entrypoint: Only changed files are copied to a server

The "copying of files from the GitRepo to the MCServer" will have the following features:

  • Variables in format ${VARIABLE} are replaced in all config files.
  • yq can be used for applying patch files to config files.
  • Depending on if the server is running, *.jar files are not updated.
  • Depending on if the server's revision is still available in the git history, only changed files are copied, otherwise "everything" is copied.
  • A function to copy a map to the server, e.g., to easily have lobby servers their map always the same / updated after a restart. (Not implemented yet)

Shoutouts

k8s-minecraft's People

Contributors

galexrt avatar github-actions[bot] avatar

Stargazers

Erik Rose avatar PbtinaDev <3 avatar

Watchers

James Cloos avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.