fix
This commit is contained in:
@@ -6,16 +6,11 @@ metadata:
|
||||
name: dataset-pg
|
||||
description: null
|
||||
options:
|
||||
domain:
|
||||
default: your-company
|
||||
examples:
|
||||
- your-company
|
||||
type: string
|
||||
replicas:
|
||||
default: 1
|
||||
examples:
|
||||
- 1
|
||||
type: integer
|
||||
roles:
|
||||
default: []
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
backups:
|
||||
default:
|
||||
enable: false
|
||||
@@ -75,70 +70,21 @@ options:
|
||||
examples:
|
||||
- 8Gi
|
||||
type: string
|
||||
images:
|
||||
pool:
|
||||
default:
|
||||
operator:
|
||||
pullPolicy: IfNotPresent
|
||||
registry: docker.io
|
||||
repository: to-be/defined
|
||||
tag: v1.0.0
|
||||
enable: false
|
||||
examples:
|
||||
- operator:
|
||||
pullPolicy: IfNotPresent
|
||||
registry: docker.io
|
||||
repository: to-be/defined
|
||||
tag: v1.0.0
|
||||
- enable: false
|
||||
properties:
|
||||
operator:
|
||||
default:
|
||||
pullPolicy: IfNotPresent
|
||||
registry: docker.io
|
||||
repository: to-be/defined
|
||||
tag: v1.0.0
|
||||
properties:
|
||||
pullPolicy:
|
||||
default: IfNotPresent
|
||||
enum:
|
||||
- Always
|
||||
- Never
|
||||
- IfNotPresent
|
||||
type: string
|
||||
registry:
|
||||
default: docker.io
|
||||
type: string
|
||||
repository:
|
||||
default: to-be/defined
|
||||
type: string
|
||||
tag:
|
||||
default: v1.0.0
|
||||
type: string
|
||||
type: object
|
||||
enable:
|
||||
default: false
|
||||
type: boolean
|
||||
type: object
|
||||
roles:
|
||||
default: []
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
issuer:
|
||||
default: letsencrypt-prod
|
||||
examples:
|
||||
- letsencrypt-prod
|
||||
type: string
|
||||
version:
|
||||
default: '14'
|
||||
examples:
|
||||
- '14'
|
||||
type: string
|
||||
sub-domain:
|
||||
default: to-be-set
|
||||
examples:
|
||||
- to-be-set
|
||||
type: string
|
||||
ingress-class:
|
||||
default: traefik
|
||||
examples:
|
||||
- traefik
|
||||
type: string
|
||||
databases:
|
||||
default: []
|
||||
items:
|
||||
@@ -148,11 +94,6 @@ options:
|
||||
type: string
|
||||
type: object
|
||||
type: array
|
||||
domain-name:
|
||||
default: your_company.com
|
||||
examples:
|
||||
- your_company.com
|
||||
type: string
|
||||
dependencies: []
|
||||
providers:
|
||||
kubernetes: true
|
||||
|
||||
@@ -2,8 +2,7 @@ locals {
|
||||
sorted-roles = reverse(distinct(sort(var.roles)))
|
||||
}
|
||||
|
||||
|
||||
resource "kubectl_manifest" "db_secret" {
|
||||
resource "kubectl_manifest" "db_secret_role" {
|
||||
ignore_fields = ["metadata.annotations"]
|
||||
count = length(local.sorted-roles)
|
||||
yaml_body = <<-EOF
|
||||
@@ -23,8 +22,8 @@ resource "kubectl_manifest" "db_secret" {
|
||||
EOF
|
||||
}
|
||||
|
||||
data "kubernetes_secret_v1" "password_get" {
|
||||
depends_on = [ kubectl_manifest.db_secret ]
|
||||
data "kubernetes_secret_v1" "password_role_get" {
|
||||
depends_on = [ kubectl_manifest.db_secret_role ]
|
||||
count = length(local.sorted-roles)
|
||||
metadata {
|
||||
name = "${var.instance}-${var.component}-role-${local.sorted-roles[count.index]}"
|
||||
@@ -37,5 +36,5 @@ resource "postgresql_role" "role" {
|
||||
count = length(local.sorted-roles)
|
||||
name = "${local.sorted-roles[count.index]}"
|
||||
login = true
|
||||
password = data.kubernetes_secret_v1.password_get[count.index].data["POSGRESQL_PASSWORD"]
|
||||
password = data.kubernetes_secret_v1.password_role_get[count.index].data["POSGRESQL_PASSWORD"]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user