diff --git a/apps/dbgate/application.tf b/apps/dbgate/application.tf index a136f01..f20598c 100644 --- a/apps/dbgate/application.tf +++ b/apps/dbgate/application.tf @@ -1,6 +1,10 @@ locals { - dns-name = "${var.sub-domain}.${var.domain-name}" - dns-names = [local.dns-name] + dns-name = "${var.sub-domain}.${var.domain-name}" + dns-names = [local.dns-name] + request_headers = { + "Content-Type" = "application/json" + Authorization = "Bearer ${data.kubernetes_secret_v1.authentik.data["AUTHENTIK_BOOTSTRAP_TOKEN"]}" + } } @@ -75,7 +79,6 @@ module "forward" { ingress-class = var.ingress-class labels = local.common-labels dns-names = local.dns-names - authentik-token = data.kubernetes_secret_v1.authentik.data["AUTHENTIK_BOOTSTRAP_TOKEN"] providers = { restapi = restapi http = http diff --git a/apps/dbgate/index.yaml b/apps/dbgate/index.yaml index be461b7..c9acd95 100644 --- a/apps/dbgate/index.yaml +++ b/apps/dbgate/index.yaml @@ -6,22 +6,17 @@ metadata: name: dbgate description: null options: - sub-domain: - default: dbgate - examples: - - dbgate - type: string domain-name: default: your_company.com examples: - your_company.com type: string - domain: - default: your-company + app-group: + default: dev examples: - - your-company + - dev type: string - maria: + mongo: default: [] examples: - [] @@ -50,33 +45,11 @@ 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 images: default: dbgate: @@ -116,45 +89,48 @@ options: type: string type: object type: object - ingress-class: - default: traefik + domain: + default: your-company examples: - - traefik + - your-company type: string - 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 - 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 + sub-domain: + default: dbgate examples: - - letsencrypt-prod + - dbgate type: string + use-oauth: + default: false + examples: + - false + type: boolean pg: default: [] examples: @@ -184,16 +160,40 @@ options: type: string type: object type: array - app-group: - default: dev + maria: + default: [] examples: - - dev + - [] + 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 dependencies: - dist: null category: share diff --git a/modules/forward/forward.tf b/modules/forward/forward.tf index 084e68b..3c8423b 100644 --- a/modules/forward/forward.tf +++ b/modules/forward/forward.tf @@ -1,8 +1,4 @@ locals { - request_headers = { - "Content-Type" = "application/json" - Authorization = "Bearer ${var.authentik-token}" - } forward-outpost-providers = jsondecode(data.http.get_forward_outpost.response_body).results[0].providers forward-outpost-pk = jsondecode(data.http.get_forward_outpost.response_body).results[0].pk app-name = var.component == var.instance ? var.instance : format("%s-%s", var.component, var.instance) diff --git a/modules/forward/variables.tf b/modules/forward/variables.tf index 640e766..aeb1756 100644 --- a/modules/forward/variables.tf +++ b/modules/forward/variables.tf @@ -19,9 +19,6 @@ variable "labels" { type = map(string) } -variable "authentik-token" { - type = string -} variable "dns-names" { type = list(string) }