This commit is contained in:
2024-03-12 17:47:05 +01:00
parent 55cb27f5f8
commit 944fe61d8c
2 changed files with 83 additions and 83 deletions

View File

@@ -6,7 +6,7 @@ resource "time_sleep" "wait_pg_ready" {
}
data "kubernetes_secret_v1" "postgresql_password" {
depends_on = [ time_sleep.wait_pg_ready ]
depends_on = [ time_sleep.wait_pg_ready, kubectl_manifest.prj_pg ]
metadata {
name = "${var.instance}-${var.component}-superuser"
namespace = "${var.namespace}"
@@ -62,7 +62,7 @@ data "kubernetes_secret_v1" "password_get" {
}
resource "postgresql_role" "owner" {
depends_on = [ time_sleep.wait_pg_ready, kubectl_manifest.prj_pg, kubectl_manifest.db_secret, data.kubernetes_secret_v1.postgresql_password ]
depends_on = [ time_sleep.wait_pg_ready, kubectl_manifest.prj_pg, data.kubernetes_secret_v1.postgresql_password ]
count = length(local.sorted-dbs)
name = "${local.sorted-dbs[count.index].name}"
login = true

View File

@@ -6,81 +6,20 @@ metadata:
name: dataset-pg
description: null
options:
storage:
default:
postgres:
size: 10Gi
ingress_class:
default: traefik
examples:
- postgres:
size: 10Gi
properties:
postgres:
default:
size: 10Gi
properties:
size:
default: 10Gi
type: string
type: object
type: object
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
issuer:
default: letsencrypt-prod
examples:
- letsencrypt-prod
- traefik
type: string
app_group:
default: api
examples:
- api
type: string
postgres:
default:
replicas: 1
domain_name:
default: your_company.com
examples:
- replicas: 1
properties:
replicas:
default: 1
type: integer
type: object
ingress_class:
default: traefik
examples:
- traefik
- your_company.com
type: string
extentions:
default:
@@ -263,20 +202,6 @@ options:
type: object
type: object
type: object
databases:
default: []
items:
properties:
name:
default: db
type: string
type: object
type: array
domain:
default: your-company
examples:
- your-company
type: string
roles:
default: []
items:
@@ -286,11 +211,77 @@ options:
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
storage:
default:
postgres:
size: 10Gi
examples:
- postgres:
size: 10Gi
properties:
postgres:
default:
size: 10Gi
properties:
size:
default: 10Gi
type: string
type: object
type: object
domain:
default: your-company
examples:
- your-company
type: string
postgres:
default:
replicas: 1
examples:
- replicas: 1
properties:
replicas:
default: 1
type: integer
type: object
sub_domain:
default: dataset-pg
examples:
- dataset-pg
type: string
issuer:
default: letsencrypt-prod
examples:
- letsencrypt-prod
type: string
backups:
default:
enable: false
@@ -345,6 +336,15 @@ options:
default: backup-settings
type: string
type: object
databases:
default: []
items:
properties:
name:
default: db
type: string
type: object
type: array
dependencies:
- dist: null
category: dbo