diff --git a/apps/code-server/index.yaml b/apps/code-server/index.yaml index 9b1a699..170448e 100644 --- a/apps/code-server/index.yaml +++ b/apps/code-server/index.yaml @@ -6,10 +6,30 @@ metadata: name: code-server description: null options: - app_group: - default: dev + admin: + default: + cluster: false + namespace: false examples: - - dev + - cluster: false + namespace: false + properties: + cluster: + default: false + type: boolean + namespace: + default: false + type: boolean + type: object + domain_name: + default: your-company.com + examples: + - your-company.com + type: string + ingress_class: + default: traefik + examples: + - traefik type: string storage: default: @@ -48,41 +68,6 @@ options: type: string type: object type: object - admin: - default: - cluster: false - namespace: false - examples: - - cluster: false - namespace: false - properties: - cluster: - default: false - type: boolean - namespace: - default: false - type: boolean - type: object - domain_name: - default: your-company.com - examples: - - your-company.com - type: string - issuer: - default: letsencrypt-prod - examples: - - letsencrypt-prod - type: string - timezone: - default: Europe/Paris - examples: - - Europe/Paris - type: string - sub-domain: - default: code - examples: - - code - type: string images: default: codeserver: @@ -122,21 +107,36 @@ options: type: number type: object type: object - ingress_class: - default: traefik + app_group: + default: dev examples: - - traefik + - dev type: string - domain: - default: your-company + sub-domain: + default: code examples: - - your-company + - code + type: string + timezone: + default: Europe/Paris + examples: + - Europe/Paris type: string no-editor: default: false examples: - false type: boolean + domain: + default: your-company + examples: + - your-company + type: string + issuer: + default: letsencrypt-prod + examples: + - letsencrypt-prod + type: string dependencies: - dist: null category: share diff --git a/apps/code-server/presentation.tf b/apps/code-server/presentation.tf index c59f412..84c24da 100644 --- a/apps/code-server/presentation.tf +++ b/apps/code-server/presentation.tf @@ -76,7 +76,7 @@ module "forward" { ingress_class = var.ingress_class labels = local.common-labels dns_names = local.dns_names - services = [local.service] + service = local.service icon = local.icon request_headers = local.request_headers providers = { diff --git a/apps/gramo/index.yaml b/apps/gramo/index.yaml index 94baaa5..ded86f2 100644 --- a/apps/gramo/index.yaml +++ b/apps/gramo/index.yaml @@ -6,6 +6,41 @@ metadata: name: gramo description: null options: + sub-domain: + default: gramo + examples: + - gramo + type: string + ingress_class: + default: traefik + examples: + - traefik + type: string + managed: + default: false + examples: + - false + type: boolean + namespaces: + default: [] + items: + type: string + type: array + domain: + default: your-company + examples: + - your-company + type: string + issuer: + default: letsencrypt-prod + examples: + - letsencrypt-prod + type: string + cluster-admin: + default: false + examples: + - false + type: boolean images: default: gramo: @@ -45,51 +80,16 @@ options: type: string type: object type: object - app_group: - default: infra - examples: - - infra - type: string - issuer: - default: letsencrypt-prod - examples: - - letsencrypt-prod - type: string - domain: - default: your-company - examples: - - your-company - type: string - namespaces: - default: [] - items: - type: string - type: array - sub-domain: - default: gramo - examples: - - gramo - type: string domain_name: default: your_company.com examples: - your_company.com type: string - managed: - default: false + app_group: + default: infra examples: - - false - type: boolean - ingress_class: - default: traefik - examples: - - traefik + - infra type: string - cluster-admin: - default: false - examples: - - false - type: boolean dependencies: - dist: null category: share diff --git a/apps/gramo/presentation.tf b/apps/gramo/presentation.tf index 2a1477d..eb865b2 100644 --- a/apps/gramo/presentation.tf +++ b/apps/gramo/presentation.tf @@ -76,7 +76,7 @@ module "forward" { ingress_class = var.ingress_class labels = local.common-labels dns_names = local.dns_names - services = [local.service] + service = local.service icon = local.icon request_headers = local.request_headers providers = { diff --git a/apps/okd/index.yaml b/apps/okd/index.yaml index 7c209cf..01a0331 100644 --- a/apps/okd/index.yaml +++ b/apps/okd/index.yaml @@ -6,6 +6,21 @@ metadata: name: okd description: null options: + app_group: + default: infra + examples: + - infra + type: string + domain_name: + default: your_company.com + examples: + - your_company.com + type: string + issuer: + default: letsencrypt-prod + examples: + - letsencrypt-prod + type: string managed: default: false examples: @@ -16,6 +31,21 @@ options: items: type: string type: array + sub-domain: + default: okd + examples: + - okd + type: string + ingress_class: + default: traefik + examples: + - traefik + type: string + domain: + default: your-company + examples: + - your-company + type: string cluster-admin: default: false examples: @@ -60,36 +90,6 @@ options: type: string type: object type: object - domain: - default: your-company - examples: - - your-company - type: string - ingress_class: - default: traefik - examples: - - traefik - type: string - issuer: - default: letsencrypt-prod - examples: - - letsencrypt-prod - type: string - app_group: - default: infra - examples: - - infra - type: string - sub-domain: - default: okd - examples: - - okd - type: string - domain_name: - default: your_company.com - examples: - - your_company.com - type: string dependencies: - dist: null category: share diff --git a/apps/okd/presentation.tf b/apps/okd/presentation.tf index a14da20..5c35eff 100644 --- a/apps/okd/presentation.tf +++ b/apps/okd/presentation.tf @@ -76,7 +76,7 @@ module "forward" { ingress_class = var.ingress_class labels = local.common-labels dns_names = local.dns_names - services = [local.service] + service = local.service icon = local.icon request_headers = local.request_headers providers = { diff --git a/apps/traefik-ui/index.yaml b/apps/traefik-ui/index.yaml index 49edc81..f78cb8b 100644 --- a/apps/traefik-ui/index.yaml +++ b/apps/traefik-ui/index.yaml @@ -11,6 +11,11 @@ options: examples: - traefik type: string + app_group: + default: infra + examples: + - infra + type: string sub-domain: default: traefik examples: @@ -26,11 +31,6 @@ options: examples: - your-company type: string - app_group: - default: infra - examples: - - infra - type: string issuer: default: letsencrypt-prod examples: diff --git a/apps/traefik-ui/presentation.tf b/apps/traefik-ui/presentation.tf index f502f0a..00248cf 100644 --- a/apps/traefik-ui/presentation.tf +++ b/apps/traefik-ui/presentation.tf @@ -63,7 +63,7 @@ module "forward" { ingress_class = var.ingress_class labels = local.common-labels dns_names = local.dns_names - services = [local.service] + service = local.service icon = local.icon request_headers = local.request_headers providers = { diff --git a/modules/ingress/ingress.tf b/modules/ingress/ingress.tf index 76d5ae4..b35288e 100644 --- a/modules/ingress/ingress.tf +++ b/modules/ingress/ingress.tf @@ -15,7 +15,7 @@ locals { } resource "kubectl_manifest" "prj_certificate" { - count = var.create-cert?1:0 + count = var.create_cert?1:0 yaml_body = <<-EOF apiVersion: "cert-manager.io/v1" kind: "Certificate" diff --git a/modules/ingress/variables.tf b/modules/ingress/variables.tf index ee55242..bdde935 100644 --- a/modules/ingress/variables.tf +++ b/modules/ingress/variables.tf @@ -31,7 +31,7 @@ variable "create-redirect" { type = bool default = false } -variable "create-cert" { +variable "create_cert" { type = bool default = true } diff --git a/monitor/alertmanager/index.yaml b/monitor/alertmanager/index.yaml index 84857e1..8126f85 100644 --- a/monitor/alertmanager/index.yaml +++ b/monitor/alertmanager/index.yaml @@ -6,35 +6,45 @@ metadata: name: alertmanager description: null options: - app_group: - default: monitor + issuer: + default: letsencrypt-prod examples: - - monitor + - letsencrypt-prod + type: string + ingress_class: + default: traefik + examples: + - traefik + type: string + domain_name: + default: your_company.com + examples: + - your_company.com type: string listenLocal: default: false examples: - false type: boolean - retention: - default: 120h - examples: - - 120h - type: string replicas: default: 1 examples: - 1 type: integer - ingress_class: - default: traefik + sub-domain: + default: alertmanager examples: - - traefik + - alertmanager type: string - domain: - default: your-company + logLevel: + default: info examples: - - your-company + - info + type: string + retention: + default: 120h + examples: + - 120h type: string images: default: @@ -75,25 +85,15 @@ options: type: string type: object type: object - logLevel: - default: info + domain: + default: your-company examples: - - info + - your-company type: string - issuer: - default: letsencrypt-prod + app_group: + default: monitor examples: - - letsencrypt-prod - type: string - sub-domain: - default: alertmanager - examples: - - alertmanager - type: string - domain_name: - default: your_company.com - examples: - - your_company.com + - monitor type: string dependencies: - dist: null diff --git a/monitor/alertmanager/presentation.tf b/monitor/alertmanager/presentation.tf index 9d169cb..77c4f7d 100644 --- a/monitor/alertmanager/presentation.tf +++ b/monitor/alertmanager/presentation.tf @@ -63,7 +63,7 @@ module "forward" { ingress_class = var.ingress_class labels = local.common-labels dns_names = local.dns_names - services = [local.service] + service = local.service icon = local.icon request_headers = local.request_headers providers = { diff --git a/monitor/prometheus/index.yaml b/monitor/prometheus/index.yaml index 34c695f..a666155 100644 --- a/monitor/prometheus/index.yaml +++ b/monitor/prometheus/index.yaml @@ -6,26 +6,6 @@ metadata: name: prometheus description: null options: - alertmanager: - default: alertmanager-alertmanager - examples: - - alertmanager-alertmanager - type: string - domain: - default: your-company - examples: - - your-company - type: string - issuer: - default: letsencrypt-prod - examples: - - letsencrypt-prod - type: string - replicas: - default: 1 - examples: - - 1 - type: integer ingress_class: default: traefik examples: @@ -36,21 +16,56 @@ options: examples: - your_company.com type: string - app_group: - default: monitor - examples: - - monitor - type: string shards: default: 1 examples: - 1 type: integer + issuer: + default: letsencrypt-prod + examples: + - letsencrypt-prod + type: string + app_group: + default: monitor + examples: + - monitor + type: string sub-domain: default: prometheus examples: - prometheus type: string + domain: + default: your-company + examples: + - your-company + type: string + replicas: + default: 1 + examples: + - 1 + type: integer + logLevel: + default: info + examples: + - info + type: string + listenLocal: + default: false + examples: + - false + type: boolean + enableAdminAPI: + default: false + examples: + - false + type: boolean + alertmanager: + default: alertmanager-alertmanager + examples: + - alertmanager-alertmanager + type: string images: default: prometheus: @@ -90,26 +105,11 @@ options: type: string type: object type: object - logLevel: - default: info - examples: - - info - type: string - enableAdminAPI: - default: false - examples: - - false - type: boolean retention: default: 10d examples: - 10d type: string - listenLocal: - default: false - examples: - - false - type: boolean dependencies: - dist: null category: share diff --git a/monitor/prometheus/presentation.tf b/monitor/prometheus/presentation.tf index 25633e7..60c0e6c 100644 --- a/monitor/prometheus/presentation.tf +++ b/monitor/prometheus/presentation.tf @@ -63,7 +63,7 @@ module "forward" { ingress_class = var.ingress_class labels = local.common-labels dns_names = local.dns_names - services = [local.service] + service = local.service icon = local.icon request_headers = local.request_headers providers = { diff --git a/share/dataset-pg/index.yaml b/share/dataset-pg/index.yaml index b2cf1ca..8fc1a73 100644 --- a/share/dataset-pg/index.yaml +++ b/share/dataset-pg/index.yaml @@ -6,6 +6,35 @@ metadata: name: dataset-pg description: null options: + databases: + default: [] + items: + properties: + name: + default: db + type: string + type: object + type: array + postgres: + default: + replicas: 1 + examples: + - replicas: 1 + properties: + replicas: + default: 1 + type: integer + type: object + ingress_class: + default: traefik + examples: + - traefik + type: string + app_group: + default: api + examples: + - api + type: string images: default: postgresql: @@ -35,12 +64,17 @@ options: type: number type: object type: object - databases: + issuer: + default: letsencrypt-prod + examples: + - letsencrypt-prod + type: string + roles: default: [] items: properties: name: - default: db + default: alt-account type: string type: object type: array @@ -49,6 +83,11 @@ options: examples: - your-company type: string + sub-domain: + default: dataset-pg + examples: + - dataset-pg + type: string storage: default: postgres: @@ -66,99 +105,11 @@ options: type: string type: object type: object - postgres: - default: - replicas: 1 - examples: - - replicas: 1 - properties: - replicas: - default: 1 - type: integer - type: object - backups: - default: - enable: false - endpoint: '' - key-id-key: s3-id - retention: - db: 30d - schedule: - db: 0 3 * * * - secret-key: s3-secret - secret-name: backup-settings - examples: - - enable: false - endpoint: '' - key-id-key: s3-id - retention: - db: 30d - schedule: - db: 0 3 * * * - secret-key: s3-secret - secret-name: backup-settings - properties: - enable: - default: false - type: boolean - endpoint: - default: '' - type: string - key-id-key: - default: s3-id - type: string - retention: - default: - db: 30d - properties: - db: - default: 30d - type: string - type: object - schedule: - default: - db: 0 3 * * * - properties: - db: - default: 0 3 * * * - type: string - type: object - secret-key: - default: s3-secret - type: string - secret-name: - default: backup-settings - type: string - type: object - roles: - default: [] - items: - properties: - name: - default: alt-account - type: string - type: object - type: array - sub-domain: - default: dataset-pg - examples: - - dataset-pg - type: string - ingress_class: - default: traefik - examples: - - traefik - type: string domain_name: default: your_company.com examples: - your_company.com type: string - app_group: - default: api - examples: - - api - type: string extentions: default: directus: @@ -340,11 +291,60 @@ options: type: object type: object type: object - issuer: - default: letsencrypt-prod + backups: + default: + enable: false + endpoint: '' + key-id-key: s3-id + retention: + db: 30d + schedule: + db: 0 3 * * * + secret-key: s3-secret + secret-name: backup-settings examples: - - letsencrypt-prod - type: string + - enable: false + endpoint: '' + key-id-key: s3-id + retention: + db: 30d + schedule: + db: 0 3 * * * + secret-key: s3-secret + secret-name: backup-settings + properties: + enable: + default: false + type: boolean + endpoint: + default: '' + type: string + key-id-key: + default: s3-id + type: string + retention: + default: + db: 30d + properties: + db: + default: 30d + type: string + type: object + schedule: + default: + db: 0 3 * * * + properties: + db: + default: 0 3 * * * + type: string + type: object + secret-key: + default: s3-secret + type: string + secret-name: + default: backup-settings + type: string + type: object dependencies: - dist: null category: dbo diff --git a/share/dataset-pg/postgrest.tf b/share/dataset-pg/postgrest.tf index 99ea411..2c3fee2 100644 --- a/share/dataset-pg/postgrest.tf +++ b/share/dataset-pg/postgrest.tf @@ -157,7 +157,9 @@ module "postgrest-ingress" { dns_names = [local.prest-dns_name] create-redirect = true middlewares = [] - services = [local.prest-service] + sub_paths = ["ui",""] + services = [local.swagger-service, local.prest-service] + services = [] providers = { kubectl = kubectl } @@ -176,23 +178,3 @@ module "swagger-service" { kubectl = kubectl } } - -module "swagger-ingress" { - count = var.extentions.postgrest.enable && var.extentions.postgrest.swagger.enable ? 1 : 0 - source = "git::https://git.solidite.fr/vynil/kydah-modules.git//ingress" - component = "swagger" - instance = var.instance - namespace = var.namespace - issuer = var.issuer - ingress_class = var.ingress_class - labels = local.prest-labels - dns_names = [local.prest-dns_name] - middlewares = [] - create-cert = false - sub-path = "ui" - secret-component = "postgrest" - services = [local.swagger-service] - providers = { - kubectl = kubectl - } -}