This commit is contained in:
2023-07-14 12:53:52 +02:00
parent 284dc650c4
commit 4c33e34f45
13 changed files with 204 additions and 128 deletions

View File

@@ -16,27 +16,30 @@ options:
default: true
type: boolean
type: object
ci:
default:
enable: false
gitea:
enable: true
ingress-class:
default: traefik
examples:
- enable: false
gitea:
enable: true
- traefik
type: string
domain-name:
default: your_company.com
examples:
- your_company.com
type: string
distributions:
default:
core: core
domain: domain
examples:
- core: core
domain: domain
properties:
enable:
default: false
type: boolean
gitea:
default:
enable: true
properties:
enable:
default: true
type: boolean
type: object
core:
default: core
type: string
domain:
default: domain
type: string
type: object
erp:
default:
@@ -60,11 +63,33 @@ options:
default: false
type: boolean
type: object
domain-name:
default: your_company.com
issuer:
default: letsencrypt-prod
examples:
- your_company.com
- letsencrypt-prod
type: string
ci:
default:
enable: false
gitea:
enable: true
examples:
- enable: false
gitea:
enable: true
properties:
enable:
default: false
type: boolean
gitea:
default:
enable: true
properties:
enable:
default: true
type: boolean
type: object
type: object
infra:
default:
enable: false
@@ -87,16 +112,6 @@ options:
type: boolean
type: object
type: object
issuer:
default: letsencrypt-prod
examples:
- letsencrypt-prod
type: string
ingress-class:
default: traefik
examples:
- traefik
type: string
dependencies: []
providers:
kubernetes: null

View File

@@ -4,6 +4,7 @@ locals {
"domain-name" = var.domain-name
"issuer" = var.issuer
"ingress-class" = var.ingress-class
"distributions" = var.distributions
}
annotations = {
"vynil.solidite.fr/meta" = "domain"
@@ -42,7 +43,7 @@ resource "kubectl_manifest" "auth" {
namespace: "${var.namespace}"
labels: ${jsonencode(local.common-labels)}
spec:
distrib: "core"
distrib: "${var.distributions.domain}"
category: "meta"
component: "domain-auth"
options: ${jsonencode(merge(merge(local.global, local.auth), local.added-auth))}
@@ -58,7 +59,7 @@ resource "kubectl_manifest" "infra" {
namespace: "${var.namespace}"
labels: ${jsonencode(local.common-labels)}
spec:
distrib: "core"
distrib: "${var.distributions.domain}"
category: "meta"
component: "domain-infra"
options: ${jsonencode(merge(local.global, local.infra))}
@@ -74,7 +75,7 @@ resource "kubectl_manifest" "ci" {
namespace: "${var.namespace}"
labels: ${jsonencode(local.common-labels)}
spec:
distrib: "core"
distrib: "${var.distributions.domain}"
category: "meta"
component: "domain-ci"
options: ${jsonencode(merge(local.global, local.ci))}
@@ -90,7 +91,7 @@ resource "kubectl_manifest" "erp" {
namespace: "${var.namespace}"
labels: ${jsonencode(local.common-labels)}
spec:
distrib: "core"
distrib: "${var.distributions.domain}"
category: "meta"
component: "domain-erp"
options: ${jsonencode(merge(local.global, local.erp))}