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

@@ -3,9 +3,14 @@ apiVersion: vinyl.solidite.fr/v1beta1
kind: Component kind: Component
category: apps category: apps
metadata: metadata:
name: k8s-ui name: k8s-api
description: Access to the kubernetes api description: Access to the kubernetes api
options: options:
sub-domain:
default: api
examples:
- api
type: string
domain-name: domain-name:
default: your_company.com default: your_company.com
examples: examples:
@@ -16,11 +21,6 @@ options:
examples: examples:
- letsencrypt-prod - letsencrypt-prod
type: string type: string
sub-domain:
default: api
examples:
- api
type: string
ingress-class: ingress-class:
default: traefik default: traefik
examples: examples:

View File

@@ -37,7 +37,7 @@ resource "kubectl_manifest" "authentik" {
namespace: "${var.namespace}-auth" namespace: "${var.namespace}-auth"
labels: ${jsonencode(local.common-labels)} labels: ${jsonencode(local.common-labels)}
spec: spec:
distrib: "core" distrib: "${var.distributions.domain}"
category: "share" category: "share"
component: "authentik" component: "authentik"
options: ${jsonencode(merge(local.global, local.authentik))} options: ${jsonencode(merge(local.global, local.authentik))}
@@ -55,7 +55,7 @@ resource "kubectl_manifest" "authentik-ldap" {
namespace: "${var.namespace}-auth" namespace: "${var.namespace}-auth"
labels: ${jsonencode(local.common-labels)} labels: ${jsonencode(local.common-labels)}
spec: spec:
distrib: "core" distrib: "${var.distributions.domain}"
category: "share" category: "share"
component: "authentik-ldap" component: "authentik-ldap"
options: ${jsonencode(merge(local.global, local.authentik-ldap))} options: ${jsonencode(merge(local.global, local.authentik-ldap))}
@@ -73,7 +73,7 @@ resource "kubectl_manifest" "authentik-forward" {
namespace: "${var.namespace}-auth" namespace: "${var.namespace}-auth"
labels: ${jsonencode(local.common-labels)} labels: ${jsonencode(local.common-labels)}
spec: spec:
distrib: "core" distrib: "${var.distributions.domain}"
category: "share" category: "share"
component: "authentik-forward" component: "authentik-forward"
options: ${jsonencode(merge(local.global, local.authentik-forward))} options: ${jsonencode(merge(local.global, local.authentik-forward))}

View File

@@ -6,31 +6,26 @@ metadata:
name: domain-auth name: domain-auth
description: null description: null
options: options:
authentik-ldap:
default:
enable: false
examples:
- enable: false
properties:
enable:
default: false
type: boolean
type: object
issuer: issuer:
default: letsencrypt-prod default: letsencrypt-prod
examples: examples:
- letsencrypt-prod - letsencrypt-prod
type: string type: string
domain-name: distributions:
default: your_company.com default:
core: core
domain: domain
examples: examples:
- your_company.com - core: core
domain: domain
properties:
core:
default: core
type: string type: string
ingress-class: domain:
default: traefik default: domain
examples:
- traefik
type: string type: string
type: object
authentik: authentik:
default: default:
enable: true enable: true
@@ -41,6 +36,21 @@ options:
default: true default: true
type: boolean type: boolean
type: object type: object
authentik-ldap:
default:
enable: false
examples:
- enable: false
properties:
enable:
default: false
type: boolean
type: object
domain-name:
default: your_company.com
examples:
- your_company.com
type: string
authentik-forward: authentik-forward:
default: default:
enable: false enable: false
@@ -51,6 +61,11 @@ options:
default: false default: false
type: boolean type: boolean
type: object type: object
ingress-class:
default: traefik
examples:
- traefik
type: string
domain: domain:
default: your-company default: your-company
examples: examples:

View File

@@ -35,7 +35,7 @@ resource "kubectl_manifest" "gitea" {
namespace: "${var.namespace}-ci" namespace: "${var.namespace}-ci"
labels: ${jsonencode(local.common-labels)} labels: ${jsonencode(local.common-labels)}
spec: spec:
distrib: "core" distrib: "${var.distributions.domain}"
category: "apps" category: "apps"
component: "gitea" component: "gitea"
options: ${jsonencode(merge(local.global, local.gitea))} options: ${jsonencode(merge(local.global, local.gitea))}

View File

@@ -6,16 +6,6 @@ metadata:
name: domain-ci name: domain-ci
description: null description: null
options: options:
gitea:
default:
enable: true
examples:
- enable: true
properties:
enable:
default: true
type: boolean
type: object
domain-name: domain-name:
default: your_company.com default: your_company.com
examples: examples:
@@ -36,6 +26,31 @@ options:
examples: examples:
- traefik - traefik
type: string 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
gitea:
default:
enable: true
examples:
- enable: true
properties:
enable:
default: true
type: boolean
type: object
dependencies: [] dependencies: []
providers: providers:
kubernetes: true kubernetes: true

View File

@@ -35,7 +35,7 @@ resource "kubectl_manifest" "dolibarr" {
namespace: "${kubernetes_namespace_v1.erp-ns[0].metadata[0].name}" namespace: "${kubernetes_namespace_v1.erp-ns[0].metadata[0].name}"
labels: ${jsonencode(local.common-labels)} labels: ${jsonencode(local.common-labels)}
spec: spec:
distrib: "core" distrib: "${var.distributions.domain}"
category: "apps" category: "apps"
component: "dolibarr" component: "dolibarr"
options: ${jsonencode(merge(local.global, local.dolibarr))} options: ${jsonencode(merge(local.global, local.dolibarr))}

View File

@@ -6,21 +6,6 @@ metadata:
name: domain-erp name: domain-erp
description: null description: null
options: options:
domain-name:
default: your_company.com
examples:
- your_company.com
type: string
dolibarr:
default:
enable: true
examples:
- enable: true
properties:
enable:
default: true
type: boolean
type: object
ingress-class: ingress-class:
default: traefik default: traefik
examples: examples:
@@ -31,11 +16,41 @@ options:
examples: examples:
- your-company - your-company
type: string 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
dolibarr:
default:
enable: true
examples:
- enable: true
properties:
enable:
default: true
type: boolean
type: object
issuer: issuer:
default: letsencrypt-prod default: letsencrypt-prod
examples: examples:
- letsencrypt-prod - letsencrypt-prod
type: string type: string
domain-name:
default: your_company.com
examples:
- your_company.com
type: string
dependencies: [] dependencies: []
providers: providers:
kubernetes: true kubernetes: true

View File

@@ -37,7 +37,7 @@ resource "kubectl_manifest" "dns" {
namespace: "${kubernetes_namespace_v1.infra-ns.name}" namespace: "${kubernetes_namespace_v1.infra-ns.name}"
labels: ${jsonencode(local.common-labels)} labels: ${jsonencode(local.common-labels)}
spec: spec:
distrib: "core" distrib: "${var.distributions.domain}"
category: "share" category: "share"
component: "dns" component: "dns"
options: ${jsonencode(merge(local.global, local.dns))} options: ${jsonencode(merge(local.global, local.dns))}
@@ -55,7 +55,7 @@ resource "kubectl_manifest" "traefik" {
namespace: "${var.traefik.namespace}" namespace: "${var.traefik.namespace}"
labels: ${jsonencode(local.common-labels)} labels: ${jsonencode(local.common-labels)}
spec: spec:
distrib: "core" distrib: "${var.distributions.domain}"
category: "apps" category: "apps"
component: "traefik-ui" component: "traefik-ui"
options: ${jsonencode(merge(local.global, local.traefik))} options: ${jsonencode(merge(local.global, local.traefik))}
@@ -72,9 +72,9 @@ resource "kubectl_manifest" "traefik" {
namespace: "default" namespace: "default"
labels: ${jsonencode(local.common-labels)} labels: ${jsonencode(local.common-labels)}
spec: spec:
distrib: "core" distrib: "${var.distributions.domain}"
category: "apps" category: "apps"
component: "k8s-ui" component: "k8s-api"
options: ${jsonencode(merge(local.global, local.api))} options: ${jsonencode(merge(local.global, local.api))}
EOF EOF
} }

View File

@@ -6,16 +6,61 @@ metadata:
name: domain-infra name: domain-infra
description: null description: null
options: options:
ingress-class: distributions:
default: traefik default:
core: core
domain: domain
examples: examples:
- traefik - core: core
domain: domain
properties:
core:
default: core
type: string
domain:
default: domain
type: string
type: object
api:
default:
enable: false
examples:
- enable: false
properties:
enable:
default: false
type: boolean
type: object
domain:
default: your-company
examples:
- your-company
type: string
issuer:
default: letsencrypt-prod
examples:
- letsencrypt-prod
type: string type: string
domain-name: domain-name:
default: your_company.com default: your_company.com
examples: examples:
- your_company.com - your_company.com
type: string type: string
dns:
default:
enable: false
examples:
- enable: false
properties:
enable:
default: false
type: boolean
type: object
ingress-class:
default: traefik
examples:
- traefik
type: string
traefik: traefik:
default: default:
enable: false enable: false
@@ -31,36 +76,6 @@ options:
default: traefik default: traefik
type: string type: string
type: object type: object
domain:
default: your-company
examples:
- your-company
type: string
api:
default:
enable: false
examples:
- enable: false
properties:
enable:
default: false
type: boolean
type: object
issuer:
default: letsencrypt-prod
examples:
- letsencrypt-prod
type: string
dns:
default:
enable: false
examples:
- enable: false
properties:
enable:
default: false
type: boolean
type: object
dependencies: [] dependencies: []
providers: providers:
kubernetes: true kubernetes: true

View File

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

View File

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