From b4908d43aad949aaee6392c0c73396d3f94bd441 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Huss?= Date: Tue, 24 Oct 2023 15:02:13 +0200 Subject: [PATCH] fix --- meta/domain-apps/apps.tf | 5 ++- meta/domain-apps/index.yaml | 80 ++++++++++++++++++------------------- 2 files changed, 43 insertions(+), 42 deletions(-) diff --git a/meta/domain-apps/apps.tf b/meta/domain-apps/apps.tf index 54affff..3422c0a 100644 --- a/meta/domain-apps/apps.tf +++ b/meta/domain-apps/apps.tf @@ -13,11 +13,12 @@ locals { "ingress-class" = var.ingress-class "backups" = var.backups } + default-mode = var.storage-classes.FilesystemReadWriteMany!=""?"ReadWriteMany":"ReadWriteOnce" nextcloud = { for k, v in var.nextcloud : k => v if contains(["enable"],k) } nextcloud-storage = { "storage" = { - "size" = "10Gi" - "accessMode" = var.storage-classes.FilesystemReadWriteMany!=""?"ReadWriteMany":"ReadWriteOnce" + "size" = lookup(lookup(local.nextcloud, "storage",{}), "size", "10Gi") + "accessMode" = lookup(lookup(local.nextcloud, "storage",{}), "accessMode", local.default-mode) } } } diff --git a/meta/domain-apps/index.yaml b/meta/domain-apps/index.yaml index b2c8af1..316eaed 100644 --- a/meta/domain-apps/index.yaml +++ b/meta/domain-apps/index.yaml @@ -6,6 +6,46 @@ metadata: name: domain-apps description: null options: + distributions: + default: + core: core + domain: domain + examples: + - core: core + domain: domain + properties: + core: + default: core + type: string + domain: + default: domain + type: string + type: object + nextcloud: + default: + enable: false + examples: + - enable: false + properties: + enable: + default: false + type: boolean + type: object + issuer: + default: letsencrypt-prod + examples: + - letsencrypt-prod + type: string + domain: + default: your-company + examples: + - your-company + type: string + domain-name: + default: your_company.com + examples: + - your_company.com + type: string backups: default: enable: false @@ -61,46 +101,6 @@ options: default: '' type: string type: object - domain-name: - default: your_company.com - examples: - - your_company.com - type: string - nextcloud: - 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 - 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: