Skip to content

Commit

Permalink
fix: minio-secretsを定義してminio-secretsからsecretを取得するように
Browse files Browse the repository at this point in the history
  • Loading branch information
rito528 committed Dec 2, 2023
1 parent a0b2bac commit 7e2bf3c
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@ spec:
- name: MINIO_ACCESS_KEY
valueFrom:
secretKeyRef:
name: clustersecret
name: minio-secrets
key: MINIO_ACCESS_KEY
- name: MINIO_ACCESS_SECRET
valueFrom:
secretKeyRef:
name: clustersecret
name: minio-secrets
key: MINIO_ACCESS_SECRET
- name: BUCKET_NAME
value: seichi-plugins
Expand Down
28 changes: 28 additions & 0 deletions terraform/onp_cluster_minecraft_secrets.tf
Original file line number Diff line number Diff line change
Expand Up @@ -114,3 +114,31 @@ resource "kubernetes_secret" "onp_minecraft_debug_mariadb_root_password" {

type = "Opaque"
}

resource "helm_release" "onp_minecraft_mariadb_monitoring_password" {
depends_on = [kubernetes_namespace.onp_seichi_debug_minecraft]

repository = "https://giganticminecraft.github.io/seichi_infra/"
chart = "raw-resources"
name = "seichi-debug-minecraft-minio-secrets"
namespace = "kube-system"
version = "0.3.0"

set_list {
name = "manifests"
value = [<<-EOS
kind: ClusterSecret
apiVersion: clustersecret.io/v1
metadata:
namespace: clustersecret
name: minio-secrets
matchNamespace:
- seichi-debug-minecraft-on-seichiassist-pr-*
data:
MINIO_ACCESS_KEY: ${base64encode(var.minio_debug_access_key)}
MINIO_DEBUG_ACCESS_SECRET: ${base64encode(var.minio_debug_access_secret)}
EOS
]
}

}

0 comments on commit 7e2bf3c

Please sign in to comment.