fix
This commit is contained in:
@@ -159,7 +159,7 @@ resource "kubectl_manifest" "config" {
|
|||||||
namespace: "${var.namespace}"
|
namespace: "${var.namespace}"
|
||||||
labels: ${jsonencode(local.common-labels)}
|
labels: ${jsonencode(local.common-labels)}
|
||||||
data:
|
data:
|
||||||
DOLI_DB_HOST: "${var.instance}-${var.component}.${var.namespace}.svc"
|
DOLI_DB_HOST: "${var.instance}-${var.component}-pg-rw.${var.namespace}.svc"
|
||||||
DOLI_DB_USER: "${var.component}"
|
DOLI_DB_USER: "${var.component}"
|
||||||
DOLI_DB_NAME: "${var.component}"
|
DOLI_DB_NAME: "${var.component}"
|
||||||
DOLI_DB_PORT: "5432"
|
DOLI_DB_PORT: "5432"
|
||||||
|
|||||||
@@ -95,7 +95,7 @@ spec:
|
|||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
key: password
|
key: password
|
||||||
name: "${var.component}.${var.instance}-${var.component}.credentials.postgresql.acid.zalan.do"
|
name: "${var.instance}-${var.component}-pg-app"
|
||||||
envFrom:
|
envFrom:
|
||||||
- configMapRef:
|
- configMapRef:
|
||||||
name: "${kubectl_manifest.config.name}"
|
name: "${kubectl_manifest.config.name}"
|
||||||
|
|||||||
@@ -6,11 +6,6 @@ metadata:
|
|||||||
name: dolibarr
|
name: dolibarr
|
||||||
description: null
|
description: null
|
||||||
options:
|
options:
|
||||||
domain-name:
|
|
||||||
default: your_company.com
|
|
||||||
examples:
|
|
||||||
- your_company.com
|
|
||||||
type: string
|
|
||||||
redis:
|
redis:
|
||||||
default:
|
default:
|
||||||
exporter:
|
exporter:
|
||||||
@@ -44,86 +39,6 @@ options:
|
|||||||
default: 2Gi
|
default: 2Gi
|
||||||
type: string
|
type: string
|
||||||
type: object
|
type: object
|
||||||
domain:
|
|
||||||
default: your-company
|
|
||||||
examples:
|
|
||||||
- your-company
|
|
||||||
type: string
|
|
||||||
ingress-class:
|
|
||||||
default: traefik
|
|
||||||
examples:
|
|
||||||
- traefik
|
|
||||||
type: string
|
|
||||||
parameters:
|
|
||||||
default:
|
|
||||||
MAIN_LANG_DEFAULT: auto
|
|
||||||
examples:
|
|
||||||
- MAIN_LANG_DEFAULT: auto
|
|
||||||
properties:
|
|
||||||
MAIN_LANG_DEFAULT:
|
|
||||||
default: auto
|
|
||||||
type: string
|
|
||||||
type: object
|
|
||||||
storage:
|
|
||||||
default:
|
|
||||||
accessMode: ReadWriteOnce
|
|
||||||
size: 10Gi
|
|
||||||
type: Filesystem
|
|
||||||
examples:
|
|
||||||
- accessMode: ReadWriteOnce
|
|
||||||
size: 10Gi
|
|
||||||
type: Filesystem
|
|
||||||
properties:
|
|
||||||
accessMode:
|
|
||||||
default: ReadWriteOnce
|
|
||||||
enum:
|
|
||||||
- ReadWriteOnce
|
|
||||||
- ReadOnlyMany
|
|
||||||
- ReadWriteMany
|
|
||||||
type: string
|
|
||||||
size:
|
|
||||||
default: 10Gi
|
|
||||||
type: string
|
|
||||||
type:
|
|
||||||
default: Filesystem
|
|
||||||
enum:
|
|
||||||
- Filesystem
|
|
||||||
- block
|
|
||||||
type: string
|
|
||||||
type: object
|
|
||||||
issuer:
|
|
||||||
default: letsencrypt-prod
|
|
||||||
examples:
|
|
||||||
- letsencrypt-prod
|
|
||||||
type: string
|
|
||||||
modules:
|
|
||||||
default:
|
|
||||||
- societe
|
|
||||||
examples:
|
|
||||||
- - societe
|
|
||||||
items:
|
|
||||||
type: string
|
|
||||||
type: array
|
|
||||||
sub-domain:
|
|
||||||
default: erp
|
|
||||||
examples:
|
|
||||||
- erp
|
|
||||||
type: string
|
|
||||||
user-groups:
|
|
||||||
default:
|
|
||||||
- admin: true
|
|
||||||
name: dolibarr-admin
|
|
||||||
examples:
|
|
||||||
- - admin: true
|
|
||||||
name: dolibarr-admin
|
|
||||||
items:
|
|
||||||
properties:
|
|
||||||
admin:
|
|
||||||
type: boolean
|
|
||||||
name:
|
|
||||||
type: string
|
|
||||||
type: object
|
|
||||||
type: array
|
|
||||||
hpa:
|
hpa:
|
||||||
default:
|
default:
|
||||||
avg-cpu: 50
|
avg-cpu: 50
|
||||||
@@ -144,6 +59,125 @@ options:
|
|||||||
default: 1
|
default: 1
|
||||||
type: integer
|
type: integer
|
||||||
type: object
|
type: object
|
||||||
|
postgres:
|
||||||
|
default:
|
||||||
|
replicas: 1
|
||||||
|
storage: 5Gi
|
||||||
|
version: '14'
|
||||||
|
examples:
|
||||||
|
- replicas: 1
|
||||||
|
storage: 5Gi
|
||||||
|
version: '14'
|
||||||
|
properties:
|
||||||
|
replicas:
|
||||||
|
default: 1
|
||||||
|
type: integer
|
||||||
|
storage:
|
||||||
|
default: 5Gi
|
||||||
|
type: string
|
||||||
|
version:
|
||||||
|
default: '14'
|
||||||
|
type: string
|
||||||
|
type: object
|
||||||
|
resources:
|
||||||
|
default:
|
||||||
|
limits:
|
||||||
|
cpu: 200m
|
||||||
|
memory: 256Mi
|
||||||
|
requests:
|
||||||
|
cpu: 50m
|
||||||
|
memory: 100Mi
|
||||||
|
examples:
|
||||||
|
- limits:
|
||||||
|
cpu: 200m
|
||||||
|
memory: 256Mi
|
||||||
|
requests:
|
||||||
|
cpu: 50m
|
||||||
|
memory: 100Mi
|
||||||
|
properties:
|
||||||
|
limits:
|
||||||
|
default:
|
||||||
|
cpu: 200m
|
||||||
|
memory: 256Mi
|
||||||
|
properties:
|
||||||
|
cpu:
|
||||||
|
default: 200m
|
||||||
|
type: string
|
||||||
|
memory:
|
||||||
|
default: 256Mi
|
||||||
|
type: string
|
||||||
|
type: object
|
||||||
|
requests:
|
||||||
|
default:
|
||||||
|
cpu: 50m
|
||||||
|
memory: 100Mi
|
||||||
|
properties:
|
||||||
|
cpu:
|
||||||
|
default: 50m
|
||||||
|
type: string
|
||||||
|
memory:
|
||||||
|
default: 100Mi
|
||||||
|
type: string
|
||||||
|
type: object
|
||||||
|
type: object
|
||||||
|
sub-domain:
|
||||||
|
default: erp
|
||||||
|
examples:
|
||||||
|
- erp
|
||||||
|
type: string
|
||||||
|
issuer:
|
||||||
|
default: letsencrypt-prod
|
||||||
|
examples:
|
||||||
|
- letsencrypt-prod
|
||||||
|
type: string
|
||||||
|
log-level:
|
||||||
|
default: 5
|
||||||
|
examples:
|
||||||
|
- 5
|
||||||
|
type: integer
|
||||||
|
ingress-class:
|
||||||
|
default: traefik
|
||||||
|
examples:
|
||||||
|
- traefik
|
||||||
|
type: string
|
||||||
|
modules:
|
||||||
|
default:
|
||||||
|
- societe
|
||||||
|
examples:
|
||||||
|
- - societe
|
||||||
|
items:
|
||||||
|
type: string
|
||||||
|
type: array
|
||||||
|
domain-name:
|
||||||
|
default: your_company.com
|
||||||
|
examples:
|
||||||
|
- your_company.com
|
||||||
|
type: string
|
||||||
|
user-groups:
|
||||||
|
default:
|
||||||
|
- admin: true
|
||||||
|
name: dolibarr-admin
|
||||||
|
examples:
|
||||||
|
- - admin: true
|
||||||
|
name: dolibarr-admin
|
||||||
|
items:
|
||||||
|
properties:
|
||||||
|
admin:
|
||||||
|
type: boolean
|
||||||
|
name:
|
||||||
|
type: string
|
||||||
|
type: object
|
||||||
|
type: array
|
||||||
|
parameters:
|
||||||
|
default:
|
||||||
|
MAIN_LANG_DEFAULT: auto
|
||||||
|
examples:
|
||||||
|
- MAIN_LANG_DEFAULT: auto
|
||||||
|
properties:
|
||||||
|
MAIN_LANG_DEFAULT:
|
||||||
|
default: auto
|
||||||
|
type: string
|
||||||
|
type: object
|
||||||
images:
|
images:
|
||||||
default:
|
default:
|
||||||
dolibarr:
|
dolibarr:
|
||||||
@@ -209,71 +243,37 @@ options:
|
|||||||
type: string
|
type: string
|
||||||
type: object
|
type: object
|
||||||
type: object
|
type: object
|
||||||
log-level:
|
domain:
|
||||||
default: 5
|
default: your-company
|
||||||
examples:
|
examples:
|
||||||
- 5
|
- your-company
|
||||||
type: integer
|
type: string
|
||||||
postgres:
|
storage:
|
||||||
default:
|
default:
|
||||||
replicas: 1
|
accessMode: ReadWriteOnce
|
||||||
storage: 5Gi
|
size: 10Gi
|
||||||
version: '14'
|
type: Filesystem
|
||||||
examples:
|
examples:
|
||||||
- replicas: 1
|
- accessMode: ReadWriteOnce
|
||||||
storage: 5Gi
|
size: 10Gi
|
||||||
version: '14'
|
type: Filesystem
|
||||||
properties:
|
properties:
|
||||||
replicas:
|
accessMode:
|
||||||
default: 1
|
default: ReadWriteOnce
|
||||||
type: integer
|
enum:
|
||||||
storage:
|
- ReadWriteOnce
|
||||||
default: 5Gi
|
- ReadOnlyMany
|
||||||
|
- ReadWriteMany
|
||||||
type: string
|
type: string
|
||||||
version:
|
size:
|
||||||
default: '14'
|
default: 10Gi
|
||||||
|
type: string
|
||||||
|
type:
|
||||||
|
default: Filesystem
|
||||||
|
enum:
|
||||||
|
- Filesystem
|
||||||
|
- block
|
||||||
type: string
|
type: string
|
||||||
type: object
|
|
||||||
resources:
|
|
||||||
default:
|
|
||||||
limits:
|
|
||||||
cpu: 200m
|
|
||||||
memory: 256Mi
|
|
||||||
requests:
|
|
||||||
cpu: 50m
|
|
||||||
memory: 100Mi
|
|
||||||
examples:
|
|
||||||
- limits:
|
|
||||||
cpu: 200m
|
|
||||||
memory: 256Mi
|
|
||||||
requests:
|
|
||||||
cpu: 50m
|
|
||||||
memory: 100Mi
|
|
||||||
properties:
|
|
||||||
limits:
|
|
||||||
default:
|
|
||||||
cpu: 200m
|
|
||||||
memory: 256Mi
|
|
||||||
properties:
|
|
||||||
cpu:
|
|
||||||
default: 200m
|
|
||||||
type: string
|
|
||||||
memory:
|
|
||||||
default: 256Mi
|
|
||||||
type: string
|
|
||||||
type: object
|
|
||||||
requests:
|
|
||||||
default:
|
|
||||||
cpu: 50m
|
|
||||||
memory: 100Mi
|
|
||||||
properties:
|
|
||||||
cpu:
|
|
||||||
default: 50m
|
|
||||||
type: string
|
|
||||||
memory:
|
|
||||||
default: 100Mi
|
|
||||||
type: string
|
|
||||||
type: object
|
|
||||||
type: object
|
type: object
|
||||||
dependencies:
|
dependencies:
|
||||||
- dist: null
|
- dist: null
|
||||||
@@ -287,7 +287,7 @@ dependencies:
|
|||||||
component: cert-manager-self-sign
|
component: cert-manager-self-sign
|
||||||
- dist: null
|
- dist: null
|
||||||
category: dbo
|
category: dbo
|
||||||
component: postgresql
|
component: pg
|
||||||
- dist: null
|
- dist: null
|
||||||
category: dbo
|
category: dbo
|
||||||
component: redis
|
component: redis
|
||||||
@@ -298,3 +298,4 @@ providers:
|
|||||||
postgresql: null
|
postgresql: null
|
||||||
restapi: true
|
restapi: true
|
||||||
http: true
|
http: true
|
||||||
|
tfaddtype: null
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
locals {
|
locals {
|
||||||
pg-labels = merge(local.common-labels, {
|
pg-labels = merge(local.common-labels, {
|
||||||
|
"app.kubernetes.io/component" = "pg"
|
||||||
|
})
|
||||||
|
postgres-labels = merge(local.common-labels, {
|
||||||
"app.kubernetes.io/component" = "postgresql"
|
"app.kubernetes.io/component" = "postgresql"
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -10,7 +13,7 @@ resource "kubectl_manifest" "dolibarr_postgresql" {
|
|||||||
metadata:
|
metadata:
|
||||||
name: "${var.instance}-${var.component}"
|
name: "${var.instance}-${var.component}"
|
||||||
namespace: "${var.namespace}"
|
namespace: "${var.namespace}"
|
||||||
labels: ${jsonencode(local.pg-labels)}
|
labels: ${jsonencode(local.postgres-labels)}
|
||||||
spec:
|
spec:
|
||||||
databases:
|
databases:
|
||||||
${var.component}: "${var.component}"
|
${var.component}: "${var.component}"
|
||||||
@@ -29,3 +32,76 @@ resource "kubectl_manifest" "dolibarr_postgresql" {
|
|||||||
size: "${var.postgres.storage}"
|
size: "${var.postgres.storage}"
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
|
resource "kubectl_manifest" "prj_pre_migrate_pg" {
|
||||||
|
yaml_body = <<-EOF
|
||||||
|
apiVersion: batch/v1
|
||||||
|
kind: Job
|
||||||
|
metadata:
|
||||||
|
name: "${var.instance}-remove-zalando-extensions"
|
||||||
|
namespace: "${var.namespace}"
|
||||||
|
spec:
|
||||||
|
template:
|
||||||
|
spec:
|
||||||
|
restartPolicy: OnFailure
|
||||||
|
containers:
|
||||||
|
- name: clean
|
||||||
|
image: docker.io/postgres:15.3-bookworm
|
||||||
|
imagePullPolicy: IfNotPresent
|
||||||
|
env:
|
||||||
|
- name: USERNAME
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
key: username
|
||||||
|
name: postgres.${var.instance}-${var.component}.credentials.postgresql.acid.zalan.do
|
||||||
|
- name: PASSWORD
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
key: password
|
||||||
|
name: postgres.${var.instance}-${var.component}.credentials.postgresql.acid.zalan.do
|
||||||
|
- name: DBURL
|
||||||
|
value: "${var.instance}-${var.component}"
|
||||||
|
- name: DBNAME
|
||||||
|
value: "${var.component}"
|
||||||
|
command:
|
||||||
|
- /bin/bash
|
||||||
|
- "-c"
|
||||||
|
- "echo -ne 'drop view if exists metric_helpers.pg_stat_statements;\ndrop function if exists metric_helpers.pg_stat_statements;\nDROP EXTENSION IF EXISTS pg_stat_statements;\nDROP EXTENSION IF EXISTS pg_stat_kcache;\nDROP EXTENSION IF EXISTS set_user;\n'| PGPASSWORD=\"$PASSWORD\" psql -U $USERNAME -d $DBNAME -h $DBURL"
|
||||||
|
EOF
|
||||||
|
}
|
||||||
|
|
||||||
|
resource "kubectl_manifest" "prj_pg" {
|
||||||
|
depends_on = [kubectl_manifest.prj_pre_migrate_pg]
|
||||||
|
yaml_body = <<-EOF
|
||||||
|
apiVersion: postgresql.cnpg.io/v1
|
||||||
|
kind: Cluster
|
||||||
|
metadata:
|
||||||
|
name: "${var.instance}-${var.component}-pg"
|
||||||
|
namespace: "${var.namespace}"
|
||||||
|
labels: ${jsonencode(local.pg-labels)}
|
||||||
|
spec:
|
||||||
|
instances: ${var.postgres.replicas}
|
||||||
|
storage:
|
||||||
|
size: "${var.postgres.storage}"
|
||||||
|
bootstrap:
|
||||||
|
initdb:
|
||||||
|
database: ${var.component}
|
||||||
|
owner: ${var.component}
|
||||||
|
import:
|
||||||
|
type: microservice
|
||||||
|
databases:
|
||||||
|
- ${var.component}
|
||||||
|
source:
|
||||||
|
externalCluster: "${var.instance}-${var.component}"
|
||||||
|
externalClusters:
|
||||||
|
- name: "${var.instance}-${var.component}"
|
||||||
|
connectionParameters:
|
||||||
|
host: "${var.instance}-${var.component}"
|
||||||
|
user: postgres
|
||||||
|
dbname: postgres
|
||||||
|
sslmode: require
|
||||||
|
password:
|
||||||
|
name: "postgres.${var.instance}-${var.component}.credentials.postgresql.acid.zalan.do"
|
||||||
|
key: password
|
||||||
|
EOF
|
||||||
|
}
|
||||||
|
|||||||
@@ -9,40 +9,125 @@ metadata:
|
|||||||
A painless self-hosted Git service.
|
A painless self-hosted Git service.
|
||||||
Gitea is a community managed lightweight code hosting solution written in Go. It is published under the MIT license.
|
Gitea is a community managed lightweight code hosting solution written in Go. It is published under the MIT license.
|
||||||
options:
|
options:
|
||||||
timezone:
|
release:
|
||||||
default: Europe/Paris
|
default: 8.3.0
|
||||||
examples:
|
examples:
|
||||||
- Europe/Paris
|
- 8.3.0
|
||||||
type: string
|
type: string
|
||||||
sub-domain:
|
disable-registration:
|
||||||
default: git
|
default: true
|
||||||
examples:
|
examples:
|
||||||
- git
|
- true
|
||||||
|
type: boolean
|
||||||
|
admin:
|
||||||
|
default:
|
||||||
|
email: git-admin@git.your_company.com
|
||||||
|
name: gitea_admin
|
||||||
|
examples:
|
||||||
|
- email: git-admin@git.your_company.com
|
||||||
|
name: gitea_admin
|
||||||
|
properties:
|
||||||
|
email:
|
||||||
|
default: git-admin@git.your_company.com
|
||||||
|
type: string
|
||||||
|
name:
|
||||||
|
default: gitea_admin
|
||||||
|
type: string
|
||||||
|
type: object
|
||||||
|
ingress-class:
|
||||||
|
default: traefik
|
||||||
|
examples:
|
||||||
|
- traefik
|
||||||
type: string
|
type: string
|
||||||
ssh-port:
|
ssh-port:
|
||||||
default: 2222
|
default: 2222
|
||||||
examples:
|
examples:
|
||||||
- 2222
|
- 2222
|
||||||
type: integer
|
type: integer
|
||||||
webhook:
|
theme:
|
||||||
|
default: gitea-modern
|
||||||
|
examples:
|
||||||
|
- gitea-modern
|
||||||
|
type: string
|
||||||
|
volume:
|
||||||
default:
|
default:
|
||||||
allowed-hosts: private
|
size: 10Gi
|
||||||
skip-tls-verify: false
|
|
||||||
examples:
|
examples:
|
||||||
- allowed-hosts: private
|
- size: 10Gi
|
||||||
skip-tls-verify: false
|
|
||||||
properties:
|
properties:
|
||||||
allowed-hosts:
|
size:
|
||||||
default: private
|
default: 10Gi
|
||||||
type: string
|
type: string
|
||||||
skip-tls-verify:
|
|
||||||
default: false
|
|
||||||
type: boolean
|
|
||||||
type: object
|
type: object
|
||||||
release:
|
domain:
|
||||||
default: 8.3.0
|
default: your-company
|
||||||
examples:
|
examples:
|
||||||
- 8.3.0
|
- your-company
|
||||||
|
type: string
|
||||||
|
postgres:
|
||||||
|
default:
|
||||||
|
replicas: 1
|
||||||
|
storage: 10Gi
|
||||||
|
version: '14'
|
||||||
|
examples:
|
||||||
|
- replicas: 1
|
||||||
|
storage: 10Gi
|
||||||
|
version: '14'
|
||||||
|
properties:
|
||||||
|
replicas:
|
||||||
|
default: 1
|
||||||
|
type: integer
|
||||||
|
storage:
|
||||||
|
default: 10Gi
|
||||||
|
type: string
|
||||||
|
version:
|
||||||
|
default: '14'
|
||||||
|
type: string
|
||||||
|
type: object
|
||||||
|
timezone:
|
||||||
|
default: Europe/Paris
|
||||||
|
examples:
|
||||||
|
- Europe/Paris
|
||||||
|
type: string
|
||||||
|
issuer:
|
||||||
|
default: letsencrypt-prod
|
||||||
|
examples:
|
||||||
|
- letsencrypt-prod
|
||||||
|
type: string
|
||||||
|
push-create:
|
||||||
|
default:
|
||||||
|
org: 'true'
|
||||||
|
private: 'false'
|
||||||
|
user: 'true'
|
||||||
|
examples:
|
||||||
|
- org: 'true'
|
||||||
|
private: 'false'
|
||||||
|
user: 'true'
|
||||||
|
properties:
|
||||||
|
org:
|
||||||
|
default: 'true'
|
||||||
|
type: string
|
||||||
|
private:
|
||||||
|
default: 'false'
|
||||||
|
type: string
|
||||||
|
user:
|
||||||
|
default: 'true'
|
||||||
|
type: string
|
||||||
|
type: object
|
||||||
|
domain-name:
|
||||||
|
default: your_company.com
|
||||||
|
examples:
|
||||||
|
- your_company.com
|
||||||
|
type: string
|
||||||
|
replicas:
|
||||||
|
default: 1
|
||||||
|
examples:
|
||||||
|
- 1
|
||||||
|
type: integer
|
||||||
|
default-branch:
|
||||||
|
default: main
|
||||||
|
examples:
|
||||||
|
- main
|
||||||
type: string
|
type: string
|
||||||
images:
|
images:
|
||||||
default:
|
default:
|
||||||
@@ -107,35 +192,25 @@ options:
|
|||||||
type: string
|
type: string
|
||||||
type: object
|
type: object
|
||||||
type: object
|
type: object
|
||||||
ingress-class:
|
sub-domain:
|
||||||
default: traefik
|
default: git
|
||||||
examples:
|
examples:
|
||||||
- traefik
|
- git
|
||||||
type: string
|
type: string
|
||||||
replicas:
|
webhook:
|
||||||
default: 1
|
|
||||||
examples:
|
|
||||||
- 1
|
|
||||||
type: integer
|
|
||||||
domain:
|
|
||||||
default: your-company
|
|
||||||
examples:
|
|
||||||
- your-company
|
|
||||||
type: string
|
|
||||||
domain-name:
|
|
||||||
default: your_company.com
|
|
||||||
examples:
|
|
||||||
- your_company.com
|
|
||||||
type: string
|
|
||||||
volume:
|
|
||||||
default:
|
default:
|
||||||
size: 10Gi
|
allowed-hosts: private
|
||||||
|
skip-tls-verify: false
|
||||||
examples:
|
examples:
|
||||||
- size: 10Gi
|
- allowed-hosts: private
|
||||||
|
skip-tls-verify: false
|
||||||
properties:
|
properties:
|
||||||
size:
|
allowed-hosts:
|
||||||
default: 10Gi
|
default: private
|
||||||
type: string
|
type: string
|
||||||
|
skip-tls-verify:
|
||||||
|
default: false
|
||||||
|
type: boolean
|
||||||
type: object
|
type: object
|
||||||
load-balancer:
|
load-balancer:
|
||||||
default:
|
default:
|
||||||
@@ -147,81 +222,6 @@ options:
|
|||||||
default: ''
|
default: ''
|
||||||
type: string
|
type: string
|
||||||
type: object
|
type: object
|
||||||
issuer:
|
|
||||||
default: letsencrypt-prod
|
|
||||||
examples:
|
|
||||||
- letsencrypt-prod
|
|
||||||
type: string
|
|
||||||
theme:
|
|
||||||
default: gitea-modern
|
|
||||||
examples:
|
|
||||||
- gitea-modern
|
|
||||||
type: string
|
|
||||||
default-branch:
|
|
||||||
default: main
|
|
||||||
examples:
|
|
||||||
- main
|
|
||||||
type: string
|
|
||||||
disable-registration:
|
|
||||||
default: true
|
|
||||||
examples:
|
|
||||||
- true
|
|
||||||
type: boolean
|
|
||||||
push-create:
|
|
||||||
default:
|
|
||||||
org: 'true'
|
|
||||||
private: 'false'
|
|
||||||
user: 'true'
|
|
||||||
examples:
|
|
||||||
- org: 'true'
|
|
||||||
private: 'false'
|
|
||||||
user: 'true'
|
|
||||||
properties:
|
|
||||||
org:
|
|
||||||
default: 'true'
|
|
||||||
type: string
|
|
||||||
private:
|
|
||||||
default: 'false'
|
|
||||||
type: string
|
|
||||||
user:
|
|
||||||
default: 'true'
|
|
||||||
type: string
|
|
||||||
type: object
|
|
||||||
admin:
|
|
||||||
default:
|
|
||||||
email: git-admin@git.your_company.com
|
|
||||||
name: gitea_admin
|
|
||||||
examples:
|
|
||||||
- email: git-admin@git.your_company.com
|
|
||||||
name: gitea_admin
|
|
||||||
properties:
|
|
||||||
email:
|
|
||||||
default: git-admin@git.your_company.com
|
|
||||||
type: string
|
|
||||||
name:
|
|
||||||
default: gitea_admin
|
|
||||||
type: string
|
|
||||||
type: object
|
|
||||||
postgres:
|
|
||||||
default:
|
|
||||||
replicas: 1
|
|
||||||
storage: 10Gi
|
|
||||||
version: '14'
|
|
||||||
examples:
|
|
||||||
- replicas: 1
|
|
||||||
storage: 10Gi
|
|
||||||
version: '14'
|
|
||||||
properties:
|
|
||||||
replicas:
|
|
||||||
default: 1
|
|
||||||
type: integer
|
|
||||||
storage:
|
|
||||||
default: 10Gi
|
|
||||||
type: string
|
|
||||||
version:
|
|
||||||
default: '14'
|
|
||||||
type: string
|
|
||||||
type: object
|
|
||||||
dependencies:
|
dependencies:
|
||||||
- dist: null
|
- dist: null
|
||||||
category: share
|
category: share
|
||||||
|
|||||||
@@ -78,6 +78,7 @@ resource "kubectl_manifest" "prj_pg" {
|
|||||||
metadata:
|
metadata:
|
||||||
name: "${var.instance}-${var.component}-pg"
|
name: "${var.instance}-${var.component}-pg"
|
||||||
namespace: "${var.namespace}"
|
namespace: "${var.namespace}"
|
||||||
|
labels: ${jsonencode(local.pg-labels)}
|
||||||
spec:
|
spec:
|
||||||
instances: ${var.postgres.replicas}
|
instances: ${var.postgres.replicas}
|
||||||
storage:
|
storage:
|
||||||
|
|||||||
@@ -6,51 +6,25 @@ metadata:
|
|||||||
name: nextcloud
|
name: nextcloud
|
||||||
description: null
|
description: null
|
||||||
options:
|
options:
|
||||||
admin:
|
storage:
|
||||||
default:
|
default:
|
||||||
name: nextcloud_admin
|
accessMode: ReadWriteOnce
|
||||||
|
size: 10Gi
|
||||||
examples:
|
examples:
|
||||||
- name: nextcloud_admin
|
- accessMode: ReadWriteOnce
|
||||||
|
size: 10Gi
|
||||||
properties:
|
properties:
|
||||||
name:
|
accessMode:
|
||||||
default: nextcloud_admin
|
default: ReadWriteOnce
|
||||||
|
enum:
|
||||||
|
- ReadWriteOnce
|
||||||
|
- ReadOnlyMany
|
||||||
|
- ReadWriteMany
|
||||||
|
type: string
|
||||||
|
size:
|
||||||
|
default: 10Gi
|
||||||
type: string
|
type: string
|
||||||
type: object
|
type: object
|
||||||
domain:
|
|
||||||
default: your-company
|
|
||||||
examples:
|
|
||||||
- your-company
|
|
||||||
type: string
|
|
||||||
hpa:
|
|
||||||
default:
|
|
||||||
avg-cpu: 50
|
|
||||||
max-replicas: 5
|
|
||||||
min-replicas: 1
|
|
||||||
examples:
|
|
||||||
- avg-cpu: 50
|
|
||||||
max-replicas: 5
|
|
||||||
min-replicas: 1
|
|
||||||
properties:
|
|
||||||
avg-cpu:
|
|
||||||
default: 50
|
|
||||||
type: integer
|
|
||||||
max-replicas:
|
|
||||||
default: 5
|
|
||||||
type: integer
|
|
||||||
min-replicas:
|
|
||||||
default: 1
|
|
||||||
type: integer
|
|
||||||
type: object
|
|
||||||
ingress-class:
|
|
||||||
default: traefik
|
|
||||||
examples:
|
|
||||||
- traefik
|
|
||||||
type: string
|
|
||||||
openid-name:
|
|
||||||
default: vynil
|
|
||||||
examples:
|
|
||||||
- vynil
|
|
||||||
type: string
|
|
||||||
postgres:
|
postgres:
|
||||||
default:
|
default:
|
||||||
replicas: 1
|
replicas: 1
|
||||||
@@ -71,34 +45,140 @@ options:
|
|||||||
default: '14'
|
default: '14'
|
||||||
type: string
|
type: string
|
||||||
type: object
|
type: object
|
||||||
storage:
|
apps:
|
||||||
default:
|
default:
|
||||||
accessMode: ReadWriteOnce
|
audioplayer: false
|
||||||
size: 10Gi
|
bookmarks: false
|
||||||
|
bpm: false
|
||||||
|
calendar: false
|
||||||
|
collabora: false
|
||||||
|
contacts: false
|
||||||
|
deck: false
|
||||||
|
groupfolders: true
|
||||||
|
mindmap: false
|
||||||
|
music: false
|
||||||
|
notes: false
|
||||||
|
onlyoffice: false
|
||||||
|
passman: false
|
||||||
|
spreed: false
|
||||||
|
tables: false
|
||||||
|
tasks: false
|
||||||
|
texteditor: true
|
||||||
examples:
|
examples:
|
||||||
- accessMode: ReadWriteOnce
|
- audioplayer: false
|
||||||
size: 10Gi
|
bookmarks: false
|
||||||
|
bpm: false
|
||||||
|
calendar: false
|
||||||
|
collabora: false
|
||||||
|
contacts: false
|
||||||
|
deck: false
|
||||||
|
groupfolders: true
|
||||||
|
mindmap: false
|
||||||
|
music: false
|
||||||
|
notes: false
|
||||||
|
onlyoffice: false
|
||||||
|
passman: false
|
||||||
|
spreed: false
|
||||||
|
tables: false
|
||||||
|
tasks: false
|
||||||
|
texteditor: true
|
||||||
properties:
|
properties:
|
||||||
accessMode:
|
audioplayer:
|
||||||
default: ReadWriteOnce
|
default: false
|
||||||
enum:
|
type: boolean
|
||||||
- ReadWriteOnce
|
bookmarks:
|
||||||
- ReadOnlyMany
|
default: false
|
||||||
- ReadWriteMany
|
type: boolean
|
||||||
type: string
|
bpm:
|
||||||
size:
|
default: false
|
||||||
default: 10Gi
|
type: boolean
|
||||||
type: string
|
calendar:
|
||||||
|
default: false
|
||||||
|
type: boolean
|
||||||
|
collabora:
|
||||||
|
default: false
|
||||||
|
type: boolean
|
||||||
|
contacts:
|
||||||
|
default: false
|
||||||
|
type: boolean
|
||||||
|
deck:
|
||||||
|
default: false
|
||||||
|
type: boolean
|
||||||
|
groupfolders:
|
||||||
|
default: true
|
||||||
|
type: boolean
|
||||||
|
mindmap:
|
||||||
|
default: false
|
||||||
|
type: boolean
|
||||||
|
music:
|
||||||
|
default: false
|
||||||
|
type: boolean
|
||||||
|
notes:
|
||||||
|
default: false
|
||||||
|
type: boolean
|
||||||
|
onlyoffice:
|
||||||
|
default: false
|
||||||
|
type: boolean
|
||||||
|
passman:
|
||||||
|
default: false
|
||||||
|
type: boolean
|
||||||
|
spreed:
|
||||||
|
default: false
|
||||||
|
type: boolean
|
||||||
|
tables:
|
||||||
|
default: false
|
||||||
|
type: boolean
|
||||||
|
tasks:
|
||||||
|
default: false
|
||||||
|
type: boolean
|
||||||
|
texteditor:
|
||||||
|
default: true
|
||||||
|
type: boolean
|
||||||
type: object
|
type: object
|
||||||
|
hpa:
|
||||||
|
default:
|
||||||
|
avg-cpu: 50
|
||||||
|
max-replicas: 5
|
||||||
|
min-replicas: 1
|
||||||
|
examples:
|
||||||
|
- avg-cpu: 50
|
||||||
|
max-replicas: 5
|
||||||
|
min-replicas: 1
|
||||||
|
properties:
|
||||||
|
avg-cpu:
|
||||||
|
default: 50
|
||||||
|
type: integer
|
||||||
|
max-replicas:
|
||||||
|
default: 5
|
||||||
|
type: integer
|
||||||
|
min-replicas:
|
||||||
|
default: 1
|
||||||
|
type: integer
|
||||||
|
type: object
|
||||||
|
issuer:
|
||||||
|
default: letsencrypt-prod
|
||||||
|
examples:
|
||||||
|
- letsencrypt-prod
|
||||||
|
type: string
|
||||||
|
sub-domain:
|
||||||
|
default: files
|
||||||
|
examples:
|
||||||
|
- files
|
||||||
|
type: string
|
||||||
|
openid-name:
|
||||||
|
default: vynil
|
||||||
|
examples:
|
||||||
|
- vynil
|
||||||
|
type: string
|
||||||
domain-name:
|
domain-name:
|
||||||
default: your_company.com
|
default: your_company.com
|
||||||
examples:
|
examples:
|
||||||
- your_company.com
|
- your_company.com
|
||||||
type: string
|
type: string
|
||||||
issuer:
|
domain:
|
||||||
default: letsencrypt-prod
|
default: your-company
|
||||||
examples:
|
examples:
|
||||||
- letsencrypt-prod
|
- your-company
|
||||||
type: string
|
type: string
|
||||||
images:
|
images:
|
||||||
default:
|
default:
|
||||||
@@ -263,101 +343,6 @@ options:
|
|||||||
type: string
|
type: string
|
||||||
type: object
|
type: object
|
||||||
type: object
|
type: object
|
||||||
apps:
|
|
||||||
default:
|
|
||||||
audioplayer: false
|
|
||||||
bookmarks: false
|
|
||||||
bpm: false
|
|
||||||
calendar: false
|
|
||||||
collabora: false
|
|
||||||
contacts: false
|
|
||||||
deck: false
|
|
||||||
groupfolders: true
|
|
||||||
mindmap: false
|
|
||||||
music: false
|
|
||||||
notes: false
|
|
||||||
onlyoffice: false
|
|
||||||
passman: false
|
|
||||||
spreed: false
|
|
||||||
tables: false
|
|
||||||
tasks: false
|
|
||||||
texteditor: true
|
|
||||||
examples:
|
|
||||||
- audioplayer: false
|
|
||||||
bookmarks: false
|
|
||||||
bpm: false
|
|
||||||
calendar: false
|
|
||||||
collabora: false
|
|
||||||
contacts: false
|
|
||||||
deck: false
|
|
||||||
groupfolders: true
|
|
||||||
mindmap: false
|
|
||||||
music: false
|
|
||||||
notes: false
|
|
||||||
onlyoffice: false
|
|
||||||
passman: false
|
|
||||||
spreed: false
|
|
||||||
tables: false
|
|
||||||
tasks: false
|
|
||||||
texteditor: true
|
|
||||||
properties:
|
|
||||||
audioplayer:
|
|
||||||
default: false
|
|
||||||
type: boolean
|
|
||||||
bookmarks:
|
|
||||||
default: false
|
|
||||||
type: boolean
|
|
||||||
bpm:
|
|
||||||
default: false
|
|
||||||
type: boolean
|
|
||||||
calendar:
|
|
||||||
default: false
|
|
||||||
type: boolean
|
|
||||||
collabora:
|
|
||||||
default: false
|
|
||||||
type: boolean
|
|
||||||
contacts:
|
|
||||||
default: false
|
|
||||||
type: boolean
|
|
||||||
deck:
|
|
||||||
default: false
|
|
||||||
type: boolean
|
|
||||||
groupfolders:
|
|
||||||
default: true
|
|
||||||
type: boolean
|
|
||||||
mindmap:
|
|
||||||
default: false
|
|
||||||
type: boolean
|
|
||||||
music:
|
|
||||||
default: false
|
|
||||||
type: boolean
|
|
||||||
notes:
|
|
||||||
default: false
|
|
||||||
type: boolean
|
|
||||||
onlyoffice:
|
|
||||||
default: false
|
|
||||||
type: boolean
|
|
||||||
passman:
|
|
||||||
default: false
|
|
||||||
type: boolean
|
|
||||||
spreed:
|
|
||||||
default: false
|
|
||||||
type: boolean
|
|
||||||
tables:
|
|
||||||
default: false
|
|
||||||
type: boolean
|
|
||||||
tasks:
|
|
||||||
default: false
|
|
||||||
type: boolean
|
|
||||||
texteditor:
|
|
||||||
default: true
|
|
||||||
type: boolean
|
|
||||||
type: object
|
|
||||||
sub-domain:
|
|
||||||
default: files
|
|
||||||
examples:
|
|
||||||
- files
|
|
||||||
type: string
|
|
||||||
redis:
|
redis:
|
||||||
default:
|
default:
|
||||||
exporter:
|
exporter:
|
||||||
@@ -391,6 +376,21 @@ options:
|
|||||||
default: 2Gi
|
default: 2Gi
|
||||||
type: string
|
type: string
|
||||||
type: object
|
type: object
|
||||||
|
ingress-class:
|
||||||
|
default: traefik
|
||||||
|
examples:
|
||||||
|
- traefik
|
||||||
|
type: string
|
||||||
|
admin:
|
||||||
|
default:
|
||||||
|
name: nextcloud_admin
|
||||||
|
examples:
|
||||||
|
- name: nextcloud_admin
|
||||||
|
properties:
|
||||||
|
name:
|
||||||
|
default: nextcloud_admin
|
||||||
|
type: string
|
||||||
|
type: object
|
||||||
dependencies:
|
dependencies:
|
||||||
- dist: null
|
- dist: null
|
||||||
category: share
|
category: share
|
||||||
|
|||||||
@@ -78,6 +78,7 @@ resource "kubectl_manifest" "prj_pg" {
|
|||||||
metadata:
|
metadata:
|
||||||
name: "${var.instance}-${var.component}-pg"
|
name: "${var.instance}-${var.component}-pg"
|
||||||
namespace: "${var.namespace}"
|
namespace: "${var.namespace}"
|
||||||
|
labels: ${jsonencode(local.pg-labels)}
|
||||||
spec:
|
spec:
|
||||||
instances: ${var.postgres.replicas}
|
instances: ${var.postgres.replicas}
|
||||||
storage:
|
storage:
|
||||||
|
|||||||
@@ -40,7 +40,6 @@ data "kustomization_overlay" "data" {
|
|||||||
"AUTHENTIK_GEOIP=${var.geoip}",
|
"AUTHENTIK_GEOIP=${var.geoip}",
|
||||||
"AUTHENTIK_LOG_LEVEL=${var.loglevel}",
|
"AUTHENTIK_LOG_LEVEL=${var.loglevel}",
|
||||||
"AUTHENTIK_OUTPOSTS__CONTAINER_IMAGE_BASE=${var.image.registry}/${var.image.project}/%(type)s:%(version)s",
|
"AUTHENTIK_OUTPOSTS__CONTAINER_IMAGE_BASE=${var.image.registry}/${var.image.project}/%(type)s:%(version)s",
|
||||||
"AUTHENTIK_POSTGRESQL__HOST=${var.instance}-${var.component}.${var.namespace}.svc",
|
|
||||||
"AUTHENTIK_POSTGRESQL__NAME=${var.component}",
|
"AUTHENTIK_POSTGRESQL__NAME=${var.component}",
|
||||||
"AUTHENTIK_POSTGRESQL__PORT=5432",
|
"AUTHENTIK_POSTGRESQL__PORT=5432",
|
||||||
"AUTHENTIK_POSTGRESQL__USER=${var.component}",
|
"AUTHENTIK_POSTGRESQL__USER=${var.component}",
|
||||||
@@ -66,10 +65,12 @@ data "kustomization_overlay" "data" {
|
|||||||
image: "${var.image.registry}/${var.image.repository}:${var.image.tag}"
|
image: "${var.image.registry}/${var.image.repository}:${var.image.tag}"
|
||||||
imagePullPolicy: "${var.image.pullPolicy}"
|
imagePullPolicy: "${var.image.pullPolicy}"
|
||||||
env:
|
env:
|
||||||
|
- name: "AUTHENTIK_POSTGRESQL__HOST"
|
||||||
|
value: "${var.instance}-${var.component}-pg-rw.${var.namespace}.svc"
|
||||||
- name: AUTHENTIK_POSTGRESQL__PASSWORD
|
- name: AUTHENTIK_POSTGRESQL__PASSWORD
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: ${var.component}.${var.instance}-${var.component}.credentials.postgresql.acid.zalan.do
|
name: "${var.instance}-${var.component}-pg-app"
|
||||||
key: password
|
key: password
|
||||||
envFrom:
|
envFrom:
|
||||||
- secretRef:
|
- secretRef:
|
||||||
@@ -96,10 +97,12 @@ data "kustomization_overlay" "data" {
|
|||||||
image: "${var.image.registry}/${var.image.repository}:${var.image.tag}"
|
image: "${var.image.registry}/${var.image.repository}:${var.image.tag}"
|
||||||
imagePullPolicy: "${var.image.pullPolicy}"
|
imagePullPolicy: "${var.image.pullPolicy}"
|
||||||
env:
|
env:
|
||||||
|
- name: "AUTHENTIK_POSTGRESQL__HOST"
|
||||||
|
value: "${var.instance}-${var.component}-pg-rw.${var.namespace}.svc"
|
||||||
- name: AUTHENTIK_POSTGRESQL__PASSWORD
|
- name: AUTHENTIK_POSTGRESQL__PASSWORD
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: ${var.component}.${var.name}-${var.component}.credentials.postgresql.acid.zalan.do
|
name: "${var.instance}-${var.component}-pg-app"
|
||||||
key: password
|
key: password
|
||||||
envFrom:
|
envFrom:
|
||||||
- secretRef:
|
- secretRef:
|
||||||
|
|||||||
@@ -6,46 +6,16 @@ metadata:
|
|||||||
name: authentik
|
name: authentik
|
||||||
description: authentik is an open-source Identity Provider focused on flexibility and versatility
|
description: authentik is an open-source Identity Provider focused on flexibility and versatility
|
||||||
options:
|
options:
|
||||||
issuer:
|
admin:
|
||||||
default: letsencrypt-prod
|
|
||||||
examples:
|
|
||||||
- letsencrypt-prod
|
|
||||||
type: string
|
|
||||||
error_reporting:
|
|
||||||
default:
|
default:
|
||||||
enabled: false
|
email: auth-admin
|
||||||
environment: k8s
|
|
||||||
send_pii: false
|
|
||||||
examples:
|
examples:
|
||||||
- enabled: false
|
- email: auth-admin
|
||||||
environment: k8s
|
|
||||||
send_pii: false
|
|
||||||
properties:
|
properties:
|
||||||
enabled:
|
email:
|
||||||
default: false
|
default: auth-admin
|
||||||
type: boolean
|
|
||||||
environment:
|
|
||||||
default: k8s
|
|
||||||
type: string
|
type: string
|
||||||
send_pii:
|
|
||||||
default: false
|
|
||||||
type: boolean
|
|
||||||
type: object
|
type: object
|
||||||
loglevel:
|
|
||||||
default: info
|
|
||||||
examples:
|
|
||||||
- info
|
|
||||||
type: string
|
|
||||||
domain-name:
|
|
||||||
default: your_company.com
|
|
||||||
examples:
|
|
||||||
- your_company.com
|
|
||||||
type: string
|
|
||||||
ingress-class:
|
|
||||||
default: traefik
|
|
||||||
examples:
|
|
||||||
- traefik
|
|
||||||
type: string
|
|
||||||
email:
|
email:
|
||||||
default:
|
default:
|
||||||
port: 587
|
port: 587
|
||||||
@@ -71,26 +41,6 @@ options:
|
|||||||
default: false
|
default: false
|
||||||
type: boolean
|
type: boolean
|
||||||
type: object
|
type: object
|
||||||
geoip:
|
|
||||||
default: /geoip/GeoLite2-City.mmdb
|
|
||||||
examples:
|
|
||||||
- /geoip/GeoLite2-City.mmdb
|
|
||||||
type: string
|
|
||||||
sub-domain:
|
|
||||||
default: auth
|
|
||||||
examples:
|
|
||||||
- auth
|
|
||||||
type: string
|
|
||||||
admin:
|
|
||||||
default:
|
|
||||||
email: auth-admin
|
|
||||||
examples:
|
|
||||||
- email: auth-admin
|
|
||||||
properties:
|
|
||||||
email:
|
|
||||||
default: auth-admin
|
|
||||||
type: string
|
|
||||||
type: object
|
|
||||||
postgres:
|
postgres:
|
||||||
default:
|
default:
|
||||||
cleanlogs:
|
cleanlogs:
|
||||||
@@ -129,11 +79,61 @@ options:
|
|||||||
default: '14'
|
default: '14'
|
||||||
type: string
|
type: string
|
||||||
type: object
|
type: object
|
||||||
|
image:
|
||||||
|
default:
|
||||||
|
project: goauthentik
|
||||||
|
pullPolicy: IfNotPresent
|
||||||
|
registry: ghcr.io
|
||||||
|
repository: goauthentik/server
|
||||||
|
tag: 2023.5.4
|
||||||
|
examples:
|
||||||
|
- project: goauthentik
|
||||||
|
pullPolicy: IfNotPresent
|
||||||
|
registry: ghcr.io
|
||||||
|
repository: goauthentik/server
|
||||||
|
tag: 2023.5.4
|
||||||
|
properties:
|
||||||
|
project:
|
||||||
|
default: goauthentik
|
||||||
|
type: string
|
||||||
|
pullPolicy:
|
||||||
|
default: IfNotPresent
|
||||||
|
type: string
|
||||||
|
registry:
|
||||||
|
default: ghcr.io
|
||||||
|
type: string
|
||||||
|
repository:
|
||||||
|
default: goauthentik/server
|
||||||
|
type: string
|
||||||
|
tag:
|
||||||
|
default: 2023.5.4
|
||||||
|
type: string
|
||||||
|
type: object
|
||||||
domain:
|
domain:
|
||||||
default: your-company
|
default: your-company
|
||||||
examples:
|
examples:
|
||||||
- your-company
|
- your-company
|
||||||
type: string
|
type: string
|
||||||
|
domain-name:
|
||||||
|
default: your_company.com
|
||||||
|
examples:
|
||||||
|
- your_company.com
|
||||||
|
type: string
|
||||||
|
issuer:
|
||||||
|
default: letsencrypt-prod
|
||||||
|
examples:
|
||||||
|
- letsencrypt-prod
|
||||||
|
type: string
|
||||||
|
sub-domain:
|
||||||
|
default: auth
|
||||||
|
examples:
|
||||||
|
- auth
|
||||||
|
type: string
|
||||||
|
loglevel:
|
||||||
|
default: info
|
||||||
|
examples:
|
||||||
|
- info
|
||||||
|
type: string
|
||||||
redis:
|
redis:
|
||||||
default:
|
default:
|
||||||
exporter:
|
exporter:
|
||||||
@@ -167,36 +167,36 @@ options:
|
|||||||
default: 8Gi
|
default: 8Gi
|
||||||
type: string
|
type: string
|
||||||
type: object
|
type: object
|
||||||
image:
|
error_reporting:
|
||||||
default:
|
default:
|
||||||
project: goauthentik
|
enabled: false
|
||||||
pullPolicy: IfNotPresent
|
environment: k8s
|
||||||
registry: ghcr.io
|
send_pii: false
|
||||||
repository: goauthentik/server
|
|
||||||
tag: 2023.5.4
|
|
||||||
examples:
|
examples:
|
||||||
- project: goauthentik
|
- enabled: false
|
||||||
pullPolicy: IfNotPresent
|
environment: k8s
|
||||||
registry: ghcr.io
|
send_pii: false
|
||||||
repository: goauthentik/server
|
|
||||||
tag: 2023.5.4
|
|
||||||
properties:
|
properties:
|
||||||
project:
|
enabled:
|
||||||
default: goauthentik
|
default: false
|
||||||
type: string
|
type: boolean
|
||||||
pullPolicy:
|
environment:
|
||||||
default: IfNotPresent
|
default: k8s
|
||||||
type: string
|
|
||||||
registry:
|
|
||||||
default: ghcr.io
|
|
||||||
type: string
|
|
||||||
repository:
|
|
||||||
default: goauthentik/server
|
|
||||||
type: string
|
|
||||||
tag:
|
|
||||||
default: 2023.5.4
|
|
||||||
type: string
|
type: string
|
||||||
|
send_pii:
|
||||||
|
default: false
|
||||||
|
type: boolean
|
||||||
type: object
|
type: object
|
||||||
|
ingress-class:
|
||||||
|
default: traefik
|
||||||
|
examples:
|
||||||
|
- traefik
|
||||||
|
type: string
|
||||||
|
geoip:
|
||||||
|
default: /geoip/GeoLite2-City.mmdb
|
||||||
|
examples:
|
||||||
|
- /geoip/GeoLite2-City.mmdb
|
||||||
|
type: string
|
||||||
dependencies:
|
dependencies:
|
||||||
- dist: null
|
- dist: null
|
||||||
category: core
|
category: core
|
||||||
@@ -212,7 +212,7 @@ dependencies:
|
|||||||
component: traefik
|
component: traefik
|
||||||
- dist: null
|
- dist: null
|
||||||
category: dbo
|
category: dbo
|
||||||
component: postgresql
|
component: pg
|
||||||
- dist: null
|
- dist: null
|
||||||
category: dbo
|
category: dbo
|
||||||
component: redis
|
component: redis
|
||||||
@@ -223,3 +223,4 @@ providers:
|
|||||||
postgresql: null
|
postgresql: null
|
||||||
restapi: null
|
restapi: null
|
||||||
http: null
|
http: null
|
||||||
|
tfaddtype: null
|
||||||
|
|||||||
@@ -1,3 +1,14 @@
|
|||||||
|
locals {
|
||||||
|
pg-labels = merge(local.common-labels, {
|
||||||
|
"app.kubernetes.io/component" = "pg"
|
||||||
|
})
|
||||||
|
pool-labels = merge(local.common-labels, {
|
||||||
|
"app.kubernetes.io/component" = "pg-pool"
|
||||||
|
})
|
||||||
|
postgres-labels = merge(local.common-labels, {
|
||||||
|
"app.kubernetes.io/component" = "postgresql"
|
||||||
|
})
|
||||||
|
}
|
||||||
resource "kubectl_manifest" "authentik_postgresql" {
|
resource "kubectl_manifest" "authentik_postgresql" {
|
||||||
yaml_body = <<-EOF
|
yaml_body = <<-EOF
|
||||||
apiVersion: "acid.zalan.do/v1"
|
apiVersion: "acid.zalan.do/v1"
|
||||||
@@ -5,7 +16,7 @@ resource "kubectl_manifest" "authentik_postgresql" {
|
|||||||
metadata:
|
metadata:
|
||||||
name: "${var.instance}-${var.component}"
|
name: "${var.instance}-${var.component}"
|
||||||
namespace: "${var.namespace}"
|
namespace: "${var.namespace}"
|
||||||
labels: ${jsonencode(local.common-labels)}
|
labels: ${jsonencode(local.postgres-labels)}
|
||||||
spec:
|
spec:
|
||||||
databases:
|
databases:
|
||||||
${var.component}: "${var.component}"
|
${var.component}: "${var.component}"
|
||||||
@@ -89,3 +100,99 @@ resource "kubectl_manifest" "authentik_cleanup_logs_job" {
|
|||||||
successfulJobsHistoryLimit: 3
|
successfulJobsHistoryLimit: 3
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
|
resource "kubectl_manifest" "prj_pre_migrate_pg" {
|
||||||
|
yaml_body = <<-EOF
|
||||||
|
apiVersion: batch/v1
|
||||||
|
kind: Job
|
||||||
|
metadata:
|
||||||
|
name: "${var.instance}-remove-zalando-extensions"
|
||||||
|
namespace: "${var.namespace}"
|
||||||
|
spec:
|
||||||
|
template:
|
||||||
|
spec:
|
||||||
|
restartPolicy: OnFailure
|
||||||
|
containers:
|
||||||
|
- name: clean
|
||||||
|
image: docker.io/postgres:15.3-bookworm
|
||||||
|
imagePullPolicy: IfNotPresent
|
||||||
|
env:
|
||||||
|
- name: USERNAME
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
key: username
|
||||||
|
name: postgres.${var.instance}-${var.component}.credentials.postgresql.acid.zalan.do
|
||||||
|
- name: PASSWORD
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
key: password
|
||||||
|
name: postgres.${var.instance}-${var.component}.credentials.postgresql.acid.zalan.do
|
||||||
|
- name: DBURL
|
||||||
|
value: "${var.instance}-${var.component}"
|
||||||
|
- name: DBNAME
|
||||||
|
value: "${var.component}"
|
||||||
|
command:
|
||||||
|
- /bin/bash
|
||||||
|
- "-c"
|
||||||
|
- "echo -ne 'drop view if exists metric_helpers.pg_stat_statements;\ndrop function if exists metric_helpers.pg_stat_statements;\nDROP EXTENSION IF EXISTS pg_stat_statements;\nDROP EXTENSION IF EXISTS pg_stat_kcache;\nDROP EXTENSION IF EXISTS set_user;\n'| PGPASSWORD=\"$PASSWORD\" psql -U $USERNAME -d $DBNAME -h $DBURL"
|
||||||
|
EOF
|
||||||
|
}
|
||||||
|
|
||||||
|
resource "kubectl_manifest" "prj_pg" {
|
||||||
|
depends_on = [kubectl_manifest.prj_pre_migrate_pg]
|
||||||
|
yaml_body = <<-EOF
|
||||||
|
apiVersion: postgresql.cnpg.io/v1
|
||||||
|
kind: Cluster
|
||||||
|
metadata:
|
||||||
|
name: "${var.instance}-${var.component}-pg"
|
||||||
|
namespace: "${var.namespace}"
|
||||||
|
labels: ${jsonencode(local.pg-labels)}
|
||||||
|
spec:
|
||||||
|
instances: ${var.postgres.replicas}
|
||||||
|
storage:
|
||||||
|
size: "${var.postgres.storage}"
|
||||||
|
bootstrap:
|
||||||
|
initdb:
|
||||||
|
database: ${var.component}
|
||||||
|
owner: ${var.component}
|
||||||
|
import:
|
||||||
|
type: microservice
|
||||||
|
databases:
|
||||||
|
- ${var.component}
|
||||||
|
source:
|
||||||
|
externalCluster: "${var.instance}-${var.component}"
|
||||||
|
externalClusters:
|
||||||
|
- name: "${var.instance}-${var.component}"
|
||||||
|
connectionParameters:
|
||||||
|
host: "${var.instance}-${var.component}"
|
||||||
|
user: postgres
|
||||||
|
dbname: postgres
|
||||||
|
sslmode: require
|
||||||
|
password:
|
||||||
|
name: "postgres.${var.instance}-${var.component}.credentials.postgresql.acid.zalan.do"
|
||||||
|
key: password
|
||||||
|
EOF
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
resource "kubectl_manifest" "prj_pg_pool" {
|
||||||
|
depends_on = [kubectl_manifest.prj_pg]
|
||||||
|
yaml_body = <<-EOF
|
||||||
|
apiVersion: postgresql.cnpg.io/v1
|
||||||
|
kind: Pooler
|
||||||
|
metadata:
|
||||||
|
name: "${var.instance}-${var.component}-pool"
|
||||||
|
namespace: "${var.namespace}"
|
||||||
|
labels: ${jsonencode(local.pool-labels)}
|
||||||
|
spec:
|
||||||
|
cluster:
|
||||||
|
name: "${var.instance}-${var.component}-pg"
|
||||||
|
instances: 1
|
||||||
|
type: rw
|
||||||
|
pgbouncer:
|
||||||
|
poolMode: session
|
||||||
|
parameters:
|
||||||
|
max_client_conn: "1000"
|
||||||
|
default_pool_size: "10"
|
||||||
|
EOF
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
---
|
||||||
# Source: authentik/charts/serviceAccount/templates/service-account.yaml
|
# Source: authentik/charts/serviceAccount/templates/service-account.yaml
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: ServiceAccount
|
kind: ServiceAccount
|
||||||
|
|||||||
Reference in New Issue
Block a user