fix
This commit is contained in:
@@ -51,7 +51,7 @@ resource "kubectl_manifest" "directus_config" {
|
||||
AUTH_PROVIDERS: "VYNIL"
|
||||
AUTH_VYNIL_DRIVER: "openid"
|
||||
AUTH_VYNIL_ALLOW_PUBLIC_REGISTRATION: "true"
|
||||
AUTH_VYNIL_ISSUER_URL: "https://${data.kubernetes_ingress_v1.authentik.spec[0].rule[0].host}/application/o/directus-${replace(var.sub-domain, ".", "-")}-${var.instance}/.well-known/openid-configuration"
|
||||
AUTH_VYNIL_ISSUER_URL: "https://${data.kubernetes_ingress_v1.authentik.spec[0].rule[0].host}/application/o/directus-${replace(var.sub_domain, ".", "-")}-${var.instance}/.well-known/openid-configuration"
|
||||
AUTH_VYNIL_IDENTIFIER_KEY: "email"
|
||||
PUBLIC_URL: "https://${local.directus-dns_name}"
|
||||
EOF
|
||||
@@ -133,12 +133,12 @@ resource "kubectl_manifest" "directus_deploy" {
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
key: "client-id"
|
||||
name: "directus-${replace(var.sub-domain, ".", "-")}-${var.instance}-id"
|
||||
name: "directus-${replace(var.sub_domain, ".", "-")}-${var.instance}-id"
|
||||
- name: AUTH_VYNIL_CLIENT_SECRET
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
key: "client-secret"
|
||||
name: "directus-${replace(var.sub-domain, ".", "-")}-${var.instance}-secret"
|
||||
name: "directus-${replace(var.sub_domain, ".", "-")}-${var.instance}-secret"
|
||||
- name: DB_USER
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
@@ -230,7 +230,7 @@ module "directus-ingress" {
|
||||
module "directus-application" {
|
||||
count = var.extentions.directus.enable ? 1 : 0
|
||||
source = "git::https://git.solidite.fr/vynil/kydah-modules.git//application"
|
||||
component = "directus-${replace(var.sub-domain, ".", "-")}"
|
||||
component = "directus-${replace(var.sub_domain, ".", "-")}"
|
||||
instance = var.instance
|
||||
app_group = var.app_group
|
||||
dns_name = local.directus-dns_name
|
||||
@@ -244,7 +244,7 @@ module "directus-application" {
|
||||
module "directus-oauth2" {
|
||||
count = var.extentions.directus.enable ? 1 : 0
|
||||
source = "git::https://git.solidite.fr/vynil/kydah-modules.git//oauth2"
|
||||
component = "directus-${replace(var.sub-domain, ".", "-")}"
|
||||
component = "directus-${replace(var.sub_domain, ".", "-")}"
|
||||
domain = var.domain
|
||||
instance = var.instance
|
||||
namespace = var.namespace
|
||||
|
||||
@@ -6,6 +6,69 @@ metadata:
|
||||
name: dataset-pg
|
||||
description: null
|
||||
options:
|
||||
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
|
||||
databases:
|
||||
default: []
|
||||
items:
|
||||
properties:
|
||||
name:
|
||||
default: db
|
||||
type: string
|
||||
type: object
|
||||
type: array
|
||||
issuer:
|
||||
default: letsencrypt-prod
|
||||
examples:
|
||||
@@ -28,6 +91,31 @@ 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
|
||||
postgres:
|
||||
default:
|
||||
replicas: 1
|
||||
examples:
|
||||
- replicas: 1
|
||||
properties:
|
||||
replicas:
|
||||
default: 1
|
||||
type: integer
|
||||
type: object
|
||||
ingress_class:
|
||||
default: traefik
|
||||
examples:
|
||||
- traefik
|
||||
type: string
|
||||
roles:
|
||||
default: []
|
||||
items:
|
||||
@@ -42,6 +130,11 @@ options:
|
||||
examples:
|
||||
- your-company
|
||||
type: string
|
||||
sub_domain:
|
||||
default: dataset-pg
|
||||
examples:
|
||||
- dataset-pg
|
||||
type: string
|
||||
extentions:
|
||||
default:
|
||||
directus:
|
||||
@@ -223,99 +316,6 @@ options:
|
||||
type: object
|
||||
type: object
|
||||
type: object
|
||||
app_group:
|
||||
default: api
|
||||
examples:
|
||||
- api
|
||||
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:
|
||||
default:
|
||||
postgresql:
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
locals {
|
||||
dns_name = "${var.instance}.${var.sub-domain}.${var.domain_name}"
|
||||
dns_name = "${var.instance}.${var.sub_domain}.${var.domain_name}"
|
||||
pg-labels = merge(local.common-labels, {
|
||||
"app.kubernetes.io/component" = "postgresql"
|
||||
})
|
||||
@@ -35,11 +35,11 @@ resource "kubectl_manifest" "prj_pg" {
|
||||
endpointURL: "${var.backups.endpoint}/barman"
|
||||
s3Credentials:
|
||||
accessKeyId:
|
||||
name: "${var.backups.secret-name}"
|
||||
key: "${var.backups.key-id-key}"
|
||||
name: "${var.backups.secret_name}"
|
||||
key: "${var.backups.key_id_key}"
|
||||
secretAccessKey:
|
||||
name: "${var.backups.secret-name}"
|
||||
key: "${var.backups.secret-key}"
|
||||
name: "${var.backups.secret_name}"
|
||||
key: "${var.backups.secret_key}"
|
||||
EOF
|
||||
]:[""]))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user