add minecraft

This commit is contained in:
Andrey Kartashov 2020-10-18 14:55:06 +07:00
parent 3c2478ad76
commit 87ae6847d2
7 changed files with 110 additions and 0 deletions

View file

@ -0,0 +1,3 @@
name: minecraft
version: 1.0

View file

@ -0,0 +1,4 @@
dependencies:
- name: minecraft
version: 2.0.7
repository: 'https://itzg.github.io/minecraft-server-charts/'

View file

@ -0,0 +1,11 @@
apiVersion: v1
kind: PersistentVolume
metadata:
name: minecraft
spec:
capacity:
storage: 1Gi
accessModes:
- ReadWriteOnce
hostPath:
path: /data/minecraft

View file

@ -0,0 +1,12 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: minecraft
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
volumeMode: Filesystem
volumeName: minecraft

View file

@ -0,0 +1,14 @@
minecraft:
minecraftServer:
eula: "TRUE"
pvp: true
onlineMode: false
serviceType: NodePort
rcon:
enabled: true
password: "CHANGE_IN_ARGOCD"
serviceType: NodePort
persistence:
dataDir:
enabled: true
existingClaim: minecraft

49
apps/services/mysql.yaml Normal file
View file

@ -0,0 +1,49 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: mariadb
labels:
app: mariadb
spec:
replicas: 1
selector:
matchLabels:
app: mariadb
template:
metadata:
labels:
app: mariadb
spec:
volumes:
# mkdir -p /data/mariadb
# chown 999.999 /data/mariadb
- name: mariadb
hostPath:
path: /data/mariadb
type:
containers:
- name: mariadb
image: mariadb
env:
- name: MYSQL_ROOT_PASSWORD_FILE
value: /var/lib/mysql/rootpwd
ports:
- containerPort: 3306
name: mysql
volumeMounts:
- mountPath: /var/lib/mysql
name: mariadb
---
kind: Service
apiVersion: v1
metadata:
name: mysql
spec:
selector:
app: mariadb
ports:
- name: mysql
protocol: TCP
port: 3306
targetPort: mysql

17
main/apps/minecraft.yaml Normal file
View file

@ -0,0 +1,17 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: minecraft
namespace: argocd
spec:
destination:
namespace: minecraft
server: https://kubernetes.default.svc
project: default
source:
path: apps/minecraft
repoURL: git@github.com:gorilych/gf-k8s
syncPolicy:
automated:
prune: true
selfHeal: true