From 354a479396c594e70bc87f121c1b8e8e9184c068 Mon Sep 17 00:00:00 2001 From: ducoterra Date: Sun, 29 Aug 2021 15:25:07 -0400 Subject: [PATCH] Add minecraft 1.0.2 update --- charts/minecraft/1.0.2/.helmignore | 23 ++++++++ charts/minecraft/1.0.2/Chart.yaml | 23 ++++++++ charts/minecraft/1.0.2/README.md | 3 ++ charts/minecraft/1.0.2/app-readme.md | 3 ++ charts/minecraft/1.0.2/ix_values.yaml | 1 + charts/minecraft/1.0.2/questions.yaml | 30 +++++++++++ .../minecraft/1.0.2/templates/configmap.yaml | 8 +++ charts/minecraft/1.0.2/templates/deploy.yaml | 52 +++++++++++++++++++ charts/minecraft/1.0.2/templates/pvc.yaml | 12 +++++ charts/minecraft/1.0.2/templates/service.yaml | 12 +++++ charts/minecraft/1.0.2/values.yaml | 42 +++++++++++++++ 11 files changed, 209 insertions(+) create mode 100644 charts/minecraft/1.0.2/.helmignore create mode 100644 charts/minecraft/1.0.2/Chart.yaml create mode 100644 charts/minecraft/1.0.2/README.md create mode 100644 charts/minecraft/1.0.2/app-readme.md create mode 100644 charts/minecraft/1.0.2/ix_values.yaml create mode 100644 charts/minecraft/1.0.2/questions.yaml create mode 100644 charts/minecraft/1.0.2/templates/configmap.yaml create mode 100644 charts/minecraft/1.0.2/templates/deploy.yaml create mode 100644 charts/minecraft/1.0.2/templates/pvc.yaml create mode 100644 charts/minecraft/1.0.2/templates/service.yaml create mode 100644 charts/minecraft/1.0.2/values.yaml diff --git a/charts/minecraft/1.0.2/.helmignore b/charts/minecraft/1.0.2/.helmignore new file mode 100644 index 0000000..0e8a0eb --- /dev/null +++ b/charts/minecraft/1.0.2/.helmignore @@ -0,0 +1,23 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*.orig +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/charts/minecraft/1.0.2/Chart.yaml b/charts/minecraft/1.0.2/Chart.yaml new file mode 100644 index 0000000..61a1a40 --- /dev/null +++ b/charts/minecraft/1.0.2/Chart.yaml @@ -0,0 +1,23 @@ +apiVersion: v2 +name: minecraft +description: A Minecraft server for kubernetes + +# A chart can be either an 'application' or a 'library' chart. +# +# Application charts are a collection of templates that can be packaged into versioned archives +# to be deployed. +# +# Library charts provide useful utilities or functions for the chart developer. They're included as +# a dependency of application charts to inject those utilities and functions into the rendering +# pipeline. Library charts do not define any templates and therefore cannot be deployed. +type: application + +# This is the chart version. This version number should be incremented each time you make changes +# to the chart and its templates, including the app version. +# Versions are expected to follow Semantic Versioning (https://semver.org/) +version: 1.0.2 + +# This is the version number of the application being deployed. This version number should be +# incremented each time you make changes to the application. Versions are not expected to +# follow Semantic Versioning. They should reflect the version the application is using. +appVersion: 1.16.4 diff --git a/charts/minecraft/1.0.2/README.md b/charts/minecraft/1.0.2/README.md new file mode 100644 index 0000000..0b3d699 --- /dev/null +++ b/charts/minecraft/1.0.2/README.md @@ -0,0 +1,3 @@ +# Minecraft Server + +Creates a vanilla Minecraft server. diff --git a/charts/minecraft/1.0.2/app-readme.md b/charts/minecraft/1.0.2/app-readme.md new file mode 100644 index 0000000..0b3d699 --- /dev/null +++ b/charts/minecraft/1.0.2/app-readme.md @@ -0,0 +1,3 @@ +# Minecraft Server + +Creates a vanilla Minecraft server. diff --git a/charts/minecraft/1.0.2/ix_values.yaml b/charts/minecraft/1.0.2/ix_values.yaml new file mode 100644 index 0000000..0dd21fa --- /dev/null +++ b/charts/minecraft/1.0.2/ix_values.yaml @@ -0,0 +1 @@ +image: ducoterra/minecraft:1.16.4 diff --git a/charts/minecraft/1.0.2/questions.yaml b/charts/minecraft/1.0.2/questions.yaml new file mode 100644 index 0000000..82aea13 --- /dev/null +++ b/charts/minecraft/1.0.2/questions.yaml @@ -0,0 +1,30 @@ +groups: + - name: "Server Config" + description: "Minecraft Server Configuration" + - name: "Storage" + description: "Minecraft Server Storage" +questions: + - variable: port + description: "Listen Port" + group: "Server Config" + label: "Port" + schema: + type: int + default: 25565 + required: true + - variable: max_ram + description: "Total RAM allocated to the server" + group: "Server Config" + label: "RAM Limit (GiB)" + schema: + type: int + default: 4 + required: true + - variable: max_cpu + description: "# CPU Cores Allocated to the server" + group: "Server Config" + label: "CPU Limit (# Cores)" + schema: + type: int + default: 4 + required: true diff --git a/charts/minecraft/1.0.2/templates/configmap.yaml b/charts/minecraft/1.0.2/templates/configmap.yaml new file mode 100644 index 0000000..43a784a --- /dev/null +++ b/charts/minecraft/1.0.2/templates/configmap.yaml @@ -0,0 +1,8 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ .Release.Name }} +data: + eula.txt: | + eula=true + server.properties: {{ toYaml .Values.server_props | indent 2 }} \ No newline at end of file diff --git a/charts/minecraft/1.0.2/templates/deploy.yaml b/charts/minecraft/1.0.2/templates/deploy.yaml new file mode 100644 index 0000000..71ec540 --- /dev/null +++ b/charts/minecraft/1.0.2/templates/deploy.yaml @@ -0,0 +1,52 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ .Release.Name }} +spec: + selector: + matchLabels: + app: {{ .Release.Name }} + strategy: + type: Recreate + template: + metadata: + labels: + app: {{ .Release.Name }} + spec: + containers: + - name: {{ .Release.Name }} + image: {{ .Values.image }} + ports: + - containerPort: 25565 + volumeMounts: + - mountPath: /mc_data + name: data + - name: properties + mountPath: /mc_data/server.properties + subPath: server.properties + - name: properties + mountPath: /mc_data/eula.txt + subPath: eula.txt + tty: true + stdin: true + env: + - name: MAX_RAM + value: {{ .Values.max_ram | quote }} + - name: MIN_RAM + value: {{ .Values.max_ram | quote }} + resources: + requests: + memory: {{ .Values.max_ram }}Gi + cpu: 1m + limits: + memory: {{ .Values.max_ram }}Gi + cpu: {{ .Values.max_cpu | quote }} + volumes: + - name: data + persistentVolumeClaim: + claimName: {{ .Release.Name }} + - name: properties + configMap: + name: {{ .Release.Name }} + securityContext: + fsGroup: 2000 diff --git a/charts/minecraft/1.0.2/templates/pvc.yaml b/charts/minecraft/1.0.2/templates/pvc.yaml new file mode 100644 index 0000000..e825a00 --- /dev/null +++ b/charts/minecraft/1.0.2/templates/pvc.yaml @@ -0,0 +1,12 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: {{ .Release.Name }} + annotations: + "helm.sh/resource-policy": keep +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 32Gi \ No newline at end of file diff --git a/charts/minecraft/1.0.2/templates/service.yaml b/charts/minecraft/1.0.2/templates/service.yaml new file mode 100644 index 0000000..eade03e --- /dev/null +++ b/charts/minecraft/1.0.2/templates/service.yaml @@ -0,0 +1,12 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ .Release.Name }} +spec: + selector: + app: {{ .Release.Name }} + ports: + - port: {{ .Values.port }} + targetPort: 25565 + name: {{ .Release.Name }} + type: LoadBalancer \ No newline at end of file diff --git a/charts/minecraft/1.0.2/values.yaml b/charts/minecraft/1.0.2/values.yaml new file mode 100644 index 0000000..ab1e939 --- /dev/null +++ b/charts/minecraft/1.0.2/values.yaml @@ -0,0 +1,42 @@ +image: ducoterra/minecraft:1.16.4 +port: 20101 +max_cpu: 4 +max_ram: 4 +server_props: | + max-tick-time=60000 + generator-settings= + force-gamemode=false + allow-nether=true + gamemode=0 + broadcast-console-to-ops=true + enable-query=false + player-idle-timeout=0 + difficulty=3 + spawn-monsters=true + op-permission-level=4 + pvp=true + snooper-enabled=true + level-type=default + hardcore=false + enable-command-block=false + max-players=20 + network-compression-threshold=256 + resource-pack-sha1= + max-world-size=29999984 + server-port=25565 + server-ip= + spawn-npcs=true + allow-flight=true + level-name=world + view-distance=32 + resource-pack= + spawn-animals=true + white-list=true + generate-structures=true + online-mode=true + max-build-height=256 + level-seed= + prevent-proxy-connections=false + use-native-transport=true + motd=This is gonna be interesting + enable-rcon=false