From 6304a2cd1174886482d9a9203dcb07837129285e Mon Sep 17 00:00:00 2001 From: outductor Date: Sun, 24 Dec 2023 15:24:42 +0900 Subject: [PATCH] fix jvm --- .../templates/debug-s1/seichiassist.yaml | 24 ++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/seichi-onp-k8s/manifests/seichi-kubernetes/app-templates/seichi-debug-minecraft-on-seichiassist-pr/templates/debug-s1/seichiassist.yaml b/seichi-onp-k8s/manifests/seichi-kubernetes/app-templates/seichi-debug-minecraft-on-seichiassist-pr/templates/debug-s1/seichiassist.yaml index b792db178..066509587 100644 --- a/seichi-onp-k8s/manifests/seichi-kubernetes/app-templates/seichi-debug-minecraft-on-seichiassist-pr/templates/debug-s1/seichiassist.yaml +++ b/seichi-onp-k8s/manifests/seichi-kubernetes/app-templates/seichi-debug-minecraft-on-seichiassist-pr/templates/debug-s1/seichiassist.yaml @@ -30,6 +30,18 @@ spec: values: - seichi-onp-k8s-wk-1 # CPUの多いwk-1だけにスケジュールする initContainers: + - name: jmx-exporter-downloader + image: busybox:1.36.1 + env: + - name: JMX_EXPORTER_URL + value: "https://repo1.maven.org/maven2/io/prometheus/jmx/jmx_prometheus_javaagent/0.20.0/jmx_prometheus_javaagent-0.20.0.jar" + volumeMounts: + - name: jmx-exporter-download-volume + mountPath: /root/jmx-exporter-download + command: + - "sh" + - "-c" + - 'wget -O /root/jmx-exporter-download/jmx-exporter-javaagent.jar "${JMX_EXPORTER_URL}"' - name: mod-downloader image: ghcr.io/giganticminecraft/mod-downloader:sha-c0f7980 env: @@ -102,7 +114,7 @@ spec: https://github.com/GiganticMinecraft/StreamClock/releases/download/sha-dd1905c/StreamClock-1.0-SNAPSHOT.jdk17.jar, https://github.com/GiganticMinecraft/ByeByeWither/releases/download/sha-e2a0a69/ByeByeWither-1.0.0.jar, https://github.com/sladkoff/minecraft-prometheus-exporter/releases/download/v2.5.0/minecraft-prometheus-exporter-2.5.0.jar, - https://repo1.maven.org/maven2/io/prometheus/jmx/jmx_prometheus_javaagent/0.20.0/jmx_prometheus_javaagent-0.20.0.jar, + - name: JVM_OPTS value: >- -javaagent:/jmx-exporter/jmx-exporter-javaagent.jar=18321:/jmx-exporter/jmx-exporter-config.yaml @@ -179,6 +191,7 @@ spec: lp group default permission set clicktpa.tpaccept true lp group default permission set clicktpa.tpahere true lp group default permission set clicktpa.tptoggle true + image: ghcr.io/giganticminecraft/seichi_minecraft_server_debug_base_1_18_2:sha-1267b49 name: minecraft ports: @@ -290,6 +303,9 @@ spec: subPath: config.yml # JMX exporter 周りのファイルが入ったボリューム達のマウント設定 + - name: jmx-exporter-download-volume + mountPath: /jmx-exporter/jmx-exporter-javaagent.jar + subPath: jmx-exporter-javaagent.jar - name: common-jmx-exporter-config mountPath: /jmx-exporter/jmx-exporter-config.yaml subPath: jmx-exporter-config.yaml @@ -322,7 +338,9 @@ spec: configMap: name: multiverse-portals-config - # JMX exporterのconfig volume + # JMX exporterをinitContainerでダウンロードしてMinecraftに受け渡すためのvolume + - name: jmx-exporter-download-volume + emptyDir: {} - name: common-jmx-exporter-config configMap: name: common-jmx-exporter-config @@ -331,6 +349,6 @@ spec: - name: mod-downloader-volume emptyDir: {} - # # S1から取ってきたワールドデータをぶちこむvolume + # # S1から取ってきたワールドデータをぶちこむボリューム # - name: world-download-volume # emptyDir: {}