From 675891c558c4e28ddacbfa5dc87690e5720e6272 Mon Sep 17 00:00:00 2001 From: Khue Doan Date: Sat, 25 Dec 2021 20:18:45 +0700 Subject: [PATCH] feat(external): inject Backblaze secrets to k8up namespace --- external/backblaze.tf | 12 ++++++++++++ external/namespaces.yml | 5 +++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/external/backblaze.tf b/external/backblaze.tf index 98dacc50..e72c8962 100644 --- a/external/backblaze.tf +++ b/external/backblaze.tf @@ -2,3 +2,15 @@ resource "b2_bucket" "backup" { bucket_name = "khuedoan-homelab-backup" bucket_type = "allPrivate" } + +resource "kubernetes_secret" "backblaze_credentials" { + metadata { + name = "backblaze-credentials" + namespace = "k8up-operator" + } + + data = { + "application-key-id" = var.b2_application_key_id + "application-key" = var.b2_application_key + } +} diff --git a/external/namespaces.yml b/external/namespaces.yml index 1a9fda91..1d398ccd 100644 --- a/external/namespaces.yml +++ b/external/namespaces.yml @@ -7,7 +7,8 @@ name: "{{ item }}" state: present loop: - - tekton-pipelines - cert-manager - - external-dns - cloudflared + - external-dns + - k8up-operator + - tekton-pipelines