This commit is contained in:
2024-01-26 14:00:04 +01:00
parent 3d18cede3b
commit 791b9f73bf
3 changed files with 69 additions and 71 deletions

View File

@@ -16,9 +16,6 @@ locals {
pg_username = data.kubernetes_secret_v1.postgresql_password.data["username"]
pg_password = data.kubernetes_secret_v1.postgresql_password.data["password"]
pg_host = "${var.instance}-${var.component}-rw.${var.namespace}.svc"
pg-username = data.kubernetes_secret_v1.postgresql_password.data["username"]
pg-password = data.kubernetes_secret_v1.postgresql_password.data["password"]
pg-host = "${var.instance}-${var.component}-rw.${var.namespace}.svc"
sorted-db-name = reverse(distinct(sort([
for db in var.databases: db.name

View File

@@ -6,16 +6,50 @@ metadata:
name: dataset-pg
description: null
options:
app_group:
default: api
images:
default:
postgresql:
registry: ghcr.io
repository: cloudnative-pg/postgresql
tag: 15.3
examples:
- api
- 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
domain:
default: your-company
repository:
default: cloudnative-pg/postgresql
type: string
tag:
default: 15.3
type: number
type: object
type: object
ingress_class:
default: traefik
examples:
- your-company
- traefik
type: string
postgres:
default:
replicas: 1
examples:
- replicas: 1
properties:
replicas:
default: 1
type: integer
type: object
storage:
default:
postgres:
@@ -33,16 +67,31 @@ options:
type: string
type: object
type: object
domain_name:
default: your_company.com
sub-domain:
default: dataset-pg
examples:
- your_company.com
- dataset-pg
type: string
issuer:
default: letsencrypt-prod
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
domain:
default: your-company
examples:
- your-company
type: string
extentions:
default:
directus:
@@ -224,6 +273,15 @@ options:
type: object
type: object
type: object
databases:
default: []
items:
properties:
name:
default: db
type: string
type: object
type: array
roles:
default: []
items:
@@ -233,16 +291,6 @@ options:
type: string
type: object
type: array
postgres:
default:
replicas: 1
examples:
- replicas: 1
properties:
replicas:
default: 1
type: integer
type: object
backups:
default:
enable: false
@@ -297,54 +345,6 @@ options:
default: backup-settings
type: string
type: object
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
sub-domain:
default: dataset-pg
examples:
- dataset-pg
type: string
databases:
default: []
items:
properties:
name:
default: db
type: string
type: object
type: array
ingress_class:
default: traefik
examples:
- traefik
type: string
dependencies:
- dist: null
category: dbo

View File

@@ -12,6 +12,7 @@ locals {
}
resource "kubectl_manifest" "db_secret_role" {
depends_on = [ data.kubernetes_secret_v1.postgresql_password ]
ignore_fields = ["metadata.annotations"]
count = length(local.sorted-roles)
yaml_body = <<-EOF