Added Undocumented Minecraft example.
This commit is contained in:
parent
78f09bdc08
commit
f5b24a9a17
24
90-MixConfigs/Minecraft/ConfigMap.yaml
Normal file
24
90-MixConfigs/Minecraft/ConfigMap.yaml
Normal file
@ -0,0 +1,24 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: minecraft-config
|
||||
namespace: default
|
||||
labels:
|
||||
app: minecraft
|
||||
data:
|
||||
EULA: "TRUE"
|
||||
MEMORY: 1G
|
||||
TYPE: "FOLIA"
|
||||
FORCE_REDOWNLOAD: "FALSE"
|
||||
VERSION: "1.19.4"
|
||||
MOTD: "My minecraft world!"
|
||||
ONLINE_MODE: "FALSE"
|
||||
ENABLE_QUERY: "TRUE"
|
||||
ENABLE_RCON: "FALSE"
|
||||
ALLOW_NETHER: "FALSE"
|
||||
GENERATE_STRUCTURES: "FALSE"
|
||||
SNOOPER_ENABLED: "FALSE"
|
||||
SPAWN_ANIMALS: "FALSE"
|
||||
SPAWN_MONSTERS: "FALSE"
|
||||
SPAWN_NPCS: "FALSE"
|
||||
ENABLE_AUTOPAUSE: "TRUE"
|
32
90-MixConfigs/Minecraft/Deployment.yaml
Normal file
32
90-MixConfigs/Minecraft/Deployment.yaml
Normal file
@ -0,0 +1,32 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: minecraft-1
|
||||
namespace: default
|
||||
labels:
|
||||
app: minecraft
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: minecraft
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: minecraft
|
||||
spec:
|
||||
containers:
|
||||
- name: minecraft
|
||||
image: itzg/minecraft-server
|
||||
resources:
|
||||
requests:
|
||||
cpu: "100m"
|
||||
imagePullPolicy: IfNotPresent #Always
|
||||
ports:
|
||||
- containerPort: 25565
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: minecraft-config
|
||||
env:
|
||||
- name: MOTD
|
||||
value: "World 1 Server"
|
15
90-MixConfigs/Minecraft/Gateway.yaml
Normal file
15
90-MixConfigs/Minecraft/Gateway.yaml
Normal file
@ -0,0 +1,15 @@
|
||||
apiVersion: networking.istio.io/v1alpha3
|
||||
kind: Gateway
|
||||
metadata:
|
||||
name: minecraft-gateway
|
||||
namespace: default
|
||||
spec:
|
||||
selector:
|
||||
istio: games
|
||||
servers:
|
||||
- port:
|
||||
number: 25565
|
||||
name: tcp-1
|
||||
protocol: TCP
|
||||
hosts:
|
||||
- "*"
|
27
90-MixConfigs/Minecraft/Istio-Ingress/Ingress.yaml
Normal file
27
90-MixConfigs/Minecraft/Istio-Ingress/Ingress.yaml
Normal file
@ -0,0 +1,27 @@
|
||||
apiVersion: install.istio.io/v1alpha1
|
||||
kind: IstioOperator
|
||||
metadata:
|
||||
name: ingress
|
||||
spec:
|
||||
profile: empty # Do not install CRDs or the control plane
|
||||
components:
|
||||
ingressGateways:
|
||||
- name: ingress-games-gateway
|
||||
namespace: istio-system
|
||||
enabled: true
|
||||
label:
|
||||
# Set a unique label for the gateway. This is required to ensure Gateways
|
||||
# can select this workload
|
||||
istio: games
|
||||
k8s:
|
||||
service:
|
||||
ports:
|
||||
- port: 25565
|
||||
targetPort: 25565
|
||||
name: minecraft-port
|
||||
protocol: TCP
|
||||
values:
|
||||
gateways:
|
||||
istio-ingressgateway:
|
||||
# Enable gateway injection
|
||||
injectionTemplate: gateway
|
1
90-MixConfigs/Minecraft/README.md
Normal file
1
90-MixConfigs/Minecraft/README.md
Normal file
@ -0,0 +1 @@
|
||||
https://github.com/itzg/docker-minecraft-server/#server-configuration
|
18
90-MixConfigs/Minecraft/Service.yaml
Normal file
18
90-MixConfigs/Minecraft/Service.yaml
Normal file
@ -0,0 +1,18 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: minecraft
|
||||
namespace: default
|
||||
labels:
|
||||
app: minecraft
|
||||
world: "1"
|
||||
spec:
|
||||
ports:
|
||||
- port: 25565
|
||||
name: tcp-minecraft
|
||||
protocol: TCP
|
||||
# nodePort: 30000
|
||||
selector:
|
||||
app: minecraft
|
||||
world: "1"
|
||||
# type: NodePort
|
18
90-MixConfigs/Minecraft/VirtualService.yaml
Normal file
18
90-MixConfigs/Minecraft/VirtualService.yaml
Normal file
@ -0,0 +1,18 @@
|
||||
apiVersion: networking.istio.io/v1alpha3
|
||||
kind: VirtualService
|
||||
metadata:
|
||||
name: minecraft-1
|
||||
namespace: default
|
||||
spec:
|
||||
hosts:
|
||||
- "*"
|
||||
gateways:
|
||||
- minecraft-gateway
|
||||
tcp:
|
||||
- match:
|
||||
- port: 25565
|
||||
route:
|
||||
- destination:
|
||||
host: minecraft.default.svc.cluster.local
|
||||
port:
|
||||
number: 25565
|
Loading…
x
Reference in New Issue
Block a user