From f8bf2319e64046074e568400ced257473a6fcf1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Huss?= Date: Thu, 19 Oct 2023 18:11:21 +0200 Subject: [PATCH] fix --- apps/dbgate/configs.tf | 6 +- apps/dbgate/index.yaml | 124 +++++++++---------- meta/domain/index.yaml | 264 ++++++++++++++++++++-------------------- meta/domain/installs.tf | 6 +- 4 files changed, 200 insertions(+), 200 deletions(-) diff --git a/apps/dbgate/configs.tf b/apps/dbgate/configs.tf index 91cc49e..4516fbc 100644 --- a/apps/dbgate/configs.tf +++ b/apps/dbgate/configs.tf @@ -7,12 +7,12 @@ locals { join("_",["DATABASE_pg", pg.namespace, pg.name, pg.dbname]) = pg.dbname join("_",["USER_pg", pg.namespace, pg.name, pg.dbname]) = pg.username }]...) - pg_secrets = merge([for pg in var.pg: { + pg_secrets = merge([for index, pg in var.pg: { join("_",["PASSWORD_pg", pg.namespace, pg.name, pg.dbname]) = data.kubernetes_secret_v1.pgs[index].data[pg.secret.key] }]...) pg_conns = [for pg in var.pg: join("_",["pg", pg.namespace, pg.name, pg.dbname])] - maria_vars = merge([for m in var.maria: { + maria_vars = merge([for index, m in var.maria: { join("_",["LABEL_maria", m.namespace, m.name]) = join(" | ",["maria", m.namespace, m.name]) join("_",["ENGINE_maria", m.namespace, m.name]) = "mysql@dbgate-plugin-mysql" join("_",["SERVER_maria", m.namespace, m.name]) = join(".",["${m.name}-svc", m.namespace, "svc"]) @@ -25,7 +25,7 @@ locals { }]...) maria_conns = [for m in var.maria: join("_",["maria", m.namespace, m.name])] - mongo_vars = merge([for m in var.mongo: { + mongo_vars = merge([for index, m in var.mongo: { join("_",["LABEL_mongo", m.namespace, m.name]) = join(" | ",["mongo", m.namespace, m.name]) join("_",["ENGINE_mongo", m.namespace, m.name]) = "mongo@dbgate-plugin-mongo" join("_",["SERVER_mongo", m.namespace, m.name]) = join(".",["${m.name}-svc", m.namespace, "svc"]) diff --git a/apps/dbgate/index.yaml b/apps/dbgate/index.yaml index c30ac5d..37d0855 100644 --- a/apps/dbgate/index.yaml +++ b/apps/dbgate/index.yaml @@ -6,35 +6,6 @@ metadata: name: dbgate description: null options: - mongo: - default: [] - examples: - - [] - items: - properties: - dbname: - default: '' - type: string - name: - default: '' - type: string - namespace: - default: '' - type: string - secret: - properties: - key: - default: '' - type: string - name: - default: '' - type: string - type: object - username: - default: '' - type: string - type: object - type: array images: default: dbgate: @@ -74,10 +45,20 @@ options: type: string type: object type: object - ingress-class: - default: traefik + domain: + default: your-company examples: - - traefik + - your-company + type: string + domain-name: + default: your_company.com + examples: + - your_company.com + type: string + app-group: + default: dev + examples: + - dev type: string storage: default: @@ -106,21 +87,6 @@ options: - Block type: string type: object - sub-domain: - default: dbgate - examples: - - dbgate - type: string - domain-name: - default: your_company.com - examples: - - your_company.com - type: string - issuer: - default: letsencrypt-prod - examples: - - letsencrypt-prod - type: string pg: default: [] examples: @@ -150,6 +116,55 @@ options: type: string type: object type: array + issuer: + default: letsencrypt-prod + examples: + - letsencrypt-prod + type: string + mongo: + default: [] + examples: + - [] + items: + properties: + dbname: + default: '' + type: string + name: + default: '' + type: string + namespace: + default: '' + type: string + secret: + properties: + key: + default: '' + type: string + name: + default: '' + type: string + type: object + username: + default: '' + type: string + type: object + type: array + ingress-class: + default: traefik + examples: + - traefik + type: string + sub-domain: + default: dbgate + examples: + - dbgate + type: string + use-oauth: + default: false + examples: + - false + type: boolean maria: default: [] examples: @@ -179,21 +194,6 @@ options: type: string type: object type: array - domain: - default: your-company - examples: - - your-company - type: string - app-group: - default: dev - examples: - - dev - type: string - use-oauth: - default: false - examples: - - false - type: boolean dependencies: - dist: null category: share diff --git a/meta/domain/index.yaml b/meta/domain/index.yaml index 84de5c2..17905bd 100644 --- a/meta/domain/index.yaml +++ b/meta/domain/index.yaml @@ -6,140 +6,16 @@ metadata: name: domain description: null options: - backups: + auth: default: - enable: false - endpoint: '' - key-id-key: s3-id - secret-key: s3-secret - secret-name: backup-settings + enable: true examples: - - enable: false - endpoint: '' - key-id-key: s3-id - secret-key: s3-secret - secret-name: backup-settings + - enable: true 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 - devspaces: - default: - enable: false - examples: - - enable: false - properties: - enable: - default: false + default: true type: boolean 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 - 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 - 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 - storage-classes: - default: - BlockReadWriteMany: '' - BlockReadWriteOnce: '' - FilesystemReadWriteMany: '' - FilesystemReadWriteOnce: '' - examples: - - BlockReadWriteMany: '' - BlockReadWriteOnce: '' - FilesystemReadWriteMany: '' - FilesystemReadWriteOnce: '' - properties: - BlockReadWriteMany: - default: '' - type: string - BlockReadWriteOnce: - default: '' - type: string - FilesystemReadWriteMany: - default: '' - type: string - FilesystemReadWriteOnce: - default: '' - type: string - type: object - issuer: - default: letsencrypt-prod - examples: - - letsencrypt-prod - type: string ingress-class: default: traefik examples: @@ -189,16 +65,118 @@ options: default: false type: boolean type: object - auth: + distributions: default: - enable: true + core: core + domain: domain examples: - - enable: true + - core: core + domain: domain + properties: + core: + default: core + type: string + domain: + default: domain + type: string + type: object + devspaces: + default: + enable: false + examples: + - enable: false properties: enable: - default: true + default: false type: boolean type: object + domain-name: + default: your_company.com + examples: + - your_company.com + 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 + storage-classes: + default: + BlockReadWriteMany: '' + BlockReadWriteOnce: '' + FilesystemReadWriteMany: '' + FilesystemReadWriteOnce: '' + examples: + - BlockReadWriteMany: '' + BlockReadWriteOnce: '' + FilesystemReadWriteMany: '' + FilesystemReadWriteOnce: '' + properties: + BlockReadWriteMany: + default: '' + type: string + BlockReadWriteOnce: + default: '' + type: string + FilesystemReadWriteMany: + default: '' + type: string + FilesystemReadWriteOnce: + default: '' + type: string + type: object + issuer: + default: letsencrypt-prod + examples: + - letsencrypt-prod + type: string + 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 mail: default: enable: false @@ -221,6 +199,28 @@ options: type: boolean type: object type: object + 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 dependencies: [] providers: kubernetes: null diff --git a/meta/domain/installs.tf b/meta/domain/installs.tf index f04695a..4f6eb0e 100644 --- a/meta/domain/installs.tf +++ b/meta/domain/installs.tf @@ -58,7 +58,7 @@ locals { "name" = "dolibarr-dolibarr-pg" "dbname" = "dolibarr" "username" = "dolibarr" - "namespace" = "${var.domain}-erp" + "namespace" = "${var.namespace}-erp" "secret" = { "name" = "dolibarr-dolibarr-pg-app" "key" = "password" @@ -67,7 +67,7 @@ locals { "name" = "nextcloud-nextcloud-pg" "dbname" = "nextcloud" "username" = "nextcloud" - "namespace" = "${var.domain}-files" + "namespace" = "${var.namespace}-files" "secret" = { "name" = "nextcloud-nextcloud-pg-app" "key" = "password" @@ -76,7 +76,7 @@ locals { "name" = "gitea-gitea-pg" "dbname" = "gitea" "username" = "gitea" - "namespace" = "${var.domain}-ci" + "namespace" = "${var.namespace}-ci" "secret" = { "name" = "gitea-gitea-pg-app" "key" = "password"