fix
This commit is contained in:
@@ -19,9 +19,9 @@ locals {
|
|||||||
}
|
}
|
||||||
|
|
||||||
data "kubernetes_secret_v1" "postgresql_password" {
|
data "kubernetes_secret_v1" "postgresql_password" {
|
||||||
depends_on = [kubectl_manifest.gitea_postgresql]
|
depends_on = [kubectl_manifest.prj_pg]
|
||||||
metadata {
|
metadata {
|
||||||
name = "${var.component}.${var.instance}-${var.component}.credentials.postgresql.acid.zalan.do"
|
name = "${var.instance}-${var.component}-pg-app"
|
||||||
namespace = var.namespace
|
namespace = var.namespace
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,61 +9,21 @@ 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:
|
||||||
load-balancer:
|
timezone:
|
||||||
default:
|
default: Europe/Paris
|
||||||
ip: ''
|
|
||||||
examples:
|
examples:
|
||||||
- ip: ''
|
- Europe/Paris
|
||||||
properties:
|
|
||||||
ip:
|
|
||||||
default: ''
|
|
||||||
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
|
|
||||||
release:
|
|
||||||
default: 8.3.0
|
|
||||||
examples:
|
|
||||||
- 8.3.0
|
|
||||||
type: string
|
type: string
|
||||||
theme:
|
sub-domain:
|
||||||
default: gitea-modern
|
default: git
|
||||||
examples:
|
examples:
|
||||||
- gitea-modern
|
- git
|
||||||
type: string
|
type: string
|
||||||
|
ssh-port:
|
||||||
|
default: 2222
|
||||||
|
examples:
|
||||||
|
- 2222
|
||||||
|
type: integer
|
||||||
webhook:
|
webhook:
|
||||||
default:
|
default:
|
||||||
allowed-hosts: private
|
allowed-hosts: private
|
||||||
@@ -79,46 +39,11 @@ options:
|
|||||||
default: false
|
default: false
|
||||||
type: boolean
|
type: boolean
|
||||||
type: object
|
type: object
|
||||||
volume:
|
release:
|
||||||
default:
|
default: 8.3.0
|
||||||
size: 10Gi
|
|
||||||
examples:
|
examples:
|
||||||
- size: 10Gi
|
- 8.3.0
|
||||||
properties:
|
|
||||||
size:
|
|
||||||
default: 10Gi
|
|
||||||
type: string
|
|
||||||
type: object
|
|
||||||
timezone:
|
|
||||||
default: Europe/Paris
|
|
||||||
examples:
|
|
||||||
- Europe/Paris
|
|
||||||
type: string
|
type: string
|
||||||
default-branch:
|
|
||||||
default: main
|
|
||||||
examples:
|
|
||||||
- main
|
|
||||||
type: string
|
|
||||||
issuer:
|
|
||||||
default: letsencrypt-prod
|
|
||||||
examples:
|
|
||||||
- letsencrypt-prod
|
|
||||||
type: string
|
|
||||||
ssh-port:
|
|
||||||
default: 2222
|
|
||||||
examples:
|
|
||||||
- 2222
|
|
||||||
type: integer
|
|
||||||
domain-name:
|
|
||||||
default: your_company.com
|
|
||||||
examples:
|
|
||||||
- your_company.com
|
|
||||||
type: string
|
|
||||||
replicas:
|
|
||||||
default: 1
|
|
||||||
examples:
|
|
||||||
- 1
|
|
||||||
type: integer
|
|
||||||
images:
|
images:
|
||||||
default:
|
default:
|
||||||
gitea:
|
gitea:
|
||||||
@@ -182,6 +107,66 @@ options:
|
|||||||
type: string
|
type: string
|
||||||
type: object
|
type: object
|
||||||
type: object
|
type: object
|
||||||
|
ingress-class:
|
||||||
|
default: traefik
|
||||||
|
examples:
|
||||||
|
- traefik
|
||||||
|
type: string
|
||||||
|
replicas:
|
||||||
|
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:
|
||||||
|
size: 10Gi
|
||||||
|
examples:
|
||||||
|
- size: 10Gi
|
||||||
|
properties:
|
||||||
|
size:
|
||||||
|
default: 10Gi
|
||||||
|
type: string
|
||||||
|
type: object
|
||||||
|
load-balancer:
|
||||||
|
default:
|
||||||
|
ip: ''
|
||||||
|
examples:
|
||||||
|
- ip: ''
|
||||||
|
properties:
|
||||||
|
ip:
|
||||||
|
default: ''
|
||||||
|
type: string
|
||||||
|
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:
|
push-create:
|
||||||
default:
|
default:
|
||||||
org: 'true'
|
org: 'true'
|
||||||
@@ -202,26 +187,41 @@ options:
|
|||||||
default: 'true'
|
default: 'true'
|
||||||
type: string
|
type: string
|
||||||
type: object
|
type: object
|
||||||
domain:
|
admin:
|
||||||
default: your-company
|
default:
|
||||||
|
email: git-admin@git.your_company.com
|
||||||
|
name: gitea_admin
|
||||||
examples:
|
examples:
|
||||||
- your-company
|
- email: git-admin@git.your_company.com
|
||||||
type: string
|
name: gitea_admin
|
||||||
ingress-class:
|
properties:
|
||||||
default: traefik
|
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:
|
examples:
|
||||||
- traefik
|
- replicas: 1
|
||||||
type: string
|
storage: 10Gi
|
||||||
sub-domain:
|
version: '14'
|
||||||
default: git
|
properties:
|
||||||
examples:
|
replicas:
|
||||||
- git
|
default: 1
|
||||||
type: string
|
type: integer
|
||||||
disable-registration:
|
storage:
|
||||||
default: true
|
default: 10Gi
|
||||||
examples:
|
type: string
|
||||||
- true
|
version:
|
||||||
type: boolean
|
default: '14'
|
||||||
|
type: string
|
||||||
|
type: object
|
||||||
dependencies:
|
dependencies:
|
||||||
- dist: null
|
- dist: null
|
||||||
category: share
|
category: share
|
||||||
@@ -231,7 +231,7 @@ dependencies:
|
|||||||
component: secret-generator
|
component: secret-generator
|
||||||
- dist: null
|
- dist: null
|
||||||
category: dbo
|
category: dbo
|
||||||
component: postgresql
|
component: pg
|
||||||
providers:
|
providers:
|
||||||
kubernetes: true
|
kubernetes: true
|
||||||
authentik: true
|
authentik: true
|
||||||
|
|||||||
@@ -17,11 +17,10 @@ HOST=gitea-memcached.${var.namespace}.svc:11211
|
|||||||
EOF
|
EOF
|
||||||
database = <<-EOF
|
database = <<-EOF
|
||||||
DB_TYPE=postgres
|
DB_TYPE=postgres
|
||||||
HOST=${var.instance}-${var.component}.${var.namespace}.svc:5432
|
HOST=${var.instance}-${var.component}-pg-rw.${var.namespace}.svc:5432
|
||||||
NAME=${var.component}
|
NAME=${var.component}
|
||||||
PASSWD=${data.kubernetes_secret_v1.postgresql_password.data["password"]}
|
PASSWD=${data.kubernetes_secret_v1.postgresql_password.data["password"]}
|
||||||
USER=${data.kubernetes_secret_v1.postgresql_password.data["username"]}
|
USER=${data.kubernetes_secret_v1.postgresql_password.data["username"]}
|
||||||
SSL_MODE=require
|
|
||||||
EOF
|
EOF
|
||||||
repository = <<-EOF
|
repository = <<-EOF
|
||||||
DEFAULT_BRANCH=${var.default-branch}
|
DEFAULT_BRANCH=${var.default-branch}
|
||||||
|
|||||||
@@ -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" "gitea_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,75 @@ resource "kubectl_manifest" "gitea_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}"
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|||||||
@@ -6,111 +6,100 @@ metadata:
|
|||||||
name: nextcloud
|
name: nextcloud
|
||||||
description: null
|
description: null
|
||||||
options:
|
options:
|
||||||
|
admin:
|
||||||
|
default:
|
||||||
|
name: nextcloud_admin
|
||||||
|
examples:
|
||||||
|
- name: nextcloud_admin
|
||||||
|
properties:
|
||||||
|
name:
|
||||||
|
default: nextcloud_admin
|
||||||
|
type: string
|
||||||
|
type: object
|
||||||
domain:
|
domain:
|
||||||
default: your-company
|
default: your-company
|
||||||
examples:
|
examples:
|
||||||
- your-company
|
- your-company
|
||||||
type: string
|
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:
|
ingress-class:
|
||||||
default: traefik
|
default: traefik
|
||||||
examples:
|
examples:
|
||||||
- traefik
|
- traefik
|
||||||
type: string
|
type: string
|
||||||
sub-domain:
|
openid-name:
|
||||||
default: files
|
default: vynil
|
||||||
examples:
|
examples:
|
||||||
- files
|
- vynil
|
||||||
type: string
|
type: string
|
||||||
apps:
|
postgres:
|
||||||
default:
|
default:
|
||||||
audioplayer: false
|
replicas: 1
|
||||||
bookmarks: false
|
storage: 5Gi
|
||||||
bpm: false
|
version: '14'
|
||||||
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:
|
||||||
- audioplayer: false
|
- replicas: 1
|
||||||
bookmarks: false
|
storage: 5Gi
|
||||||
bpm: false
|
version: '14'
|
||||||
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:
|
||||||
audioplayer:
|
replicas:
|
||||||
default: false
|
default: 1
|
||||||
type: boolean
|
type: integer
|
||||||
bookmarks:
|
storage:
|
||||||
default: false
|
default: 5Gi
|
||||||
type: boolean
|
type: string
|
||||||
bpm:
|
version:
|
||||||
default: false
|
default: '14'
|
||||||
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
|
||||||
|
storage:
|
||||||
|
default:
|
||||||
|
accessMode: ReadWriteOnce
|
||||||
|
size: 10Gi
|
||||||
|
examples:
|
||||||
|
- accessMode: ReadWriteOnce
|
||||||
|
size: 10Gi
|
||||||
|
properties:
|
||||||
|
accessMode:
|
||||||
|
default: ReadWriteOnce
|
||||||
|
enum:
|
||||||
|
- ReadWriteOnce
|
||||||
|
- ReadOnlyMany
|
||||||
|
- ReadWriteMany
|
||||||
|
type: string
|
||||||
|
size:
|
||||||
|
default: 10Gi
|
||||||
|
type: string
|
||||||
|
type: object
|
||||||
|
domain-name:
|
||||||
|
default: your_company.com
|
||||||
|
examples:
|
||||||
|
- your_company.com
|
||||||
|
type: string
|
||||||
|
issuer:
|
||||||
|
default: letsencrypt-prod
|
||||||
|
examples:
|
||||||
|
- letsencrypt-prod
|
||||||
|
type: string
|
||||||
images:
|
images:
|
||||||
default:
|
default:
|
||||||
collabora:
|
collabora:
|
||||||
@@ -274,26 +263,101 @@ options:
|
|||||||
type: string
|
type: string
|
||||||
type: object
|
type: object
|
||||||
type: object
|
type: object
|
||||||
postgres:
|
apps:
|
||||||
default:
|
default:
|
||||||
replicas: 1
|
audioplayer: false
|
||||||
storage: 5Gi
|
bookmarks: false
|
||||||
version: '14'
|
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:
|
||||||
- replicas: 1
|
- audioplayer: false
|
||||||
storage: 5Gi
|
bookmarks: false
|
||||||
version: '14'
|
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:
|
||||||
replicas:
|
audioplayer:
|
||||||
default: 1
|
default: false
|
||||||
type: integer
|
type: boolean
|
||||||
storage:
|
bookmarks:
|
||||||
default: 5Gi
|
default: false
|
||||||
type: string
|
type: boolean
|
||||||
version:
|
bpm:
|
||||||
default: '14'
|
default: false
|
||||||
type: string
|
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
|
type: object
|
||||||
|
sub-domain:
|
||||||
|
default: files
|
||||||
|
examples:
|
||||||
|
- files
|
||||||
|
type: string
|
||||||
redis:
|
redis:
|
||||||
default:
|
default:
|
||||||
exporter:
|
exporter:
|
||||||
@@ -327,71 +391,16 @@ options:
|
|||||||
default: 2Gi
|
default: 2Gi
|
||||||
type: string
|
type: string
|
||||||
type: object
|
type: object
|
||||||
hpa:
|
dependencies:
|
||||||
default:
|
- dist: null
|
||||||
avg-cpu: 50
|
category: share
|
||||||
max-replicas: 5
|
component: authentik-ldap
|
||||||
min-replicas: 1
|
- dist: null
|
||||||
examples:
|
category: core
|
||||||
- avg-cpu: 50
|
component: secret-generator
|
||||||
max-replicas: 5
|
- dist: null
|
||||||
min-replicas: 1
|
category: dbo
|
||||||
properties:
|
component: pg
|
||||||
avg-cpu:
|
|
||||||
default: 50
|
|
||||||
type: integer
|
|
||||||
max-replicas:
|
|
||||||
default: 5
|
|
||||||
type: integer
|
|
||||||
min-replicas:
|
|
||||||
default: 1
|
|
||||||
type: integer
|
|
||||||
type: object
|
|
||||||
domain-name:
|
|
||||||
default: your_company.com
|
|
||||||
examples:
|
|
||||||
- your_company.com
|
|
||||||
type: string
|
|
||||||
admin:
|
|
||||||
default:
|
|
||||||
name: nextcloud_admin
|
|
||||||
examples:
|
|
||||||
- name: nextcloud_admin
|
|
||||||
properties:
|
|
||||||
name:
|
|
||||||
default: nextcloud_admin
|
|
||||||
type: string
|
|
||||||
type: object
|
|
||||||
issuer:
|
|
||||||
default: letsencrypt-prod
|
|
||||||
examples:
|
|
||||||
- letsencrypt-prod
|
|
||||||
type: string
|
|
||||||
storage:
|
|
||||||
default:
|
|
||||||
accessMode: ReadWriteOnce
|
|
||||||
size: 10Gi
|
|
||||||
examples:
|
|
||||||
- accessMode: ReadWriteOnce
|
|
||||||
size: 10Gi
|
|
||||||
properties:
|
|
||||||
accessMode:
|
|
||||||
default: ReadWriteOnce
|
|
||||||
enum:
|
|
||||||
- ReadWriteOnce
|
|
||||||
- ReadOnlyMany
|
|
||||||
- ReadWriteMany
|
|
||||||
type: string
|
|
||||||
size:
|
|
||||||
default: 10Gi
|
|
||||||
type: string
|
|
||||||
type: object
|
|
||||||
openid-name:
|
|
||||||
default: vynil
|
|
||||||
examples:
|
|
||||||
- vynil
|
|
||||||
type: string
|
|
||||||
dependencies: []
|
|
||||||
providers:
|
providers:
|
||||||
kubernetes: true
|
kubernetes: true
|
||||||
authentik: true
|
authentik: true
|
||||||
|
|||||||
@@ -32,7 +32,46 @@ resource "kubectl_manifest" "prj_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" {
|
resource "kubectl_manifest" "prj_pg" {
|
||||||
|
depends_on = [kubectl_manifest.prj_pre_migrate_pg]
|
||||||
yaml_body = <<-EOF
|
yaml_body = <<-EOF
|
||||||
apiVersion: postgresql.cnpg.io/v1
|
apiVersion: postgresql.cnpg.io/v1
|
||||||
kind: Cluster
|
kind: Cluster
|
||||||
|
|||||||
Reference in New Issue
Block a user