chore: cleanup Backblaze secret keys

This commit is contained in:
Khue Doan 2021-12-25 21:58:02 +07:00
parent 7b5d33426a
commit 8793556800
2 changed files with 11 additions and 5 deletions

View File

@ -3,6 +3,11 @@ resource "b2_bucket" "backup" {
bucket_type = "allPrivate"
}
resource "random_password" "backup_repo_password" {
length = 64
special = false
}
resource "kubernetes_secret" "backblaze_credentials" {
metadata {
name = "backblaze-credentials"
@ -12,5 +17,6 @@ resource "kubernetes_secret" "backblaze_credentials" {
data = {
"application-key-id" = var.b2_application_key_id
"application-key" = var.b2_application_key
"repo-password" = random_password.backup_repo_password.result
}
}

View File

@ -4,18 +4,18 @@ metadata:
name: schedule-test
spec:
backend:
repoPasswordSecretRef:
name: backblaze-credentials
key: password
b2:
path: s3.us-west-002.backblazeb2.com
bucket: khuedoan-homelab-backup
accountIDSecretRef:
name: backblaze-credentials
key: username
key: application-key-id
accountKeySecretRef:
name: backblaze-credentials
key: password
key: application-key
repoPasswordSecretRef:
name: backblaze-credentials
key: repo-password
backup:
schedule: '*/5 * * * *'
failedJobsHistoryLimit: 2