diff --git a/apps/dbgate/configs.tf b/apps/dbgate/configs.tf index c322faf..209f907 100644 --- a/apps/dbgate/configs.tf +++ b/apps/dbgate/configs.tf @@ -8,7 +8,7 @@ locals { join("_",["USER_pg", pg.namespace, pg.name, pg.dbname]) = pg.username }]...) 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[lookup(pg.secret,"key", "password")] + join("_",["PASSWORD_pg", pg.namespace, pg.name, pg.dbname]) = lookup(coalesce(data.kubernetes_secret_v1.pgs[index].data,{}),lookup(pg.secret,"key", "password"), "not-found") }]...) pg_conns = [for pg in var.pg: join("_",["pg", pg.namespace, pg.name, pg.dbname])] diff --git a/apps/dbgate/index.yaml b/apps/dbgate/index.yaml index c9e4881..724c02d 100644 --- a/apps/dbgate/index.yaml +++ b/apps/dbgate/index.yaml @@ -11,7 +11,7 @@ options: examples: - your_company.com type: string - maria: + pg: default: [] examples: - [] @@ -40,30 +40,6 @@ options: type: string type: object type: array - domain: - default: your-company - examples: - - your-company - type: string - ingress-class: - default: traefik - examples: - - traefik - type: string - redis: - default: [] - examples: - - [] - items: - properties: - name: - default: '' - type: string - namespace: - default: '' - type: string - type: object - type: array mongo: default: [] examples: @@ -132,22 +108,63 @@ options: type: string type: object type: object + domain: + default: your-company + examples: + - your-company + type: string + ingress-class: + default: traefik + examples: + - traefik + type: string app-group: default: dev examples: - dev type: string - sub-domain: - default: dbgate + storage: + default: + accessMode: ReadWriteOnce + size: 1Gi + type: Filesystem examples: - - dbgate - type: string - issuer: - default: letsencrypt-prod + - 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 + redis: + default: [] examples: - - letsencrypt-prod - type: string - pg: + - [] + items: + properties: + name: + default: '' + type: string + namespace: + default: '' + type: string + type: object + type: array + maria: default: [] examples: - [] @@ -176,33 +193,16 @@ options: type: string type: object type: array - storage: - default: - accessMode: ReadWriteOnce - size: 1Gi - type: Filesystem + issuer: + default: letsencrypt-prod 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 + - letsencrypt-prod + type: string + sub-domain: + default: dbgate + examples: + - dbgate + type: string dependencies: - dist: null category: share