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" { 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 { metadata {
name = "${var.instance}-${var.component}-superuser" name = "${var.instance}-${var.component}-superuser"
namespace = "${var.namespace}" namespace = "${var.namespace}"
@@ -62,7 +62,7 @@ data "kubernetes_secret_v1" "password_get" {
} }
resource "postgresql_role" "owner" { 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) count = length(local.sorted-dbs)
name = "${local.sorted-dbs[count.index].name}" name = "${local.sorted-dbs[count.index].name}"
login = true login = true

View File

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