Migrate minecraft to Paper (#37)
I want to configure monitoring for Minecraft, and it's not possible with the Vanilla version. So we're testing Paper Reviewed-on: https://git.badhouseplants.net/badhouseplants/k8s-cluster-config/pulls/37
This commit is contained in:
parent
c9a45797bf
commit
c237d4ffae
@ -1,3 +1,18 @@
|
|||||||
|
---
|
||||||
|
# --------------------------------------------------
|
||||||
|
# -- Extensions values
|
||||||
|
# --------------------------------------------------
|
||||||
|
service-account:
|
||||||
|
enabled: true
|
||||||
|
resources:
|
||||||
|
- name: minecraft-exporter
|
||||||
|
label:
|
||||||
|
app: minecraft-minecraft-metrics
|
||||||
|
endpoints:
|
||||||
|
port: metrics
|
||||||
|
# --------------------------------------------------
|
||||||
|
# -- Main values
|
||||||
|
# --------------------------------------------------
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
memory: 512Mi
|
memory: 512Mi
|
||||||
@ -8,11 +23,48 @@ minecraftServer:
|
|||||||
difficulty: hard
|
difficulty: hard
|
||||||
hardcore: true
|
hardcore: true
|
||||||
version: 1.19.2
|
version: 1.19.2
|
||||||
|
type: "PAPER"
|
||||||
|
paperDownloadUrl: >
|
||||||
|
https://api.papermc.io/v2/projects/paper/versions/1.19.2/builds/307/downloads/paper-1.19.2-307.jar
|
||||||
gameMode: survival
|
gameMode: survival
|
||||||
motd: "Suck my cock"
|
|
||||||
pvp: true
|
pvp: true
|
||||||
memory: 4096M
|
memory: 4096M
|
||||||
|
extraPorts:
|
||||||
|
- name: metrics
|
||||||
|
containerPort: 9225
|
||||||
|
protocol: TCP
|
||||||
|
service:
|
||||||
|
enabled: true
|
||||||
|
embedded: false
|
||||||
|
labels:
|
||||||
|
exporter: minecraft
|
||||||
|
type: ClusterIP
|
||||||
|
port: 9925
|
||||||
|
ingress:
|
||||||
|
enabled: false
|
||||||
persistence:
|
persistence:
|
||||||
dataDir:
|
dataDir:
|
||||||
enabled: true
|
enabled: true
|
||||||
Size: 8Gi
|
Size: 8Gi
|
||||||
|
initContainers:
|
||||||
|
- name: install-prometheus-exporter
|
||||||
|
image: alpine/curl
|
||||||
|
command:
|
||||||
|
- curl
|
||||||
|
- -L
|
||||||
|
- "https://github.com/sladkoff/minecraft-prometheus-exporter/releases/download/v2.5.0/minecraft-prometheus-exporter-2.5.0.jar"
|
||||||
|
- -o
|
||||||
|
- /data/plugins/prometheus-exporter.jar
|
||||||
|
volumeMounts:
|
||||||
|
- name: plugins
|
||||||
|
mountPath: /data/plugins
|
||||||
|
readOnly: false
|
||||||
|
extraVolumes:
|
||||||
|
- volumeMounts:
|
||||||
|
- name: plugins
|
||||||
|
mountPath: /data/plugins
|
||||||
|
readOnly: false
|
||||||
|
volumes:
|
||||||
|
- name: plugins
|
||||||
|
emptyDir:
|
||||||
|
sizeLimit: 500Mi
|
||||||
|
16
common/values.service-monitor.yaml
Normal file
16
common/values.service-monitor.yaml
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
---
|
||||||
|
service-monitor:
|
||||||
|
templates:
|
||||||
|
- |
|
||||||
|
{{ range .Values.service-monitor.resources }}
|
||||||
|
apiVersion: monitoring.coreos.com/v1
|
||||||
|
kind: ServiceMonitor
|
||||||
|
metadata:
|
||||||
|
name: {{ .name }}
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: {{ .label.app }}
|
||||||
|
endpoints:
|
||||||
|
- port: {{ .endpoints.port }}
|
||||||
|
{{ end }}
|
@ -43,6 +43,13 @@ templates:
|
|||||||
- chart: bedag/raw
|
- chart: bedag/raw
|
||||||
version: 2.0.0
|
version: 2.0.0
|
||||||
alias: istio
|
alias: istio
|
||||||
|
service-monitor:
|
||||||
|
dependencies:
|
||||||
|
- chart: bedag/raw
|
||||||
|
version: 2.0.0
|
||||||
|
alias: service-monitor
|
||||||
|
values:
|
||||||
|
- '{{ requiredEnv "PWD" }}/common/values.service-monitor.yaml'
|
||||||
namespace:
|
namespace:
|
||||||
dependencies:
|
dependencies:
|
||||||
- chart: bedag/raw
|
- chart: bedag/raw
|
||||||
@ -160,6 +167,7 @@ templates:
|
|||||||
version: 4.6.0
|
version: 4.6.0
|
||||||
inherit:
|
inherit:
|
||||||
- template: default-env-values
|
- template: default-env-values
|
||||||
|
# - template: service-monitor
|
||||||
|
|
||||||
gitea: &gitea
|
gitea: &gitea
|
||||||
name: gitea
|
name: gitea
|
||||||
|
Reference in New Issue
Block a user