Compare commits
4 commits
Author | SHA1 | Date | |
---|---|---|---|
9335bfc21b | |||
6bad16fe0a | |||
b99f2ebc8c | |||
3951b51656 |
8 changed files with 254 additions and 1 deletions
2
LICENSE
2
LICENSE
|
@ -602,7 +602,7 @@ Also add information on how to contact you by electronic and paper mail.
|
||||||
If the program does terminal interaction, make it output a short notice like
|
If the program does terminal interaction, make it output a short notice like
|
||||||
this when it starts in an interactive mode:
|
this when it starts in an interactive mode:
|
||||||
|
|
||||||
<program> Copyright (C) <year> <name of author>
|
Zombi Charts Copyright (C) 2021 Zom.bi community
|
||||||
|
|
||||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||||
|
|
||||||
|
|
23
zombi/minecraft/.helmignore
Normal file
23
zombi/minecraft/.helmignore
Normal file
|
@ -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/
|
7
zombi/minecraft/Chart.yaml
Normal file
7
zombi/minecraft/Chart.yaml
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
apiVersion: v2
|
||||||
|
name: minecraft
|
||||||
|
description: Server for the game "minecraft"
|
||||||
|
|
||||||
|
version: 0.1.0
|
||||||
|
|
||||||
|
appVersion: forge
|
52
zombi/minecraft/templates/_helpers.tpl
Normal file
52
zombi/minecraft/templates/_helpers.tpl
Normal file
|
@ -0,0 +1,52 @@
|
||||||
|
{{/*
|
||||||
|
Expand the name of the chart.
|
||||||
|
*/}}
|
||||||
|
{{- define "minecraft.name" -}}
|
||||||
|
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create a default fully qualified app name.
|
||||||
|
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||||
|
If release name contains chart name it will be used as a full name.
|
||||||
|
*/}}
|
||||||
|
{{- define "minecraft.fullname" -}}
|
||||||
|
{{- if .Values.fullnameOverride }}
|
||||||
|
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
|
||||||
|
{{- else }}
|
||||||
|
{{- $name := default .Chart.Name .Values.nameOverride }}
|
||||||
|
{{- if contains $name .Release.Name }}
|
||||||
|
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
|
||||||
|
{{- else }}
|
||||||
|
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create chart name and version as used by the chart label.
|
||||||
|
*/}}
|
||||||
|
{{- define "minecraft.chart" -}}
|
||||||
|
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Common labels
|
||||||
|
*/}}
|
||||||
|
{{- define "minecraft.labels" -}}
|
||||||
|
helm.sh/chart: {{ include "minecraft.chart" . }}
|
||||||
|
{{ include "minecraft.selectorLabels" . }}
|
||||||
|
{{- if .Chart.AppVersion }}
|
||||||
|
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
||||||
|
{{- end }}
|
||||||
|
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Selector labels
|
||||||
|
*/}}
|
||||||
|
{{- define "minecraft.selectorLabels" -}}
|
||||||
|
app.kubernetes.io/name: {{ include "minecraft.name" . }}
|
||||||
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
|
{{- end }}
|
||||||
|
|
82
zombi/minecraft/templates/deployment.yaml
Normal file
82
zombi/minecraft/templates/deployment.yaml
Normal file
|
@ -0,0 +1,82 @@
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: {{ include "minecraft.fullname" . }}
|
||||||
|
labels:
|
||||||
|
{{- include "minecraft.labels" . | nindent 4 }}
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
strategy:
|
||||||
|
type: Recreate # Avoid parallel access to the volume
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
{{- include "minecraft.selectorLabels" . | nindent 6 }}
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
{{- with .Values.podAnnotations }}
|
||||||
|
annotations:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
labels:
|
||||||
|
{{- include "minecraft.selectorLabels" . | nindent 8 }}
|
||||||
|
spec:
|
||||||
|
{{- with .Values.imagePullSecrets }}
|
||||||
|
imagePullSecrets:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
serviceAccountName: default
|
||||||
|
securityContext:
|
||||||
|
{{- toYaml .Values.podSecurityContext | nindent 8 }}
|
||||||
|
terminationGracePeriodSeconds: 30
|
||||||
|
volumes:
|
||||||
|
- name: minecraft
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: {{ include "minecraft.fullname" . }}
|
||||||
|
initContainers:
|
||||||
|
- name: download
|
||||||
|
image: alpine:3.12.1
|
||||||
|
imagePullPolicy: IfNotPresent
|
||||||
|
command:
|
||||||
|
- sh
|
||||||
|
- -c
|
||||||
|
- '[[ ! -d /minecraft/world ]] && wget -O- "{{ .Values.downloadURL }}" | tar -x --strip-components=1 -C /minecraft || true'
|
||||||
|
volumeMounts:
|
||||||
|
- name: minecraft
|
||||||
|
mountPath: /minecraft
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
cpu: 100m
|
||||||
|
memory: 64Mi
|
||||||
|
limits:
|
||||||
|
cpu: 100m
|
||||||
|
memory: 64Mi
|
||||||
|
containers:
|
||||||
|
- name: {{ .Chart.Name }}
|
||||||
|
securityContext:
|
||||||
|
{{- toYaml .Values.securityContext | nindent 12 }}
|
||||||
|
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
|
||||||
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||||
|
env:
|
||||||
|
- name: JAVA_OPTS
|
||||||
|
value: '-Xms3500m -Xmx3500m'
|
||||||
|
volumeMounts:
|
||||||
|
- name: minecraft
|
||||||
|
mountPath: /minecraft
|
||||||
|
ports:
|
||||||
|
- containerPort: 25565
|
||||||
|
name: minecraft
|
||||||
|
protocol: TCP
|
||||||
|
resources:
|
||||||
|
{{- toYaml .Values.resources | nindent 12 }}
|
||||||
|
{{- with .Values.nodeSelector }}
|
||||||
|
nodeSelector:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.affinity }}
|
||||||
|
affinity:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Values.tolerations }}
|
||||||
|
tolerations:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
20
zombi/minecraft/templates/pvc.yaml
Normal file
20
zombi/minecraft/templates/pvc.yaml
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
{{- if .Values.persistence.enabled }}
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
apiVersion: v1
|
||||||
|
metadata:
|
||||||
|
name: {{ include "minecraft.fullname" . }}
|
||||||
|
labels:
|
||||||
|
{{- include "minecraft.labels" . | nindent 4 }}
|
||||||
|
annotations:
|
||||||
|
{{- if .Values.persistence.storageClass }}
|
||||||
|
volume.beta.kubernetes.io/storage-class: {{ .Values.persistence.storageClass | quote }}
|
||||||
|
{{- else }}
|
||||||
|
volume.alpha.kubernetes.io/storage-class: default
|
||||||
|
{{- end }}
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- {{ .Values.persistence.accessMode | quote }}
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: {{ .Values.persistence.size | quote }}
|
||||||
|
{{- end }}
|
20
zombi/minecraft/templates/service.yaml
Normal file
20
zombi/minecraft/templates/service.yaml
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: {{ include "minecraft.fullname" . }}
|
||||||
|
annotations:
|
||||||
|
external-dns.alpha.kubernetes.io/hostname: {{ .Values.hostname }}
|
||||||
|
labels:
|
||||||
|
{{- include "minecraft.labels" . | nindent 4 }}
|
||||||
|
spec:
|
||||||
|
type: {{ .Values.service.type }}
|
||||||
|
{{- with .Values.service.externalTrafficPolicy }}
|
||||||
|
externalTrafficPolicy: {{ . }}
|
||||||
|
{{- end }}
|
||||||
|
ports:
|
||||||
|
- port: {{ .Values.service.port }}
|
||||||
|
targetPort: minecraft
|
||||||
|
protocol: TCP
|
||||||
|
name: minecraft
|
||||||
|
selector:
|
||||||
|
{{- include "minecraft.selectorLabels" . | nindent 4 }}
|
49
zombi/minecraft/values.yaml
Normal file
49
zombi/minecraft/values.yaml
Normal file
|
@ -0,0 +1,49 @@
|
||||||
|
# Default values for minecraft.
|
||||||
|
|
||||||
|
image:
|
||||||
|
repository: zombi/minecraft-forge
|
||||||
|
tag: "1.16.4-35.1.13"
|
||||||
|
pullPolicy: IfNotPresent
|
||||||
|
|
||||||
|
imagePullSecrets: []
|
||||||
|
nameOverride: ""
|
||||||
|
fullnameOverride: ""
|
||||||
|
|
||||||
|
hostname: thomasmods.bitmask.me
|
||||||
|
downloadURL: https://user.zom.bi/paul/thomasmods.tar
|
||||||
|
|
||||||
|
podAnnotations: {}
|
||||||
|
|
||||||
|
service:
|
||||||
|
type: LoadBalancer
|
||||||
|
externalTrafficPolicy: Local
|
||||||
|
port: 25565
|
||||||
|
|
||||||
|
persistence:
|
||||||
|
enabled: true
|
||||||
|
storageClass: default
|
||||||
|
accessMode: ReadWriteOnce
|
||||||
|
size: 10Gi
|
||||||
|
|
||||||
|
resources:
|
||||||
|
# if no requests are specified, limits = requests.
|
||||||
|
limits:
|
||||||
|
cpu: 3
|
||||||
|
memory: 5Gi
|
||||||
|
|
||||||
|
podSecurityContext: {}
|
||||||
|
# fsGroup: 2000
|
||||||
|
|
||||||
|
securityContext: {}
|
||||||
|
# capabilities:
|
||||||
|
# drop:
|
||||||
|
# - ALL
|
||||||
|
# readOnlyRootFilesystem: true
|
||||||
|
# runAsNonRoot: true
|
||||||
|
# runAsUser: 1000
|
||||||
|
|
||||||
|
nodeSelector: {}
|
||||||
|
|
||||||
|
tolerations: []
|
||||||
|
|
||||||
|
affinity: {}
|
Loading…
Reference in a new issue