Skip to content

Commit

Permalink
feat(minecraft): adjust velocity dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
tyriis committed Feb 5, 2025
1 parent c6838c2 commit a533084
Show file tree
Hide file tree
Showing 10 changed files with 50 additions and 294 deletions.
22 changes: 0 additions & 22 deletions kubernetes/talos-flux/apps/gaming/minecraft-java/flux-sync.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,28 +52,6 @@ spec:
# required for the loadbalancer config (it is not a hard dependency)
- name: cilium-config

---
# yaml-language-server: $schema=https://kubernetes-schemas.pages.dev/kustomize.toolkit.fluxcd.io/kustomization_v1.json
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: minecraft-waterfall-proxy
namespace: flux-system
labels:
substitution.flux.home.arpa/enabled: "true"
spec:
dependsOn:
- name: cilium-config
- name: apps-external-secrets-stores
interval: 10m
path: ./kubernetes/talos-flux/apps/gaming/minecraft-java/waterfall-proxy
prune: true
sourceRef:
kind: GitRepository
name: home-ops
wait: true
targetNamespace: gaming

---
# yaml-language-server: $schema=https://kubernetes-schemas.pages.dev/kustomize.toolkit.fluxcd.io/kustomization_v1.json
apiVersion: kustomize.toolkit.fluxcd.io/v1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,11 @@ spec:
- ALL
ports:
- name: java
containerPort: 25565
containerPort: &port 25565
- name: rcon
containerPort: 25575
containerPort: &rconPort 25575
- name: metrics
containerPort: 9100
containerPort: &metricsPort 9100

resources:
requests:
Expand All @@ -112,17 +112,17 @@ spec:
type: ClusterIP
ports:
java:
port: 25565
port: *port
protocol: TCP
metrics:
port: 9100
port: *metricsPort
protocol: TCP
rcon:
controller: minecraft
type: ClusterIP
ports:
rcon:
port: 25575
port: *rconPort
protocol: TCP

serviceMonitor:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,8 @@
https://download.geysermc.org/v2/projects/geyser/versions/latest/builds/latest/downloads/velocity
# floodgate
https://download.geysermc.org/v2/projects/floodgate/versions/latest/builds/latest/downloads/velocity
# UnifiedMetrics https://hangar.papermc.io/cubxity/UnifiedMetrics
https://github.com/Cubxity/UnifiedMetrics/releases/download/v0.3.8/unifiedmetrics-platform-velocity-0.3.8.jar

# vane https://github.com/oddlama/vane
https://github.com/oddlama/vane/releases/download/v1.17.3/vane-velocity-1.17.3.jar
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ bind = "0.0.0.0:25565"
# What should be the MOTD? This gets displayed when the player adds your server to
# their server list. Only MiniMessage format is accepted.
# motd = "<#09add3>techtales.io minecraft universe"
motd = "🦄 <gradient:#8c00ff:#ff00dd>techtales.io universe</gradient>"
motd = "<gradient:#8c00ff:#ff00dd>techtales.io universe</gradient>"

# What should we display for the maximum number of players? (Velocity does not support a cap
# on the number of players online.)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ kind: HelmRelease
metadata:
name: &app minecraft-velocity-proxy
spec:
dependsOn:
- name: external-secret-minecraft-proxy-forwarding
- name: external-secret-minecraft-rcon
interval: 15m
driftDetection:
mode: enabled
Expand All @@ -25,37 +28,40 @@ spec:
retries: 3
# https://github.com/bjw-s/helm-charts/blob/main/charts/library/common/values.yaml
values:
defaultPodOptions:
automountServiceAccountToken: false
securityContext:
runAsNonRoot: true
runAsUser: 1000
runAsGroup: 1000
fsGroup: 1000
fsGroupChangePolicy: OnRootMismatch
seccompProfile:
type: RuntimeDefault
controllers:
velocity:
replicas: 1
annotations:
reloader.stakater.com/auto: "true"
pod:
securityContext:
fsGroup: 1000
runAsGroup: 1000
runAsNonRoot: true
runAsUser: 1000
seccompProfile:
type: RuntimeDefault

containers:
app:
nameOverride: *app
image:
repository: itzg/mc-proxy
tag: java21@sha256:82b6a7b7d9aefbee26ce2c95e399d5e8dde073f5e6e87e6462f4016fca9f52f3
envFrom:
- secretRef:
name: bungeecord-rcon
name: minecraft-rcon
env:
TZ: ${SETTING_TZ}
# for a full list of ENV vars see: https://github.com/itzg/docker-mc-proxy#environment-settings
UID: "1000"
GID: "1000"
TYPE: "VELOCITY"
# VELOCITY_VERSION: "latest"
# TODO: hello renovate
# TODO renovate
VELOCITY_VERSION: "3.4.0-SNAPSHOT"
# VELOCITY_BUILD_ID: "latest"
# PLUGINS: >
# https://download.geysermc.org/v2/projects/geyser/versions/latest/builds/latest/downloads/velocity,
# https://download.geysermc.org/v2/projects/floodgate/versions/latest/builds/latest/downloads/velocity
PLUGINS_FILE: /config/plugins.txt
INIT_MEMORY: 128M
MAX_MEMORY: 256M
Expand All @@ -67,11 +73,7 @@ spec:
ENABLE_RCON: "true"
# enable env variable replacement
REPLACE_ENV_VARIABLES: "TRUE"
TZ: ${SETTING_TZ}

image:
repository: itzg/mc-proxy
tag: java21@sha256:82b6a7b7d9aefbee26ce2c95e399d5e8dde073f5e6e87e6462f4016fca9f52f3
securityContext:
allowPrivilegeEscalation: false
capabilities:
Expand All @@ -88,6 +90,8 @@ spec:
- name: rcon
containerPort: &rconPort 25575
protocol: TCP
- name: metrics
containerPort: &metricsPort 9100

probes:
readiness: &probes
Expand All @@ -111,7 +115,7 @@ spec:
controller: velocity
type: LoadBalancer
annotations:
io.cilium/lb-ipam-ips: ${SETTING_CILIUM_MINECRAFT_PROXY_ADDR2}
io.cilium/lb-ipam-ips: ${SETTING_CILIUM_MINECRAFT_PROXY_ADDR}
ports:
velocity-proxy:
port: *port
Expand All @@ -128,6 +132,23 @@ spec:
port: *rconPort
protocol: TCP
targetPort: rcon
metrics:
controller: velocity
ports:
metrics:
port: *metricsPort
protocol: TCP
targetPort: metrics

serviceMonitor:
metrics:
enabled: true
serviceName: minecraft-playground-world-minecraft
endpoints:
- port: metrics
scheme: http
path: /
interval: 1m

persistence:
tmp:
Expand Down

This file was deleted.

This file was deleted.

Loading

0 comments on commit a533084

Please sign in to comment.