This commit is contained in:
2023-08-11 13:36:49 +02:00
parent 3875aff2b2
commit f5e178943f
2 changed files with 117 additions and 90 deletions

View File

@@ -19,6 +19,7 @@ locals {
ci = { for k, v in var.ci : k => v if k!="enable" }
erp = { for k, v in var.erp : k => v if k!="enable" }
apps = { for k, v in var.apps : k => v if k!="enable" }
mail = { for k, v in var.apps : k => v if k!="enable" }
# Force install authentik and it's modules when any are needed
use-ldap = (var.ci.enable && var.ci.gitea.enable) || (var.erp.enable && var.erp.dolibarr.enable)
@@ -115,3 +116,19 @@ resource "kubectl_manifest" "apps" {
options: ${jsonencode(merge(local.global, local.apps))}
EOF
}
resource "kubectl_manifest" "apps" {
count = var.apps.enable ? 1 : 0
yaml_body = <<-EOF
apiVersion: "vynil.solidite.fr/v1"
kind: "Install"
metadata:
name: "mail"
namespace: "${var.namespace}"
labels: ${jsonencode(local.common-labels)}
spec:
distrib: "${var.distributions.domain}"
category: "meta"
component: "domain-mail"
options: ${jsonencode(merge(local.global, local.mail))}
EOF
}