diff --git a/apps/dbgate/configs.tf b/apps/dbgate/configs.tf index 4516fbc..232856e 100644 --- a/apps/dbgate/configs.tf +++ b/apps/dbgate/configs.tf @@ -12,7 +12,7 @@ locals { }]...) pg_conns = [for pg in var.pg: join("_",["pg", pg.namespace, pg.name, pg.dbname])] - maria_vars = merge([for index, m in var.maria: { + maria_vars = merge([for 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 index, m in var.mongo: { + 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"]) @@ -33,7 +33,7 @@ locals { join("_",["DATABASE_mongo", m.namespace, m.name]) = m.dbname join("_",["USER_mongo", m.namespace, m.name]) = m.username }]...) - mongo_secrets = merge([for m in var.mongo: { + 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] }]...) mongo_conns = [for m in var.mongo: join("_",["mongo", m.namespace, m.name])] diff --git a/apps/dbgate/index.yaml b/apps/dbgate/index.yaml index 37d0855..eb14f50 100644 --- a/apps/dbgate/index.yaml +++ b/apps/dbgate/index.yaml @@ -6,6 +6,103 @@ 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 + domain: + default: your-company + examples: + - your-company + 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-name: + default: your_company.com + 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: @@ -45,15 +142,20 @@ options: type: string type: object type: object - domain: - default: your-company + ingress-class: + default: traefik examples: - - your-company + - traefik type: string - domain-name: - default: your_company.com + sub-domain: + default: dbgate examples: - - your_company.com + - dbgate + type: string + issuer: + default: letsencrypt-prod + examples: + - letsencrypt-prod type: string app-group: default: dev @@ -87,113 +189,11 @@ options: - 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 - 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: - - [] - 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