From 43a783eb91975ea844328bf1bd5548ea19c152b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Huss?= Date: Fri, 26 Jan 2024 12:59:14 +0100 Subject: [PATCH] fix --- apps/dbgate/index.yaml | 138 ++++++++--------- apps/dbgate/presentation.tf | 2 +- apps/gitea/index.yaml | 212 +++++++++++++------------- apps/gitea/presentation.tf | 2 +- apps/nextcloud/index.yaml | 270 ++++++++++++++++----------------- apps/nextcloud/presentation.tf | 2 +- modules/oauth2/oauth2.tf | 2 +- modules/oauth2/variables.tf | 2 +- share/dataset-pg/directus.tf | 2 +- share/dataset-pg/index.yaml | 170 ++++++++++----------- share/dataset-pg/postgrest.tf | 1 - 11 files changed, 401 insertions(+), 402 deletions(-) diff --git a/apps/dbgate/index.yaml b/apps/dbgate/index.yaml index 156b49e..d9f72d3 100644 --- a/apps/dbgate/index.yaml +++ b/apps/dbgate/index.yaml @@ -6,17 +6,31 @@ metadata: name: dbgate description: null options: - sub-domain: - default: dbgate - examples: - - dbgate - type: string ingress_class: default: traefik examples: - traefik type: string - pg: + issuer: + default: letsencrypt-prod + examples: + - letsencrypt-prod + type: string + redis: + default: [] + examples: + - [] + items: + properties: + name: + default: '' + type: string + namespace: + default: '' + type: string + type: object + type: array + mongo: default: [] examples: - [] @@ -45,6 +59,26 @@ options: type: string type: object type: array + sub-domain: + default: dbgate + examples: + - dbgate + type: string + domain_name: + default: your_company.com + examples: + - your_company.com + type: string + domain: + default: your-company + examples: + - your-company + type: string + app_group: + default: dev + examples: + - dev + type: string maria: default: [] examples: @@ -74,6 +108,35 @@ options: type: string type: object type: array + 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: @@ -113,20 +176,6 @@ options: type: string type: object type: object - redis: - default: [] - examples: - - [] - items: - properties: - name: - default: '' - type: string - namespace: - default: '' - type: string - type: object - type: array storage: default: volume: @@ -164,55 +213,6 @@ options: type: string type: object type: object - issuer: - default: letsencrypt-prod - examples: - - letsencrypt-prod - type: string - domain_name: - default: your_company.com - examples: - - your_company.com - 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 - app_group: - default: dev - examples: - - dev - type: string - domain: - default: your-company - examples: - - your-company - type: string dependencies: - dist: null category: core diff --git a/apps/dbgate/presentation.tf b/apps/dbgate/presentation.tf index 445c324..3f2ca19 100644 --- a/apps/dbgate/presentation.tf +++ b/apps/dbgate/presentation.tf @@ -64,7 +64,7 @@ module "oauth2" { namespace = var.namespace labels = local.common-labels dns_name = local.dns_name - redirect-path = "" + redirect_path = "" providers = { kubernetes = kubernetes kubectl = kubectl diff --git a/apps/gitea/index.yaml b/apps/gitea/index.yaml index a491ba2..ffc1cd1 100644 --- a/apps/gitea/index.yaml +++ b/apps/gitea/index.yaml @@ -9,16 +9,6 @@ metadata: A painless self-hosted Git service. Gitea is a community managed lightweight code hosting solution written in Go. It is published under the MIT license. options: - ingress_class: - default: traefik - examples: - - traefik - type: string - domain_name: - default: your_company.com - examples: - - your_company.com - type: string backups: default: enable: false @@ -125,6 +115,11 @@ options: default: false type: boolean type: object + ssh-sub-domain: + default: git + examples: + - git + type: string push-create: default: org: 'true' @@ -145,11 +140,6 @@ options: default: 'true' type: string type: object - replicas: - default: 1 - examples: - - 1 - type: integer admin: default: email: git-admin@git.your_company.com @@ -165,16 +155,11 @@ options: default: gitea_admin type: string type: object - postgres: - default: - replicas: 1 + app_group: + default: dev examples: - - replicas: 1 - properties: - replicas: - default: 1 - type: integer - type: object + - dev + type: string storage: default: postgres: @@ -236,6 +221,88 @@ options: type: string type: object type: object + replicas: + default: 1 + examples: + - 1 + type: integer + theme: + default: gitea-modern + examples: + - gitea-modern + type: string + webhook: + default: + allowed-hosts: private + skip-tls-verify: false + examples: + - allowed-hosts: private + skip-tls-verify: false + properties: + allowed-hosts: + default: private + type: string + skip-tls-verify: + default: false + type: boolean + type: object + sub-domain: + default: git + examples: + - git + type: string + issuer: + default: letsencrypt-prod + examples: + - letsencrypt-prod + type: string + domain: + default: your-company + examples: + - your-company + type: string + ssh-port: + default: 2222 + examples: + - 2222 + type: integer + postgres: + default: + replicas: 1 + examples: + - replicas: 1 + properties: + replicas: + default: 1 + type: integer + type: object + ingress_class: + default: traefik + examples: + - traefik + type: string + disable-registration: + default: true + examples: + - true + type: boolean + redis: + default: + exporter: + enabled: true + examples: + - exporter: + enabled: true + properties: + exporter: + default: + enabled: true + properties: + enabled: + default: true + type: boolean + type: object + type: object images: default: gitea: @@ -367,93 +434,11 @@ options: type: string type: object type: object - app_group: - default: dev - examples: - - dev - type: string - disable-registration: - default: true - examples: - - true - type: boolean - default-branch: - default: main - examples: - - main - type: string - sub-domain: - default: git - examples: - - git - type: string - domain: - default: your-company - examples: - - your-company - type: string - theme: - default: gitea-modern - examples: - - gitea-modern - type: string - issuer: - default: letsencrypt-prod - examples: - - letsencrypt-prod - type: string - ssh-port: - default: 2222 - examples: - - 2222 - type: integer timezone: default: Europe/Paris examples: - Europe/Paris type: string - webhook: - default: - allowed-hosts: private - skip-tls-verify: false - examples: - - allowed-hosts: private - skip-tls-verify: false - properties: - allowed-hosts: - default: private - type: string - skip-tls-verify: - default: false - type: boolean - type: object - ssh-sub-domain: - default: git - examples: - - git - type: string - redis: - default: - exporter: - enabled: true - examples: - - exporter: - enabled: true - properties: - exporter: - default: - enabled: true - properties: - enabled: - default: true - type: boolean - type: object - type: object - release: - default: 8.3.0 - examples: - - 8.3.0 - type: string load-balancer: default: ip: '' @@ -464,6 +449,21 @@ options: default: '' type: string type: object + release: + default: 8.3.0 + examples: + - 8.3.0 + type: string + default-branch: + default: main + examples: + - main + type: string + domain_name: + default: your_company.com + examples: + - your_company.com + type: string dependencies: - dist: null category: share diff --git a/apps/gitea/presentation.tf b/apps/gitea/presentation.tf index 0c7ee6f..3511839 100644 --- a/apps/gitea/presentation.tf +++ b/apps/gitea/presentation.tf @@ -51,7 +51,7 @@ module "oauth2" { namespace = var.namespace labels = local.common-labels dns_name = local.dns_name - redirect-path = "user/oauth2/vynil/callback" + redirect_path = "user/oauth2/vynil/callback" providers = { kubernetes = kubernetes kubectl = kubectl diff --git a/apps/nextcloud/index.yaml b/apps/nextcloud/index.yaml index dfdf6f7..455aea7 100644 --- a/apps/nextcloud/index.yaml +++ b/apps/nextcloud/index.yaml @@ -6,10 +6,10 @@ metadata: name: nextcloud description: null options: - sub-domain: - default: files + app_group: + default: '' examples: - - files + - '' type: string images: default: @@ -266,6 +266,58 @@ options: type: string type: object type: object + domain_name: + default: your_company.com + examples: + - your_company.com + type: string + issuer: + default: letsencrypt-prod + examples: + - letsencrypt-prod + type: string + redis: + default: + exporter: + enabled: true + examples: + - exporter: + enabled: true + properties: + exporter: + default: + enabled: true + properties: + enabled: + default: true + type: boolean + type: object + type: object + ingress_class: + default: traefik + examples: + - traefik + type: string + postgres: + default: + replicas: 1 + examples: + - replicas: 1 + properties: + replicas: + default: 1 + type: integer + type: object + sub-domain: + default: files + examples: + - files + type: string + domain: + default: your-company + examples: + - your-company + type: string apps: default: audioplayer: false @@ -356,134 +408,6 @@ options: default: true type: boolean type: object - ingress_class: - default: traefik - examples: - - traefik - type: string - domain_name: - default: your_company.com - examples: - - your_company.com - type: string - domain: - default: your-company - examples: - - your-company - type: string - redis: - default: - exporter: - enabled: true - examples: - - exporter: - enabled: true - properties: - exporter: - default: - enabled: true - properties: - enabled: - default: true - type: boolean - type: object - type: object - openid-name: - default: vynil - examples: - - vynil - type: string - storage: - default: - postgres: - size: 5Gi - redis: - size: 2Gi - volume: - accessMode: ReadWriteOnce - size: 10Gi - type: Filesystem - description: Configure this app storage - examples: - - postgres: - size: 5Gi - redis: - size: 2Gi - volume: - accessMode: ReadWriteOnce - size: 10Gi - type: Filesystem - properties: - postgres: - default: - size: 5Gi - properties: - size: - default: 5Gi - type: string - type: object - redis: - default: - size: 2Gi - properties: - size: - default: 2Gi - type: string - type: object - volume: - default: - accessMode: ReadWriteOnce - size: 10Gi - type: Filesystem - properties: - accessMode: - default: ReadWriteOnce - enum: - - ReadWriteOnce - - ReadOnlyMany - - ReadWriteMany - type: string - size: - default: 10Gi - type: string - type: - default: Filesystem - enum: - - Filesystem - - Block - type: string - type: object - type: object - hpa: - default: - avg-cpu: 50 - max-replicas: 5 - min-replicas: 1 - examples: - - avg-cpu: 50 - max-replicas: 5 - min-replicas: 1 - properties: - avg-cpu: - default: 50 - type: integer - max-replicas: - default: 5 - type: integer - min-replicas: - default: 1 - type: integer - type: object - issuer: - default: letsencrypt-prod - examples: - - letsencrypt-prod - type: string - app_group: - default: '' - examples: - - '' - type: string backups: default: enable: false @@ -590,13 +514,23 @@ options: default: false type: boolean type: object - postgres: + hpa: default: - replicas: 1 + avg-cpu: 50 + max-replicas: 5 + min-replicas: 1 examples: - - replicas: 1 + - avg-cpu: 50 + max-replicas: 5 + min-replicas: 1 properties: - replicas: + avg-cpu: + default: 50 + type: integer + max-replicas: + default: 5 + type: integer + min-replicas: default: 1 type: integer type: object @@ -610,6 +544,72 @@ options: default: nextcloud_admin type: string type: object + storage: + default: + postgres: + size: 5Gi + redis: + size: 2Gi + volume: + accessMode: ReadWriteOnce + size: 10Gi + type: Filesystem + description: Configure this app storage + examples: + - postgres: + size: 5Gi + redis: + size: 2Gi + volume: + accessMode: ReadWriteOnce + size: 10Gi + type: Filesystem + properties: + postgres: + default: + size: 5Gi + properties: + size: + default: 5Gi + type: string + type: object + redis: + default: + size: 2Gi + properties: + size: + default: 2Gi + type: string + type: object + volume: + default: + accessMode: ReadWriteOnce + size: 10Gi + type: Filesystem + properties: + accessMode: + default: ReadWriteOnce + enum: + - ReadWriteOnce + - ReadOnlyMany + - ReadWriteMany + type: string + size: + default: 10Gi + type: string + type: + default: Filesystem + enum: + - Filesystem + - Block + type: string + type: object + type: object + openid-name: + default: vynil + examples: + - vynil + type: string dependencies: - dist: null category: share diff --git a/apps/nextcloud/presentation.tf b/apps/nextcloud/presentation.tf index 778c112..2cbaf42 100644 --- a/apps/nextcloud/presentation.tf +++ b/apps/nextcloud/presentation.tf @@ -61,7 +61,7 @@ module "oauth2" { namespace = var.namespace labels = local.common-labels dns_name = local.dns_name - redirect-path = "apps/user_oidc/code" + redirect_path = "apps/user_oidc/code" providers = { kubernetes = kubernetes kubectl = kubectl diff --git a/modules/oauth2/oauth2.tf b/modules/oauth2/oauth2.tf index dea2789..fea3ebf 100644 --- a/modules/oauth2/oauth2.tf +++ b/modules/oauth2/oauth2.tf @@ -50,7 +50,7 @@ resource "authentik_provider_oauth2" "oauth2" { signing_key = data.authentik_certificate_key_pair.ca.id property_mappings = data.authentik_scope_mapping.oauth2.ids redirect_uris = [ - "https://${var.dns_name}/${var.redirect-path}" + "https://${var.dns_name}/${var.redirect_path}" ] } diff --git a/modules/oauth2/variables.tf b/modules/oauth2/variables.tf index b06404a..455bdf2 100644 --- a/modules/oauth2/variables.tf +++ b/modules/oauth2/variables.tf @@ -13,7 +13,7 @@ variable "labels" { variable "dns_name" { type = string } -variable "redirect-path" { +variable "redirect_path" { type = string default = "" } diff --git a/share/dataset-pg/directus.tf b/share/dataset-pg/directus.tf index ffeace4..b19321d 100644 --- a/share/dataset-pg/directus.tf +++ b/share/dataset-pg/directus.tf @@ -249,7 +249,7 @@ module "directus-oauth2" { namespace = var.namespace labels = local.directus-labels dns_name = local.directus-dns_name - redirect-path = "auth/login/VYNIL/callback" + redirect_path = "auth/login/VYNIL/callback" providers = { kubernetes = kubernetes kubectl = kubectl diff --git a/share/dataset-pg/index.yaml b/share/dataset-pg/index.yaml index 26f2b62..3edd187 100644 --- a/share/dataset-pg/index.yaml +++ b/share/dataset-pg/index.yaml @@ -6,6 +6,91 @@ metadata: name: dataset-pg description: null options: + domain_name: + default: your_company.com + examples: + - your_company.com + type: string + images: + default: + postgresql: + registry: ghcr.io + repository: cloudnative-pg/postgresql + tag: 15.3 + examples: + - postgresql: + registry: ghcr.io + repository: cloudnative-pg/postgresql + tag: 15.3 + properties: + postgresql: + default: + registry: ghcr.io + repository: cloudnative-pg/postgresql + tag: 15.3 + properties: + registry: + default: ghcr.io + type: string + repository: + default: cloudnative-pg/postgresql + type: string + tag: + default: 15.3 + type: number + type: object + type: object + postgres: + default: + replicas: 1 + examples: + - replicas: 1 + properties: + replicas: + default: 1 + type: integer + type: object + app_group: + default: api + examples: + - api + type: string + roles: + default: [] + items: + properties: + name: + default: alt-account + type: string + type: object + type: array + storage: + default: + postgres: + size: 10Gi + examples: + - postgres: + size: 10Gi + properties: + postgres: + default: + size: 10Gi + properties: + size: + default: 10Gi + type: string + type: object + type: object + sub-domain: + default: dataset-pg + examples: + - dataset-pg + type: string + ingress_class: + default: traefik + examples: + - traefik + type: string extentions: default: directus: @@ -192,41 +277,11 @@ options: examples: - letsencrypt-prod type: string - domain_name: - default: your_company.com - examples: - - your_company.com - type: string - app_group: - default: api - examples: - - api - type: string - sub-domain: - default: dataset-pg - examples: - - dataset-pg - type: string - postgres: - default: - replicas: 1 - examples: - - replicas: 1 - properties: - replicas: - default: 1 - type: integer - type: object domain: default: your-company examples: - your-company type: string - ingress_class: - default: traefik - examples: - - traefik - type: string backups: default: enable: false @@ -290,61 +345,6 @@ options: type: string type: object type: array - storage: - default: - postgres: - size: 10Gi - examples: - - postgres: - size: 10Gi - properties: - postgres: - default: - size: 10Gi - properties: - size: - default: 10Gi - type: string - type: object - type: object - roles: - default: [] - items: - properties: - name: - default: alt-account - type: string - type: object - type: array - images: - default: - postgresql: - registry: ghcr.io - repository: cloudnative-pg/postgresql - tag: 15.3 - examples: - - postgresql: - registry: ghcr.io - repository: cloudnative-pg/postgresql - tag: 15.3 - properties: - postgresql: - default: - registry: ghcr.io - repository: cloudnative-pg/postgresql - tag: 15.3 - properties: - registry: - default: ghcr.io - type: string - repository: - default: cloudnative-pg/postgresql - type: string - tag: - default: 15.3 - type: number - type: object - type: object dependencies: - dist: null category: dbo diff --git a/share/dataset-pg/postgrest.tf b/share/dataset-pg/postgrest.tf index a88dff2..d73cbaf 100644 --- a/share/dataset-pg/postgrest.tf +++ b/share/dataset-pg/postgrest.tf @@ -159,7 +159,6 @@ module "postgrest-ingress" { middlewares = [] sub_paths = ["ui",""] services = [local.swagger-service, local.prest-service] - services = [] providers = { kubectl = kubectl }