94 lines
2.4 KiB
YAML
94 lines
2.4 KiB
YAML
---
|
|
# tasks file for ericomeehan.gondwana
|
|
# TODO: Create configmaps for configurations
|
|
- name: Create gondwana namespace
|
|
k8s:
|
|
state: present
|
|
definition:
|
|
apiVersion: v1
|
|
kind: Namespace
|
|
metadata:
|
|
name: gondwana
|
|
|
|
- name: Create persistent volume claim for gondwana volume
|
|
k8s:
|
|
state: present
|
|
definition:
|
|
apiVersion: v1
|
|
kind: PersistentVolumeClaim
|
|
metadata:
|
|
name: gondwana
|
|
namespace: gondwana
|
|
spec:
|
|
accessModes:
|
|
- ReadWriteOnce
|
|
resources:
|
|
requests:
|
|
storage: 32Gi
|
|
|
|
- name: Create a Deployment
|
|
k8s:
|
|
definition:
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: gondwana
|
|
namespace: gondwana
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: gondwana
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: gondwana
|
|
spec:
|
|
containers:
|
|
- name: minecraft
|
|
image: itzg/minecraft-server
|
|
volumeMounts:
|
|
- name: data
|
|
mountPath: /data
|
|
ports:
|
|
- containerPort: 25565
|
|
- containerPort: 24454
|
|
protocol: UDP
|
|
env:
|
|
- name: EULA
|
|
value: "TRUE"
|
|
- name: VERSION
|
|
value: "1.21.4"
|
|
- name: FABRIC_LOADER_VERSION
|
|
value: "0.16.9"
|
|
- name: TYPE
|
|
value: "FABRIC"
|
|
- name: MODS
|
|
value: "https://www.curseforge.com/api/v1/mods/306612/files/5966280/download,https://www.curseforge.com/api/v1/mods/416089/files/5959447/download"
|
|
- name: MEMORY
|
|
value: "8G"
|
|
volumes:
|
|
- name: data
|
|
persistentVolumeClaim:
|
|
claimName: gondwana
|
|
|
|
- name: Expose Deployment as a Service
|
|
k8s:
|
|
definition:
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: gondwana
|
|
namespace: gondwana
|
|
spec:
|
|
selector:
|
|
app: gondwana
|
|
ports:
|
|
- port: 24454
|
|
protocol: UDP
|
|
name: voice-chat
|
|
- port: 25565
|
|
protocol: TCP
|
|
name: minecraft
|
|
type: LoadBalancer
|