diff --git a/apps/dbgate/configs.tf b/apps/dbgate/configs.tf index 190a503..b32ca4a 100644 --- a/apps/dbgate/configs.tf +++ b/apps/dbgate/configs.tf @@ -7,8 +7,8 @@ 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: { - join("_",["PASSWORD_pg", pg.namespace, pg.name, pg.dbname]) = data.kubernetes_secret_v1.pgs[index].data[var.pgs[index].secret.key] + 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[var.pg[index].secret.key] }]...) pg_conns = [for pg in var.pg: join("_",["pg", pg.namespace, pg.name, pg.dbname])] @@ -34,7 +34,7 @@ locals { 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]) = join(" | ",["mongo", m.namespace, m.name, m.dbname]) + join("_",["PASSWORD_mongo", m.namespace, m.name]) = data.kubernetes_secret_v1.mongos[index].data[var.mongo[index].secret.key] }]...) 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 c7e0802..7077c34 100644 --- a/apps/dbgate/index.yaml +++ b/apps/dbgate/index.yaml @@ -6,16 +6,140 @@ metadata: name: dbgate description: null options: - sub-domain: - default: dbgate + ingress-class: + default: traefik examples: - - dbgate + - traefik 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 + 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 + app-group: + default: dev + examples: + - dev + type: string + domain-name: + default: your_company.com + examples: + - your_company.com + type: string + maria: + 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 domain: default: your-company examples: - your-company 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 images: default: dbgate: @@ -60,135 +184,11 @@ options: examples: - letsencrypt-prod type: string - app-group: - default: dev + sub-domain: + default: dbgate examples: - - dev + - dbgate 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 - domain-name: - default: your_company.com - examples: - - your_company.com - 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 - 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 - ingress-class: - default: traefik - examples: - - traefik - type: string - maria: - 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 dependencies: - dist: null category: share