Skip to content

Commit

Permalink
Merge branch 'main' of github.com:GiganticMinecraft/seichi_infra into…
Browse files Browse the repository at this point in the history
… main
  • Loading branch information
kory33 committed Oct 9, 2023
2 parents b056c49 + fdfe1c1 commit 373e2be
Show file tree
Hide file tree
Showing 10 changed files with 59 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ spec:
- name: CFG_DISCORDSRV_CONSOLE_CHANNEL_ID
value: "1054159676964622426"

image: itzg/minecraft-server:2023.9.1-java8-jdk
image: itzg/minecraft-server:2023.10.1-java8-jdk
name: minecraft
ports:
- containerPort: 25565
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: v1
kind: Secret
metadata:
name: mcserver--common--config-secrets
data:
# 複数の PR があるときに DiscordSRV がどのような挙動をすべきかがまだ明確ではない。
#
# 理想では、Discord のチャンネルを PR 毎に生やしてくれて chat channel id と console channel id を
# configmap 等に吐き出してくれる controller が居てくれれば良いが、2023/10/07現在、そのようなものは実装されていない。
#
# この DISCORDSRV_TOKEN はデバッグ環境の bot の token を入れれば良いかもしれないが、
# とりあえず DiscordSRV の動作を止めるために空文字列を入れておくことにする
DISCORDSRV_TOKEN: ""
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ metadata:
name: mariadb
spec:
rootPasswordSecretKeyRef:
name: mariadb
name: mariadb-pr-review-password
key: root-password

database: seichiassist
username: mcserver
passwordSecretKeyRef:
name: mariadb
name: mariadb-pr-review-password
key: mcserver-password

image:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ spec:
source:
chart: prometheus-snmp-exporter
repoURL: https://prometheus-community.github.io/helm-charts
targetRevision: 1.8.0
targetRevision: 1.8.1
helm:
releaseName: prometheus-snmp-exporter
# https://github.com/prometheus-community/helm-charts/blob/main/charts/prometheus-snmp-exporter/values.yaml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ spec:
source:
chart: redis
repoURL: https://charts.bitnami.com/bitnami
targetRevision: 18.1.1
targetRevision: 18.1.2
helm:
releaseName: seichi-debug-bungeesemaphore-redis
values: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ spec:
source:
chart: redis
repoURL: https://charts.bitnami.com/bitnami
targetRevision: 18.1.1
targetRevision: 18.1.2
helm:
releaseName: seichi-debug-redisbungee-redis
values: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ spec:
- name: CFG_DISCORDSRV_CONSOLE_CHANNEL_ID
value: "1054159676964622426"

image: itzg/minecraft-server:2023.9.1-java8-jdk
image: itzg/minecraft-server:2023.10.1-java8-jdk
name: minecraft
ports:
- containerPort: 25565
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ spec:
source:
chart: redis
repoURL: https://charts.bitnami.com/bitnami
targetRevision: 18.1.1
targetRevision: 18.1.2
helm:
releaseName: seichi-bungeesemaphore-redis
values: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ spec:
source:
chart: redis
repoURL: https://charts.bitnami.com/bitnami
targetRevision: 18.1.1
targetRevision: 18.1.2
helm:
releaseName: seichi-redisbungee-redis
values: |
Expand Down
37 changes: 37 additions & 0 deletions terraform/onp_cluster_secrets.tf
Original file line number Diff line number Diff line change
Expand Up @@ -196,3 +196,40 @@ resource "helm_release" "onp_minecraft_mariadb_monitoring_password" {
]
}
}

resource "random_password" "minecraft__pr_review_mariadb_root_password" {
length = 16
special = false // MariaDBのパスワードがぶっ壊れて困るので記号を含めない
}

resource "random_password" "minecraft__pr_review_mariadb_password" {
length = 16
special = false // MariaDBのパスワードがぶっ壊れて困るので記号を含めない
}

resource "helm_release" "onp_minecraft__pr_review_mariadb_password" {
depends_on = [helm_release.onp_cluster_clustersecret]

repository = "https://giganticminecraft.github.io/seichi_infra/"
chart = "raw-resources"
name = "mariadb-pr-review-password-raw-resource"
namespace = "kube-system"
version = "0.3.0"

set_list {
name = "manifests"
value = [<<-EOS
kind: ClusterSecret
apiVersion: clustersecret.io/v1
metadata:
namespace: clustersecret
name: mariadb-pr-review-password
matchNamespace:
- seichi-debug-minecraft-on-seichiassist-pr-*
data:
root-password: ${base64encode(random_password.minecraft__pr_review_mariadb_root_password.result)}
mcserver-password: ${base64encode(random_password.minecraft__pr_review_mariadb_password.result)}
EOS
]
}
}

0 comments on commit 373e2be

Please sign in to comment.