This commit is contained in:
2024-05-12 12:03:32 +02:00
parent 599d175f82
commit 2890064fd4
191 changed files with 893 additions and 1068 deletions

View File

@@ -6,7 +6,7 @@ resource "kubectl_manifest" "backup_schedule" {
metadata:
name: "${var.instance}-backup"
namespace: "${var.namespace}"
labels: ${jsonencode(local.common-labels)}
labels: ${jsonencode(local.common_labels)}
spec:
backend:
repoPasswordSecretRef:

View File

@@ -1,7 +1,7 @@
locals {
authentik_url = "http://authentik.${var.domain}-auth.svc"
authentik_token = data.kubernetes_secret_v1.authentik.data["AUTHENTIK_BOOTSTRAP_TOKEN"]
common-labels = {
common_labels = {
"vynil.solidite.fr/owner-name" = var.instance
"vynil.solidite.fr/owner-namespace" = var.namespace
"vynil.solidite.fr/owner-category" = var.category
@@ -54,7 +54,7 @@ data "kubernetes_ingress_v1" "authentik" {
}
data "kustomization_overlay" "data" {
common_labels = local.common-labels
common_labels = local.common_labels
namespace = var.namespace
resources = [for file in fileset(path.module, "*.yaml"): file if ! contains(["index.yaml", "v1_ConfigMap_gitea-themes.yaml"], file)]
patches {

View File

@@ -2,7 +2,7 @@ resource "kubernetes_secret_v1" "gitea_inline_config" {
metadata {
name = "gitea-inline-config"
namespace = var.namespace
labels = local.common-labels
labels = local.common_labels
}
data = {

View File

@@ -1,5 +1,5 @@
locals {
pg-labels = merge(local.common-labels, {
pg-labels = merge(local.common_labels, {
"app.kubernetes.io/component" = "pg"
})
}

View File

@@ -22,7 +22,7 @@ module "ingress" {
namespace = var.namespace
issuer = var.issuer
ingress_class = var.ingress_class
labels = local.common-labels
labels = local.common_labels
dns_names = local.dns_names
middlewares = []
services = [local.service]
@@ -50,7 +50,7 @@ module "oauth2" {
instance = var.instance
namespace = var.namespace
domain = var.domain
labels = local.common-labels
labels = local.common_labels
dns_name = local.dns_name
redirect_path = "user/oauth2/vynil/callback"
providers = {

View File

@@ -1,5 +1,5 @@
locals {
redis-labels = merge(local.common-labels, {
redis-labels = merge(local.common_labels, {
"app.kubernetes.io/component" = "redis"
})
}

View File

@@ -1,5 +1,5 @@
locals {
secret-labels = merge(local.common-labels, {
secret-labels = merge(local.common_labels, {
"k8up.io/backup" = "true"
})
}