Compare commits
2 Commits
1a9d0fc00c
...
192e2e869f
Author | SHA1 | Date | |
---|---|---|---|
192e2e869f | |||
0fd9936db5 |
7
apps/minecraft/README.md
Normal file
7
apps/minecraft/README.md
Normal file
@ -0,0 +1,7 @@
|
||||
## Sending a command
|
||||
```
|
||||
kubectl exec -it -n minecraft deploy/minecraft-server -- /bin/bash
|
||||
mc-send-to-console /help
|
||||
# or directly
|
||||
kubectl exec -it -n minecraft deploy/minecraft-server -- mc-send-to-console /help
|
||||
```
|
56
apps/minecraft/deployment.yaml
Normal file
56
apps/minecraft/deployment.yaml
Normal file
@ -0,0 +1,56 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: minecraft-server
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: minecraft-server
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: minecraft-server
|
||||
spec:
|
||||
containers:
|
||||
- name: minecraft-server
|
||||
image: minecraft
|
||||
resources:
|
||||
limits:
|
||||
memory: "4000Mi"
|
||||
cpu: "2500m"
|
||||
requests:
|
||||
memory: "1000Mi"
|
||||
cpu: "500m"
|
||||
ports:
|
||||
- containerPort: 25565
|
||||
env:
|
||||
- name: EULA
|
||||
value: "TRUE"
|
||||
- name: MODPACK
|
||||
value: "https://www.curseforge.com/api/v1/mods/711537/files/5076228/download"
|
||||
- name: VERSION
|
||||
value: "1.18.2"
|
||||
# - name: VERSION
|
||||
# value: "1.16.5"
|
||||
# - name: MODPACK
|
||||
# value: "https://mediafilez.forgecdn.net/files/3602/5/VaultHunters-OfficialModpack-1.12.1-Server.zip"
|
||||
- name: INIT_MEMORY
|
||||
value: "1G"
|
||||
- name: MAX_MEMORY
|
||||
value: "3G"
|
||||
- name: MOTD
|
||||
value: "VaultHunters baby!"
|
||||
- name: ENABLE_RCON
|
||||
value: "false"
|
||||
- name: CREATE_CONSOLE_IN_PIPE
|
||||
value: "true"
|
||||
- name: ONLINE_MODE
|
||||
value: "true"
|
||||
volumeMounts:
|
||||
- name: minecraft-data
|
||||
mountPath: /data
|
||||
|
||||
volumes:
|
||||
- name: minecraft-data
|
||||
persistentVolumeClaim:
|
||||
claimName: minecraft-data
|
15
apps/minecraft/kustomization.yaml
Normal file
15
apps/minecraft/kustomization.yaml
Normal file
@ -0,0 +1,15 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
namespace: minecraft
|
||||
|
||||
resources:
|
||||
- namespace.yaml
|
||||
- pvc.yaml
|
||||
- deployment.yaml
|
||||
- service.yaml
|
||||
|
||||
images:
|
||||
- name: minecraft
|
||||
newName: itzg/minecraft-server
|
||||
newTag: java21
|
4
apps/minecraft/namespace.yaml
Normal file
4
apps/minecraft/namespace.yaml
Normal file
@ -0,0 +1,4 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: placeholder
|
11
apps/minecraft/pvc.yaml
Normal file
11
apps/minecraft/pvc.yaml
Normal file
@ -0,0 +1,11 @@
|
||||
kind: PersistentVolumeClaim
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: minecraft-data
|
||||
spec:
|
||||
storageClassName: "nfs-client"
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 1Gi
|
12
apps/minecraft/service.yaml
Normal file
12
apps/minecraft/service.yaml
Normal file
@ -0,0 +1,12 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: minecraft-server
|
||||
spec:
|
||||
selector:
|
||||
app: minecraft-server
|
||||
ports:
|
||||
- port: 25565
|
||||
targetPort: 25565
|
||||
type: LoadBalancer
|
||||
loadBalancerIP: 192.168.3.4
|
@ -12,6 +12,7 @@ spec:
|
||||
app: actions-runner
|
||||
spec:
|
||||
hostname: kube-runner
|
||||
serviceAccountName: actions-runner
|
||||
containers:
|
||||
- name: actions-runner
|
||||
image: actions-runner
|
||||
@ -29,3 +30,10 @@ spec:
|
||||
key: runner-token
|
||||
- name: GITEA_RUNNER_LABELS
|
||||
value: k8s
|
||||
volumeMounts:
|
||||
- name: runner-data
|
||||
mountPath: /data
|
||||
volumes:
|
||||
- name: runner-data
|
||||
emptyDir: {}
|
||||
|
||||
|
38
infrastructure/gitea/actions.rbac.yaml
Normal file
38
infrastructure/gitea/actions.rbac.yaml
Normal file
@ -0,0 +1,38 @@
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: actions-runner
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: Role
|
||||
metadata:
|
||||
name: actions-role
|
||||
rules:
|
||||
- apiGroups: [""]
|
||||
resources: ["pods"]
|
||||
verbs: ["get", "list", "create", "delete"]
|
||||
- apiGroups: [""]
|
||||
resources: ["pods/exec"]
|
||||
verbs: ["get", "create"]
|
||||
- apiGroups: [""]
|
||||
resources: ["pods/log"]
|
||||
verbs: ["get", "list", "watch",]
|
||||
- apiGroups: ["batch"]
|
||||
resources: ["jobs"]
|
||||
verbs: ["get", "list", "create", "delete"]
|
||||
- apiGroups: [""]
|
||||
resources: ["secrets"]
|
||||
verbs: ["get", "list", "create", "delete"]
|
||||
---
|
||||
kind: RoleBinding
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
metadata:
|
||||
name: actions-role-binding
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: actions-runner
|
||||
apiGroup: ""
|
||||
roleRef:
|
||||
kind: Role
|
||||
name: actions-role
|
||||
apiGroup: rbac.authorization.k8s.io
|
@ -10,6 +10,8 @@ resources:
|
||||
- drone-server.sealedsecret.yaml
|
||||
- actions.deployment.yaml
|
||||
- actions.sealedsecret.yaml
|
||||
- actions.rbac.yaml
|
||||
|
||||
|
||||
namespace: gitea
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user