Compare commits

..

11 commits

Author SHA1 Message Date
2892c7afea Remove blocking helm annotation 2021-01-13 10:25:59 +01:00
cb83fa9c30 Fix duplicate values section 2021-01-13 10:24:02 +01:00
f8e5b96886 Mount volume in job too 2021-01-13 07:47:31 +01:00
cf233cacad Add persistence 2021-01-13 07:38:54 +01:00
550a71b599 Add missing Job policy 2021-01-12 21:01:35 +01:00
44f8aee7e2 Move Install phase into Job 2021-01-12 20:54:31 +01:00
b14cad0db2 Make database configurable 2021-01-12 19:08:05 +01:00
bfc6a915d7 Make helm chart runnable
Setup script checks haveibeenpwned for weak passwords, and does not let
us continue the setup process.
2021-01-12 13:26:52 +01:00
3c0b6d682a Ingress always requires a path 2021-01-12 13:17:51 +01:00
ccc9bbe0c8 Use securityContexts 2021-01-12 13:10:25 +01:00
1b39b9db29 Initial Mediawiki version 2021-01-12 13:00:01 +01:00
8 changed files with 1 additions and 254 deletions

View file

@ -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:
Zombi Charts Copyright (C) 2021 Zom.bi community <program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.

View file

@ -1,23 +0,0 @@
# 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/

View file

@ -1,7 +0,0 @@
apiVersion: v2
name: minecraft
description: Server for the game "minecraft"
version: 0.1.0
appVersion: forge

View file

@ -1,52 +0,0 @@
{{/*
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 }}

View file

@ -1,82 +0,0 @@
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 }}

View file

@ -1,20 +0,0 @@
{{- 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 }}

View file

@ -1,20 +0,0 @@
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 }}

View file

@ -1,49 +0,0 @@
# 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: {}