fix
This commit is contained in:
44
meta/domain-mail/apps.tf
Normal file
44
meta/domain-mail/apps.tf
Normal file
@@ -0,0 +1,44 @@
|
||||
locals {
|
||||
annotations = {
|
||||
"vynil.solidite.fr/meta" = var.component
|
||||
"vynil.solidite.fr/name" = var.namespace
|
||||
"vynil.solidite.fr/domain" = var.domain-name
|
||||
"vynil.solidite.fr/issuer" = var.issuer
|
||||
"vynil.solidite.fr/ingress" = var.ingress-class
|
||||
}
|
||||
global = {
|
||||
"domain" = var.namespace
|
||||
"domain-name" = var.domain-name
|
||||
"issuer" = var.issuer
|
||||
"ingress-class" = var.ingress-class
|
||||
"backups" = var.backups
|
||||
}
|
||||
wildduck = { for k, v in var.wildduck : k => v if k!="enable" }
|
||||
}
|
||||
|
||||
resource "kubernetes_namespace_v1" "mail-ns" {
|
||||
count = ( var.wildduck.enable )? 1 : 0
|
||||
metadata {
|
||||
annotations = local.annotations
|
||||
labels = merge(local.common-labels, local.annotations)
|
||||
name = "${var.namespace}-mail"
|
||||
}
|
||||
}
|
||||
|
||||
resource "kubectl_manifest" "wildduck" {
|
||||
count = var.wildduck.enable ? 1 : 0
|
||||
depends_on = [kubernetes_namespace_v1.mail-ns]
|
||||
yaml_body = <<-EOF
|
||||
apiVersion: "vynil.solidite.fr/v1"
|
||||
kind: "Install"
|
||||
metadata:
|
||||
name: "wildduck"
|
||||
namespace: "${kubernetes_namespace_v1.mail-ns[0].metadata[0].name}"
|
||||
labels: ${jsonencode(local.common-labels)}
|
||||
spec:
|
||||
distrib: "${var.distributions.domain}"
|
||||
category: "share"
|
||||
component: "wildduck"
|
||||
options: ${jsonencode(merge(local.global, local.wildduck))}
|
||||
EOF
|
||||
}
|
||||
92
meta/domain-mail/index.yaml
Normal file
92
meta/domain-mail/index.yaml
Normal file
@@ -0,0 +1,92 @@
|
||||
---
|
||||
apiVersion: vinyl.solidite.fr/v1beta1
|
||||
kind: Component
|
||||
category: meta
|
||||
metadata:
|
||||
name: domain-mail
|
||||
description: null
|
||||
options:
|
||||
ingress-class:
|
||||
default: traefik
|
||||
examples:
|
||||
- traefik
|
||||
type: string
|
||||
backups:
|
||||
default:
|
||||
enable: false
|
||||
endpoint: ''
|
||||
key-id-key: s3-id
|
||||
secret-key: s3-secret
|
||||
secret-name: backup-settings
|
||||
examples:
|
||||
- enable: false
|
||||
endpoint: ''
|
||||
key-id-key: s3-id
|
||||
secret-key: s3-secret
|
||||
secret-name: backup-settings
|
||||
properties:
|
||||
enable:
|
||||
default: false
|
||||
type: boolean
|
||||
endpoint:
|
||||
default: ''
|
||||
type: string
|
||||
key-id-key:
|
||||
default: s3-id
|
||||
type: string
|
||||
secret-key:
|
||||
default: s3-secret
|
||||
type: string
|
||||
secret-name:
|
||||
default: backup-settings
|
||||
type: string
|
||||
type: object
|
||||
wildduck:
|
||||
default:
|
||||
enable: true
|
||||
examples:
|
||||
- enable: true
|
||||
properties:
|
||||
enable:
|
||||
default: true
|
||||
type: boolean
|
||||
type: object
|
||||
domain:
|
||||
default: your-company
|
||||
examples:
|
||||
- your-company
|
||||
type: string
|
||||
distributions:
|
||||
default:
|
||||
core: core
|
||||
domain: domain
|
||||
examples:
|
||||
- core: core
|
||||
domain: domain
|
||||
properties:
|
||||
core:
|
||||
default: core
|
||||
type: string
|
||||
domain:
|
||||
default: domain
|
||||
type: string
|
||||
type: object
|
||||
domain-name:
|
||||
default: your_company.com
|
||||
examples:
|
||||
- your_company.com
|
||||
type: string
|
||||
issuer:
|
||||
default: letsencrypt-prod
|
||||
examples:
|
||||
- letsencrypt-prod
|
||||
type: string
|
||||
dependencies: []
|
||||
providers:
|
||||
kubernetes: true
|
||||
authentik: null
|
||||
kubectl: true
|
||||
postgresql: null
|
||||
restapi: null
|
||||
http: null
|
||||
tfaddtype: null
|
||||
Reference in New Issue
Block a user