fix
This commit is contained in:
@@ -16,6 +16,9 @@ locals {
|
|||||||
pg_username = data.kubernetes_secret_v1.postgresql_password.data["username"]
|
pg_username = data.kubernetes_secret_v1.postgresql_password.data["username"]
|
||||||
pg_password = data.kubernetes_secret_v1.postgresql_password.data["password"]
|
pg_password = data.kubernetes_secret_v1.postgresql_password.data["password"]
|
||||||
pg_host = "${var.instance}-${var.component}-rw.${var.namespace}.svc"
|
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([
|
sorted-db-name = reverse(distinct(sort([
|
||||||
for db in var.databases: db.name
|
for db in var.databases: db.name
|
||||||
|
|||||||
@@ -6,69 +6,11 @@ metadata:
|
|||||||
name: dataset-pg
|
name: dataset-pg
|
||||||
description: null
|
description: null
|
||||||
options:
|
options:
|
||||||
backups:
|
issuer:
|
||||||
default:
|
default: letsencrypt-prod
|
||||||
enable: false
|
|
||||||
endpoint: ''
|
|
||||||
key-id-key: s3-id
|
|
||||||
retention:
|
|
||||||
db: 30d
|
|
||||||
schedule:
|
|
||||||
db: 0 3 * * *
|
|
||||||
secret-key: s3-secret
|
|
||||||
secret-name: backup-settings
|
|
||||||
examples:
|
examples:
|
||||||
- enable: false
|
- letsencrypt-prod
|
||||||
endpoint: ''
|
type: string
|
||||||
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
|
|
||||||
roles:
|
|
||||||
default: []
|
|
||||||
items:
|
|
||||||
properties:
|
|
||||||
name:
|
|
||||||
default: alt-account
|
|
||||||
type: string
|
|
||||||
type: object
|
|
||||||
type: array
|
|
||||||
storage:
|
storage:
|
||||||
default:
|
default:
|
||||||
postgres:
|
postgres:
|
||||||
@@ -86,39 +28,19 @@ options:
|
|||||||
type: string
|
type: string
|
||||||
type: object
|
type: object
|
||||||
type: object
|
type: object
|
||||||
sub-domain:
|
roles:
|
||||||
default: dataset-pg
|
|
||||||
examples:
|
|
||||||
- dataset-pg
|
|
||||||
type: string
|
|
||||||
app_group:
|
|
||||||
default: api
|
|
||||||
examples:
|
|
||||||
- api
|
|
||||||
type: string
|
|
||||||
postgres:
|
|
||||||
default:
|
|
||||||
replicas: 1
|
|
||||||
examples:
|
|
||||||
- replicas: 1
|
|
||||||
properties:
|
|
||||||
replicas:
|
|
||||||
default: 1
|
|
||||||
type: integer
|
|
||||||
type: object
|
|
||||||
databases:
|
|
||||||
default: []
|
default: []
|
||||||
items:
|
items:
|
||||||
properties:
|
properties:
|
||||||
name:
|
name:
|
||||||
default: db
|
default: alt-account
|
||||||
type: string
|
type: string
|
||||||
type: object
|
type: object
|
||||||
type: array
|
type: array
|
||||||
domain_name:
|
domain:
|
||||||
default: your_company.com
|
default: your-company
|
||||||
examples:
|
examples:
|
||||||
- your_company.com
|
- your-company
|
||||||
type: string
|
type: string
|
||||||
extentions:
|
extentions:
|
||||||
default:
|
default:
|
||||||
@@ -301,11 +223,99 @@ options:
|
|||||||
type: object
|
type: object
|
||||||
type: object
|
type: object
|
||||||
type: object
|
type: object
|
||||||
domain:
|
app_group:
|
||||||
default: your-company
|
default: api
|
||||||
examples:
|
examples:
|
||||||
- your-company
|
- api
|
||||||
type: string
|
type: string
|
||||||
|
postgres:
|
||||||
|
default:
|
||||||
|
replicas: 1
|
||||||
|
examples:
|
||||||
|
- replicas: 1
|
||||||
|
properties:
|
||||||
|
replicas:
|
||||||
|
default: 1
|
||||||
|
type: integer
|
||||||
|
type: object
|
||||||
|
ingress_class:
|
||||||
|
default: traefik
|
||||||
|
examples:
|
||||||
|
- traefik
|
||||||
|
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
|
||||||
|
sub-domain:
|
||||||
|
default: dataset-pg
|
||||||
|
examples:
|
||||||
|
- dataset-pg
|
||||||
|
type: string
|
||||||
|
domain_name:
|
||||||
|
default: your_company.com
|
||||||
|
examples:
|
||||||
|
- your_company.com
|
||||||
|
type: string
|
||||||
|
databases:
|
||||||
|
default: []
|
||||||
|
items:
|
||||||
|
properties:
|
||||||
|
name:
|
||||||
|
default: db
|
||||||
|
type: string
|
||||||
|
type: object
|
||||||
|
type: array
|
||||||
images:
|
images:
|
||||||
default:
|
default:
|
||||||
postgresql:
|
postgresql:
|
||||||
@@ -335,16 +345,6 @@ options:
|
|||||||
type: number
|
type: number
|
||||||
type: object
|
type: object
|
||||||
type: object
|
type: object
|
||||||
issuer:
|
|
||||||
default: letsencrypt-prod
|
|
||||||
examples:
|
|
||||||
- letsencrypt-prod
|
|
||||||
type: string
|
|
||||||
ingress_class:
|
|
||||||
default: traefik
|
|
||||||
examples:
|
|
||||||
- traefik
|
|
||||||
type: string
|
|
||||||
dependencies:
|
dependencies:
|
||||||
- dist: null
|
- dist: null
|
||||||
category: dbo
|
category: dbo
|
||||||
|
|||||||
@@ -1,48 +0,0 @@
|
|||||||
|
|
||||||
terraform {
|
|
||||||
required_providers {
|
|
||||||
kustomization = {
|
|
||||||
source = "kbst/kustomization"
|
|
||||||
version = "~> 0.9.2"
|
|
||||||
}
|
|
||||||
kubernetes = {
|
|
||||||
source = "hashicorp/kubernetes"
|
|
||||||
version = "~> 2.20.0"
|
|
||||||
}
|
|
||||||
kubectl = {
|
|
||||||
source = "gavinbunney/kubectl"
|
|
||||||
version = "~> 1.14.0"
|
|
||||||
}
|
|
||||||
authentik = {
|
|
||||||
source = "goauthentik/authentik"
|
|
||||||
version = "~> 2023.5.0"
|
|
||||||
}
|
|
||||||
postgresql = {
|
|
||||||
source = "cyrilgdn/postgresql"
|
|
||||||
version = "~> 1.19.0"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
provider "kustomization" {
|
|
||||||
kubeconfig_incluster = true
|
|
||||||
}
|
|
||||||
provider "kubernetes" {
|
|
||||||
host = "https://kubernetes.default.svc"
|
|
||||||
token = "${file("/run/secrets/kubernetes.io/serviceaccount/token")}"
|
|
||||||
cluster_ca_certificate = "${file("/run/secrets/kubernetes.io/serviceaccount/ca.crt")}"
|
|
||||||
}
|
|
||||||
provider "kubectl" {
|
|
||||||
host = "https://kubernetes.default.svc"
|
|
||||||
token = "${file("/run/secrets/kubernetes.io/serviceaccount/token")}"
|
|
||||||
cluster_ca_certificate = "${file("/run/secrets/kubernetes.io/serviceaccount/ca.crt")}"
|
|
||||||
load_config_file = false
|
|
||||||
}
|
|
||||||
provider "authentik" {
|
|
||||||
url = "http://authentik.${var.domain}-auth.svc"
|
|
||||||
token = data.kubernetes_secret_v1.authentik.data["AUTHENTIK_BOOTSTRAP_TOKEN"]
|
|
||||||
}
|
|
||||||
provider "postgresql" {
|
|
||||||
host = "${var.instance}-${var.component}-rw.${var.namespace}.svc"
|
|
||||||
username = data.kubernetes_secret_v1.postgresql_password.data["username"]
|
|
||||||
password = data.kubernetes_secret_v1.postgresql_password.data["password"]
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user