fix
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
locals {
|
||||
pg_vars = merge([for pg in var.pg: {
|
||||
join("_",["LABEL_pg", pg.namespace, pg.name, pg.dbname]) = join(" | ",["pg", pg.namespace, pg.name, pg.dbname])
|
||||
join("_",["LABEL_pg", pg.namespace, pg.name, pg.dbname]) = join(" | ",[pg.namespace, pg.name, pg.dbname])
|
||||
join("_",["ENGINE_pg", pg.namespace, pg.name, pg.dbname]) = "postgres@dbgate-plugin-postgres"
|
||||
join("_",["SERVER_pg", pg.namespace, pg.name, pg.dbname]) = join(".",["${pg.name}-rw", pg.namespace, "svc"])
|
||||
join("_",["PORT_pg", pg.namespace, pg.name, pg.dbname]) = "5432"
|
||||
@@ -13,7 +13,7 @@ locals {
|
||||
pg_conns = [for pg in var.pg: join("_",["pg", pg.namespace, pg.name, pg.dbname])]
|
||||
|
||||
maria_vars = merge([for m in var.maria: {
|
||||
join("_",["LABEL_maria", m.namespace, m.name]) = join(" | ",["maria", m.namespace, m.name])
|
||||
join("_",["LABEL_maria", m.namespace, m.name]) = join(" | ",[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"])
|
||||
join("_",["PORT_maria", m.namespace, m.name]) = "3306"
|
||||
@@ -25,6 +25,14 @@ locals {
|
||||
}]...)
|
||||
maria_conns = [for m in var.maria: join("_",["maria", m.namespace, m.name])]
|
||||
|
||||
redis_vars = merge([for m in var.redis: {
|
||||
join("_",["LABEL_redis", m.namespace, m.name]) = join(" | ",[m.namespace, m.name])
|
||||
join("_",["ENGINE_redis", m.namespace, m.name]) = "redis@dbgate-plugin-redis"
|
||||
join("_",["SERVER_redis", m.namespace, m.name]) = join(".",[m.name, m.namespace, "svc"])
|
||||
join("_",["PORT_redis", m.namespace, m.name]) = "6379"
|
||||
}]...)
|
||||
redis_conns = [for m in var.maria: join("_",["redis", m.namespace, m.name])]
|
||||
|
||||
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"
|
||||
@@ -41,9 +49,9 @@ locals {
|
||||
"OAUTH_LOGIN_FIELD" = "nickname"
|
||||
"OAUTH_SCOPE" = "email"
|
||||
}
|
||||
connections = join(",",concat(local.pg_conns, local.maria_conns, local.mongo_conns))
|
||||
connection_vars = merge(local.pg_vars, local.maria_vars, local.mongo_vars)
|
||||
connection_secrets = merge(local.pg_secrets,local.mongo_secrets)
|
||||
connections = join(",", concat(local.pg_conns, local.maria_conns, local.mongo_conns, local.redis_conns))
|
||||
connection_vars = merge(local.pg_vars, local.maria_vars, local.mongo_vars, local.redis_conns)
|
||||
connection_secrets = merge(local.pg_secrets, local.mongo_secrets)
|
||||
}
|
||||
|
||||
resource "kubectl_manifest" "dbgate-config" {
|
||||
|
||||
@@ -6,6 +6,16 @@ metadata:
|
||||
name: dbgate
|
||||
description: null
|
||||
options:
|
||||
use-oauth:
|
||||
default: false
|
||||
examples:
|
||||
- false
|
||||
type: boolean
|
||||
domain:
|
||||
default: your-company
|
||||
examples:
|
||||
- your-company
|
||||
type: string
|
||||
maria:
|
||||
default: []
|
||||
examples:
|
||||
@@ -35,16 +45,40 @@ options:
|
||||
type: string
|
||||
type: object
|
||||
type: array
|
||||
app-group:
|
||||
default: dev
|
||||
ingress-class:
|
||||
default: traefik
|
||||
examples:
|
||||
- dev
|
||||
- traefik
|
||||
type: string
|
||||
issuer:
|
||||
default: letsencrypt-prod
|
||||
mongo:
|
||||
default: []
|
||||
examples:
|
||||
- letsencrypt-prod
|
||||
type: string
|
||||
- []
|
||||
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:
|
||||
@@ -84,47 +118,39 @@ options:
|
||||
type: string
|
||||
type: object
|
||||
type: object
|
||||
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
|
||||
domain-name:
|
||||
default: your_company.com
|
||||
examples:
|
||||
- your_company.com
|
||||
type: string
|
||||
sub-domain:
|
||||
default: dbgate
|
||||
examples:
|
||||
- dbgate
|
||||
type: string
|
||||
domain:
|
||||
default: your-company
|
||||
issuer:
|
||||
default: letsencrypt-prod
|
||||
examples:
|
||||
- your-company
|
||||
- letsencrypt-prod
|
||||
type: string
|
||||
redis:
|
||||
default: []
|
||||
examples:
|
||||
- []
|
||||
items:
|
||||
properties:
|
||||
name:
|
||||
default: ''
|
||||
type: string
|
||||
namespace:
|
||||
default: ''
|
||||
type: string
|
||||
type: object
|
||||
type: array
|
||||
domain-name:
|
||||
default: your_company.com
|
||||
examples:
|
||||
- your_company.com
|
||||
type: string
|
||||
app-group:
|
||||
default: dev
|
||||
examples:
|
||||
- dev
|
||||
type: string
|
||||
pg:
|
||||
default: []
|
||||
@@ -155,45 +181,33 @@ options:
|
||||
type: string
|
||||
type: object
|
||||
type: array
|
||||
mongo:
|
||||
default: []
|
||||
storage:
|
||||
default:
|
||||
accessMode: ReadWriteOnce
|
||||
size: 1Gi
|
||||
type: Filesystem
|
||||
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
|
||||
use-oauth:
|
||||
default: false
|
||||
examples:
|
||||
- false
|
||||
type: boolean
|
||||
- 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
|
||||
dependencies:
|
||||
- dist: null
|
||||
category: share
|
||||
|
||||
Reference in New Issue
Block a user