feat: deploy per-app Crunchy Postgres clusters

This commit is contained in:
JJGadgets
2023-11-29 09:20:39 +08:00
parent 6f33d2f544
commit be04dbf34d
7 changed files with 96 additions and 11 deletions

View File

@@ -19,14 +19,14 @@ spec:
path: ./kube/deploy/core/db/pg/clusters/template
dependsOn:
- name: 1-core-db-pg-app
- name: 1-core-storage-rook-ceph-cluster
- name: 1-core-storage-democratic-csi-local-hostpath
postBuild:
substitute:
PG_APP_NAME: &app "atuin"
PG_APP_NS: *app
PG_DB_NAME: *app
PG_DB_USER: *app
PG_REPLICAS: "2"
PG_SC: "block"
PG_REPLICAS: "3"
PG_SC: "local"
PG_CONFIG_VERSION: "15.2-11"
PG_CONFIG_SIZE: "20Gi"
PG_CONFIG_SIZE: "20Gi"

View File

@@ -21,6 +21,7 @@ spec:
path: ./kube/deploy/core/db/pg/clusters/template
dependsOn:
- name: 1-core-db-pg-app
- name: 1-core-storage-democratic-csi-local-hostpath
postBuild:
substitute:
PG_APP_NAME: &app "firefly"
@@ -28,7 +29,7 @@ spec:
PG_DB_NAME: *app
PG_DB_USER: *app
PG_REPLICAS: "3"
PG_SC: "block"
PG_SC: "local"
PG_CONFIG_VERSION: "15.2-11"
PG_CONFIG_SIZE: "20Gi"
# healthChecks:
@@ -39,4 +40,4 @@ spec:
# - name: pg-firefly
# namespace: firefly
# kind: Cluster
# apiVersion: postgresql.cnpg.io/v1
# apiVersion: postgresql.cnpg.io/v1

View File

@@ -9,3 +9,24 @@ spec:
dependsOn:
# - name: 1-core-db-pg-clusters-default
- name: 1-core-ingress-nginx-app
---
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: joplin-db
namespace: flux-system
spec:
path: ./kube/deploy/core/db/pg/clusters/template
dependsOn:
- name: 1-core-db-pg-app
- name: 1-core-storage-democratic-csi-local-hostpath
postBuild:
substitute:
PG_APP_NAME: &app "joplin"
PG_APP_NS: *app
PG_DB_NAME: *app
PG_DB_USER: *app
PG_REPLICAS: "3"
PG_SC: "local"
PG_CONFIG_VERSION: "15.2-11"
PG_CONFIG_SIZE: "20Gi"

View File

@@ -11,3 +11,24 @@ spec:
dependsOn:
- name: 1-core-ingress-nginx-app
- name: 1-core-db-pg-clusters-default
---
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: miniflux-db
namespace: flux-system
spec:
path: ./kube/deploy/core/db/pg/clusters/template
dependsOn:
- name: 1-core-db-pg-app
- name: 1-core-storage-democratic-csi-local-hostpath
postBuild:
substitute:
PG_APP_NAME: &app "miniflux"
PG_APP_NS: *app
PG_DB_NAME: *app
PG_DB_USER: *app
PG_REPLICAS: "3"
PG_SC: "local"
PG_CONFIG_VERSION: "15.2-11"
PG_CONFIG_SIZE: "20Gi"

View File

@@ -8,4 +8,25 @@ spec:
path: ./kube/deploy/apps/piped/app
dependsOn:
- name: 1-core-ingress-nginx-app
- name: 1-core-db-pg-clusters-default
- name: 1-core-db-pg-clusters-default
---
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: piped-db
namespace: flux-system
spec:
path: ./kube/deploy/core/db/pg/clusters/template
dependsOn:
- name: 1-core-db-pg-app
- name: 1-core-storage-democratic-csi-local-hostpath
postBuild:
substitute:
PG_APP_NAME: &app "piped"
PG_APP_NS: *app
PG_DB_NAME: *app
PG_DB_USER: *app
PG_REPLICAS: "3"
PG_SC: "local"
PG_CONFIG_VERSION: "15.2-11"
PG_CONFIG_SIZE: "20Gi"

View File

@@ -13,3 +13,24 @@ spec:
# - name: 1-core-db-pg-clusters-default
- name: 1-core-ingress-nginx-app
#- name: 1-core-storage-volsync-app
---
apiVersion: kustomize.toolkit.fluxcd.io/v1
kind: Kustomization
metadata:
name: soft-serve-db
namespace: flux-system
spec:
path: ./kube/deploy/core/db/pg/clusters/template
dependsOn:
- name: 1-core-db-pg-app
- name: 1-core-storage-democratic-csi-local-hostpath
postBuild:
substitute:
PG_APP_NAME: &app "soft-serve"
PG_APP_NS: *app
PG_DB_NAME: *app
PG_DB_USER: *app
PG_REPLICAS: "3"
PG_SC: "local"
PG_CONFIG_VERSION: "15.2-11"
PG_CONFIG_SIZE: "20Gi"

View File

@@ -18,14 +18,14 @@ spec:
path: ./kube/deploy/core/db/pg/clusters/template
dependsOn:
- name: 1-core-db-pg-app
- name: 1-core-storage-rook-ceph-cluster
- name: 1-core-storage-democratic-csi-local-hostpath
postBuild:
substitute:
PG_APP_NAME: &app "zipline"
PG_APP_NS: *app
PG_DB_NAME: *app
PG_DB_USER: *app
PG_REPLICAS: "2"
PG_SC: "block"
PG_REPLICAS: "3"
PG_SC: "local"
PG_CONFIG_VERSION: "15.2-11"
PG_CONFIG_SIZE: "10Gi"
PG_CONFIG_SIZE: "10Gi"