From ca53edb32d713fa4ca7c6bab6d248b46b41069e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Huss?= Date: Fri, 20 Oct 2023 09:28:43 +0200 Subject: [PATCH] fix --- apps/dbgate/configs.tf | 6 +- apps/dbgate/index.yaml | 162 ++++++++++++++++++++--------------------- 2 files changed, 82 insertions(+), 86 deletions(-) diff --git a/apps/dbgate/configs.tf b/apps/dbgate/configs.tf index 232856e..3db7e95 100644 --- a/apps/dbgate/configs.tf +++ b/apps/dbgate/configs.tf @@ -28,13 +28,9 @@ locals { mongo_vars = merge([for 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"]) - join("_",["PORT_mongo", m.namespace, m.name]) = "27017" - join("_",["DATABASE_mongo", m.namespace, m.name]) = m.dbname - join("_",["USER_mongo", m.namespace, m.name]) = m.username }]...) mongo_secrets = merge([for index, m in var.mongo: { - join("_",["PASSWORD_mongo", m.namespace, m.name]) = data.kubernetes_secret_v1.mongos[index].data[m.secret.key] + join("_",["URL_mongo", m.namespace, m.name]) = "mongodb://${m.username}:${data.kubernetes_secret_v1.mongos[index].data[m.secret.key]}@${join(".",["${m.name}-svc", m.namespace, "svc"])}:27017/?replicaSet=${m.dbname}" }]...) mongo_conns = [for m in var.mongo: join("_",["mongo", m.namespace, m.name])] oauth_config = { diff --git a/apps/dbgate/index.yaml b/apps/dbgate/index.yaml index eb14f50..4d82981 100644 --- a/apps/dbgate/index.yaml +++ b/apps/dbgate/index.yaml @@ -35,11 +35,92 @@ options: type: string type: object type: array + pg: + 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 + storage: + default: + accessMode: ReadWriteOnce + size: 1Gi + type: Filesystem + examples: + - accessMode: ReadWriteOnce + size: 1Gi + type: Filesystem + properties: + accessMode: + default: ReadWriteOnce + enum: + - ReadWriteOnce + - ReadOnlyMany + - ReadWriteMany + type: string + size: + default: 1Gi + type: string + type: + default: Filesystem + enum: + - Filesystem + - Block + type: string + type: object + use-oauth: + default: false + examples: + - false + type: boolean + sub-domain: + default: dbgate + examples: + - dbgate + type: string domain: default: your-company examples: - your-company type: string + issuer: + default: letsencrypt-prod + examples: + - letsencrypt-prod + type: string + ingress-class: + default: traefik + examples: + - traefik + type: string + app-group: + default: dev + examples: + - dev + type: string maria: default: [] examples: @@ -74,35 +155,6 @@ options: examples: - your_company.com type: string - pg: - 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: @@ -142,58 +194,6 @@ options: type: string type: object type: object - ingress-class: - default: traefik - examples: - - traefik - type: string - sub-domain: - default: dbgate - examples: - - dbgate - type: string - issuer: - default: letsencrypt-prod - examples: - - letsencrypt-prod - type: string - app-group: - default: dev - examples: - - dev - type: string - storage: - default: - accessMode: ReadWriteOnce - size: 1Gi - type: Filesystem - examples: - - accessMode: ReadWriteOnce - size: 1Gi - type: Filesystem - properties: - accessMode: - default: ReadWriteOnce - enum: - - ReadWriteOnce - - ReadOnlyMany - - ReadWriteMany - type: string - size: - default: 1Gi - type: string - type: - default: Filesystem - enum: - - Filesystem - - Block - type: string - type: object - use-oauth: - default: false - examples: - - false - type: boolean dependencies: - dist: null category: share