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:
		@@ -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:
 | 
			
		||||
  requests:
 | 
			
		||||
    memory: 512Mi
 | 
			
		||||
@@ -8,11 +23,48 @@ minecraftServer:
 | 
			
		||||
  difficulty: hard
 | 
			
		||||
  hardcore: true
 | 
			
		||||
  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
 | 
			
		||||
  motd: "Suck my cock"
 | 
			
		||||
  pvp: true
 | 
			
		||||
  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:
 | 
			
		||||
  dataDir:
 | 
			
		||||
    enabled: true
 | 
			
		||||
    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
 | 
			
		||||
        version: 2.0.0
 | 
			
		||||
        alias: istio
 | 
			
		||||
  service-monitor:
 | 
			
		||||
    dependencies:
 | 
			
		||||
      - chart: bedag/raw
 | 
			
		||||
        version: 2.0.0
 | 
			
		||||
        alias: service-monitor
 | 
			
		||||
    values:
 | 
			
		||||
      - '{{ requiredEnv "PWD" }}/common/values.service-monitor.yaml'
 | 
			
		||||
  namespace:
 | 
			
		||||
    dependencies:
 | 
			
		||||
      - chart: bedag/raw
 | 
			
		||||
@@ -160,6 +167,7 @@ templates:
 | 
			
		||||
    version: 4.6.0
 | 
			
		||||
    inherit:
 | 
			
		||||
      - template: default-env-values
 | 
			
		||||
        #      - template: service-monitor
 | 
			
		||||
 | 
			
		||||
  gitea: &gitea
 | 
			
		||||
    name: gitea
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user