This commit is contained in:
2024-01-26 20:49:13 +01:00
parent d318d017f2
commit 738339e6f7
11 changed files with 1028 additions and 963 deletions

View File

@@ -1,8 +1,4 @@
locals {
annotations = {
"vynil.solidite.fr/meta" = var.component
"vynil.solidite.fr/name" = var.namespace
}
annotations_default = {
"default.vynil.solidite.fr/sso_vynil" = var.sso_vynil
"default.vynil.solidite.fr/domain_name" = var.domain_name
@@ -56,8 +52,8 @@ locals {
resource "kubernetes_namespace_v1" "files-ns" {
count = var.nextcloud.enable ? 1 : 0
metadata {
annotations = merge(local.annotations, local.annotations_default)
labels = merge(local.common-labels, local.annotations)
annotations = local.annotations_default
labels = local.common-labels
name = "${var.namespace}-files"
}
}
@@ -70,7 +66,7 @@ resource "kubectl_manifest" "nextcloud" {
kind: "Install"
metadata:
name: "nextcloud"
namespace: "${var.namespace}-files"
namespace: "${kubernetes_namespace_v1.files-ns[0].metadata[0].name}"
labels: ${jsonencode(local.common-labels)}
spec:
distrib: "${var.distributions.domain}"