adding Nextcloud in the metas
This commit is contained in:
43
meta/domain-apps/apps.tf
Normal file
43
meta/domain-apps/apps.tf
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
locals {
|
||||||
|
annotations = {
|
||||||
|
"vynil.solidite.fr/meta" = "domain-auth"
|
||||||
|
"vynil.solidite.fr/name" = "${var.namespace}-auth"
|
||||||
|
"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
|
||||||
|
}
|
||||||
|
nextcloud = { for k, v in var.nextcloud : k => v if k!="enable" }
|
||||||
|
}
|
||||||
|
|
||||||
|
resource "kubernetes_namespace_v1" "files-ns" {
|
||||||
|
count = var.nextcloud.enable ? 1 : 0
|
||||||
|
metadata {
|
||||||
|
annotations = local.annotations
|
||||||
|
labels = merge(local.common-labels, local.annotations)
|
||||||
|
name = "${var.namespace}-files"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
resource "kubectl_manifest" "nextcloud" {
|
||||||
|
count = var.authentik.enable || var.authentik-ldap.enable || var.authentik-forward.enable ? 1 : 0
|
||||||
|
depends_on = [kubernetes_namespace_v1.auth-ns]
|
||||||
|
yaml_body = <<-EOF
|
||||||
|
apiVersion: "vynil.solidite.fr/v1"
|
||||||
|
kind: "Install"
|
||||||
|
metadata:
|
||||||
|
name: "nextcloud"
|
||||||
|
namespace: "${var.namespace}-files"
|
||||||
|
labels: ${jsonencode(local.common-labels)}
|
||||||
|
spec:
|
||||||
|
distrib: "${var.distributions.domain}"
|
||||||
|
category: "apps"
|
||||||
|
component: "nextcloud"
|
||||||
|
options: ${jsonencode(merge(local.global, local.nextcloud))}
|
||||||
|
EOF
|
||||||
|
}
|
||||||
61
meta/domain-apps/index.yaml
Normal file
61
meta/domain-apps/index.yaml
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
---
|
||||||
|
apiVersion: vinyl.solidite.fr/v1beta1
|
||||||
|
kind: Component
|
||||||
|
category: meta
|
||||||
|
metadata:
|
||||||
|
name: domain-apps
|
||||||
|
description: null
|
||||||
|
options:
|
||||||
|
nextcloud:
|
||||||
|
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
|
||||||
|
issuer:
|
||||||
|
default: letsencrypt-prod
|
||||||
|
examples:
|
||||||
|
- letsencrypt-prod
|
||||||
|
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
|
||||||
|
ingress-class:
|
||||||
|
default: traefik
|
||||||
|
examples:
|
||||||
|
- traefik
|
||||||
|
type: string
|
||||||
|
domain:
|
||||||
|
default: your-company
|
||||||
|
examples:
|
||||||
|
- your-company
|
||||||
|
type: string
|
||||||
|
dependencies: []
|
||||||
|
providers:
|
||||||
|
kubernetes: true
|
||||||
|
authentik: null
|
||||||
|
kubectl: true
|
||||||
|
postgresql: null
|
||||||
|
restapi: null
|
||||||
|
http: null
|
||||||
@@ -6,68 +6,6 @@ metadata:
|
|||||||
name: domain
|
name: domain
|
||||||
description: null
|
description: null
|
||||||
options:
|
options:
|
||||||
auth:
|
|
||||||
default:
|
|
||||||
enable: true
|
|
||||||
examples:
|
|
||||||
- enable: true
|
|
||||||
properties:
|
|
||||||
enable:
|
|
||||||
default: true
|
|
||||||
type: boolean
|
|
||||||
type: object
|
|
||||||
ingress-class:
|
|
||||||
default: traefik
|
|
||||||
examples:
|
|
||||||
- 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:
|
|
||||||
core:
|
|
||||||
default: core
|
|
||||||
type: string
|
|
||||||
domain:
|
|
||||||
default: domain
|
|
||||||
type: string
|
|
||||||
type: object
|
|
||||||
erp:
|
|
||||||
default:
|
|
||||||
dolibarr:
|
|
||||||
enable: true
|
|
||||||
enable: false
|
|
||||||
examples:
|
|
||||||
- dolibarr:
|
|
||||||
enable: true
|
|
||||||
enable: false
|
|
||||||
properties:
|
|
||||||
dolibarr:
|
|
||||||
default:
|
|
||||||
enable: true
|
|
||||||
properties:
|
|
||||||
enable:
|
|
||||||
default: true
|
|
||||||
type: boolean
|
|
||||||
type: object
|
|
||||||
enable:
|
|
||||||
default: false
|
|
||||||
type: boolean
|
|
||||||
type: object
|
|
||||||
issuer:
|
|
||||||
default: letsencrypt-prod
|
|
||||||
examples:
|
|
||||||
- letsencrypt-prod
|
|
||||||
type: string
|
|
||||||
ci:
|
ci:
|
||||||
default:
|
default:
|
||||||
enable: false
|
enable: false
|
||||||
@@ -90,6 +28,16 @@ options:
|
|||||||
type: boolean
|
type: boolean
|
||||||
type: object
|
type: object
|
||||||
type: object
|
type: object
|
||||||
|
auth:
|
||||||
|
default:
|
||||||
|
enable: true
|
||||||
|
examples:
|
||||||
|
- enable: true
|
||||||
|
properties:
|
||||||
|
enable:
|
||||||
|
default: true
|
||||||
|
type: boolean
|
||||||
|
type: object
|
||||||
infra:
|
infra:
|
||||||
default:
|
default:
|
||||||
enable: false
|
enable: false
|
||||||
@@ -112,6 +60,80 @@ 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
|
||||||
|
domain-name:
|
||||||
|
default: your_company.com
|
||||||
|
examples:
|
||||||
|
- your_company.com
|
||||||
|
type: string
|
||||||
|
erp:
|
||||||
|
default:
|
||||||
|
dolibarr:
|
||||||
|
enable: true
|
||||||
|
enable: false
|
||||||
|
examples:
|
||||||
|
- dolibarr:
|
||||||
|
enable: true
|
||||||
|
enable: false
|
||||||
|
properties:
|
||||||
|
dolibarr:
|
||||||
|
default:
|
||||||
|
enable: true
|
||||||
|
properties:
|
||||||
|
enable:
|
||||||
|
default: true
|
||||||
|
type: boolean
|
||||||
|
type: object
|
||||||
|
enable:
|
||||||
|
default: false
|
||||||
|
type: boolean
|
||||||
|
type: object
|
||||||
|
distributions:
|
||||||
|
default:
|
||||||
|
core: core
|
||||||
|
domain: domain
|
||||||
|
examples:
|
||||||
|
- core: core
|
||||||
|
domain: domain
|
||||||
|
properties:
|
||||||
|
core:
|
||||||
|
default: core
|
||||||
|
type: string
|
||||||
|
domain:
|
||||||
|
default: domain
|
||||||
|
type: string
|
||||||
|
type: object
|
||||||
|
apps:
|
||||||
|
default:
|
||||||
|
enable: false
|
||||||
|
nextcloud:
|
||||||
|
enable: true
|
||||||
|
examples:
|
||||||
|
- enable: false
|
||||||
|
nextcloud:
|
||||||
|
enable: true
|
||||||
|
properties:
|
||||||
|
enable:
|
||||||
|
default: false
|
||||||
|
type: boolean
|
||||||
|
nextcloud:
|
||||||
|
default:
|
||||||
|
enable: true
|
||||||
|
properties:
|
||||||
|
enable:
|
||||||
|
default: true
|
||||||
|
type: boolean
|
||||||
|
type: object
|
||||||
|
type: object
|
||||||
dependencies: []
|
dependencies: []
|
||||||
providers:
|
providers:
|
||||||
kubernetes: null
|
kubernetes: null
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ locals {
|
|||||||
infra = { for k, v in var.infra : k => v if k!="enable" }
|
infra = { for k, v in var.infra : k => v if k!="enable" }
|
||||||
ci = { for k, v in var.ci : k => v if k!="enable" }
|
ci = { for k, v in var.ci : k => v if k!="enable" }
|
||||||
erp = { for k, v in var.erp : 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" }
|
||||||
|
|
||||||
# Force install authentik and it's modules when any are needed
|
# 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)
|
use-ldap = (var.ci.enable && var.ci.gitea.enable) || (var.erp.enable && var.erp.dolibarr.enable)
|
||||||
@@ -97,3 +98,19 @@ resource "kubectl_manifest" "erp" {
|
|||||||
options: ${jsonencode(merge(local.global, local.erp))}
|
options: ${jsonencode(merge(local.global, local.erp))}
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
resource "kubectl_manifest" "apps" {
|
||||||
|
count = var.apps.enable ? 1 : 0
|
||||||
|
yaml_body = <<-EOF
|
||||||
|
apiVersion: "vynil.solidite.fr/v1"
|
||||||
|
kind: "Install"
|
||||||
|
metadata:
|
||||||
|
name: "apps"
|
||||||
|
namespace: "${var.namespace}"
|
||||||
|
labels: ${jsonencode(local.common-labels)}
|
||||||
|
spec:
|
||||||
|
distrib: "${var.distributions.domain}"
|
||||||
|
category: "meta"
|
||||||
|
component: "domain-apps"
|
||||||
|
options: ${jsonencode(merge(local.global, local.apps))}
|
||||||
|
EOF
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user