diff --git a/share/dataset-pg/databases.tf b/share/dataset-pg/databases.tf index bbbbc9b..454d116 100644 --- a/share/dataset-pg/databases.tf +++ b/share/dataset-pg/databases.tf @@ -16,9 +16,9 @@ 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 = local.pg_username - pg-password = local.pg_password - pg-host = local.pg_host + 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 diff --git a/share/dataset-pg/index.yaml b/share/dataset-pg/index.yaml index 5ae7ded..d1c7df6 100644 --- a/share/dataset-pg/index.yaml +++ b/share/dataset-pg/index.yaml @@ -6,40 +6,119 @@ metadata: name: dataset-pg description: null options: + 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 + 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 domain: default: your-company examples: - your-company type: string - ingress_class: - default: traefik - examples: - - traefik - type: string sub-domain: default: dataset-pg examples: - dataset-pg type: string - databases: - default: [] - items: - properties: - name: - default: db - type: string - type: object - type: array - domain_name: - default: your_company.com - examples: - - your_company.com - type: string issuer: default: letsencrypt-prod examples: - letsencrypt-prod type: string + ingress_class: + default: traefik + examples: + - traefik + type: string + postgres: + default: + replicas: 1 + examples: + - replicas: 1 + properties: + replicas: + default: 1 + type: integer + type: object storage: default: postgres: @@ -57,6 +136,16 @@ options: type: string type: object type: object + app_group: + default: api + examples: + - api + type: string + domain_name: + default: your_company.com + examples: + - your_company.com + type: string extentions: default: directus: @@ -238,6 +327,15 @@ options: type: object type: object type: object + databases: + default: [] + items: + properties: + name: + default: db + type: string + type: object + type: array roles: default: [] items: @@ -247,104 +345,6 @@ options: type: string type: object type: array - postgres: - default: - replicas: 1 - examples: - - replicas: 1 - properties: - replicas: - default: 1 - type: integer - 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 - app_group: - default: api - examples: - - api - type: string - 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 dependencies: - dist: null category: dbo