From ba8b841c3b483ed0646887ba31a1bffd0e578443 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Huss?= Date: Wed, 18 Oct 2023 18:45:45 +0200 Subject: [PATCH] fix --- apps/dbgate/index.yaml | 66 ++++++++++++++++++------------------- apps/dbgate/presentation.tf | 3 +- 2 files changed, 35 insertions(+), 34 deletions(-) diff --git a/apps/dbgate/index.yaml b/apps/dbgate/index.yaml index 5d7f020..beb7274 100644 --- a/apps/dbgate/index.yaml +++ b/apps/dbgate/index.yaml @@ -6,17 +6,7 @@ metadata: name: dbgate description: null options: - ingress-class: - default: traefik - examples: - - traefik - type: string - domain-name: - default: your_company.com - examples: - - your_company.com - type: string - maria: + mongo: default: [] examples: - [] @@ -45,26 +35,6 @@ options: type: string type: object type: array - domain: - default: your-company - examples: - - your-company - type: string - issuer: - default: letsencrypt-prod - examples: - - letsencrypt-prod - type: string - use-oauth: - default: false - examples: - - false - type: boolean - app-group: - default: dev - examples: - - dev - type: string images: default: dbgate: @@ -104,7 +74,7 @@ options: type: string type: object type: object - mongo: + pg: default: [] examples: - [] @@ -138,7 +108,17 @@ options: examples: - dbgate type: string - pg: + domain-name: + default: your_company.com + examples: + - your_company.com + type: string + issuer: + default: letsencrypt-prod + examples: + - letsencrypt-prod + type: string + maria: default: [] examples: - [] @@ -167,6 +147,21 @@ options: type: string type: object type: array + ingress-class: + default: traefik + examples: + - traefik + type: string + app-group: + default: dev + examples: + - dev + type: string + use-oauth: + default: false + examples: + - false + type: boolean storage: default: accessMode: ReadWriteOnce @@ -194,6 +189,11 @@ options: - Block type: string type: object + domain: + default: your-company + examples: + - your-company + type: string dependencies: - dist: null category: share diff --git a/apps/dbgate/presentation.tf b/apps/dbgate/presentation.tf index 1420bd8..d6dd716 100644 --- a/apps/dbgate/presentation.tf +++ b/apps/dbgate/presentation.tf @@ -1,6 +1,7 @@ locals { dns-name = "${var.sub-domain}.${var.domain-name}" dns-names = [local.dns-name] + app-name = var.component == var.instance ? var.instance : format("%s-%s", var.component, var.instance) icon = "logo192.png" request_headers = { "Content-Type" = "application/json" @@ -36,7 +37,7 @@ module "ingress" { ingress-class = var.ingress-class labels = local.common-labels dns-names = local.dns-names - middlewares = ["${var.instance}-https"] + middlewares = concat(["${var.instance}-https"], var.use-oauth?[]:["forward-${local.app-name}"]) service = local.service providers = { kubectl = kubectl