diff --git a/seichi-onp-k8s/manifests/seichi-kubernetes/app-templates/seichi-debug-minecraft-on-seichiassist-pr/templates/mariadb/mariadb.yaml b/seichi-onp-k8s/manifests/seichi-kubernetes/app-templates/seichi-debug-minecraft-on-seichiassist-pr/templates/mariadb/mariadb.yaml index ba9255fb3..f59b8e94b 100644 --- a/seichi-onp-k8s/manifests/seichi-kubernetes/app-templates/seichi-debug-minecraft-on-seichiassist-pr/templates/mariadb/mariadb.yaml +++ b/seichi-onp-k8s/manifests/seichi-kubernetes/app-templates/seichi-debug-minecraft-on-seichiassist-pr/templates/mariadb/mariadb.yaml @@ -4,7 +4,7 @@ metadata: name: mariadb spec: rootPasswordSecretKeyRef: - name: mariadb + name: mariadb-pr-review-password key: root-password database: seichiassist diff --git a/terraform/onp_cluster_secrets.tf b/terraform/onp_cluster_secrets.tf index b8ae03c00..d52328b4f 100644 --- a/terraform/onp_cluster_secrets.tf +++ b/terraform/onp_cluster_secrets.tf @@ -197,6 +197,11 @@ 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のパスワードがぶっ壊れて困るので記号を含めない @@ -222,6 +227,7 @@ resource "helm_release" "onp_minecraft__pr_review_mariadb_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 ]