feat: add postgresql

This commit is contained in:
auricom
2021-04-20 22:20:26 +02:00
parent a90feac07d
commit ec80dee8cd
6 changed files with 164 additions and 90 deletions

View File

@@ -9,6 +9,7 @@ resources:
- joplin-server - joplin-server
- pgadmin - pgadmin
- pgbackups - pgbackups
- postgresql
- recipes - recipes
- resilio-sync - resilio-sync
- searx - searx

View File

@@ -0,0 +1,36 @@
---
apiVersion: helm.toolkit.fluxcd.io/v2beta1
kind: HelmRelease
metadata:
name: postgresql-ha
namespace: data
spec:
interval: 5m
chart:
spec:
# renovate: registryUrl=https://charts.bitnami.com/bitnami/
chart: postgresql
version: 10.3.18
sourceRef:
kind: HelmRepository
name: bitnami-charts
namespace: flux-system
interval: 5m
values:
image:
registry: docker.io
repository: bitnami/postgresql
tag: 13.2.0
pullPolicy: IfNotPresent
postgresql:
## PostgreSQL configuration parameters
##
username: postgres
password: ${SECRET_POSTGRESQL_POSTGRES_PASSWORD}
# database:
## Persistence parameters
##
persistence:
enabled: true
existingClaim: postgresql

View File

@@ -0,0 +1,5 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- helm-release.yaml
- volume.yaml

View File

@@ -0,0 +1,15 @@
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: postgresql
namespace: data
labels:
kasten-io/snapshots: "enable"
spec:
accessModes:
- ReadWriteOnce
storageClassName: rook-ceph-block
resources:
requests:
storage: 50Gi

View File

@@ -71,10 +71,10 @@ sops:
gcp_kms: [] gcp_kms: []
azure_kv: [] azure_kv: []
hc_vault: [] hc_vault: []
lastmodified: '2021-04-19T23:45:52Z' lastmodified: "2021-04-19T23:45:52Z"
mac: ENC[AES256_GCM,data:G8xxjJEynmhFwLpbJu8Z0bR0TBTpzMSO/FJTucjahmQOJfQFa3r0T7h7g8J2GGDrUvCP8oJsZ/A/3+nrn7I+T2egk6hZyF+vworb3yc/ULRe+pVNzm0yL78ZuqfFLjs7BkxWdPm2ztjtcRkqbLFfh4f0rqKVQ1iisiJGW/PGm8g=,iv:FclyTb+Y8fGMgRAVEZbCZied1Cr6Ze6xWPFlEh1pyF8=,tag:8PeyGdcku+uN8ezklySH5g==,type:str] mac: ENC[AES256_GCM,data:G8xxjJEynmhFwLpbJu8Z0bR0TBTpzMSO/FJTucjahmQOJfQFa3r0T7h7g8J2GGDrUvCP8oJsZ/A/3+nrn7I+T2egk6hZyF+vworb3yc/ULRe+pVNzm0yL78ZuqfFLjs7BkxWdPm2ztjtcRkqbLFfh4f0rqKVQ1iisiJGW/PGm8g=,iv:FclyTb+Y8fGMgRAVEZbCZied1Cr6Ze6xWPFlEh1pyF8=,tag:8PeyGdcku+uN8ezklySH5g==,type:str]
pgp: pgp:
- created_at: '2021-04-19T23:03:06Z' - created_at: "2021-04-19T23:03:06Z"
enc: | enc: |
-----BEGIN PGP MESSAGE----- -----BEGIN PGP MESSAGE-----

View File

@@ -20,3 +20,20 @@ parameters:
csi.storage.k8s.io/fstype: ext4 csi.storage.k8s.io/fstype: ext4
reclaimPolicy: Delete reclaimPolicy: Delete
allowVolumeExpansion: true allowVolumeExpansion: true
---
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: rook-ceph-filesystem
provisioner: rook-ceph.cephfs.csi.ceph.com
parameters:
clusterID: rook-ceph
fsName: rook-shared-filesystem
pool: rook-shared-filesystem-data0
csi.storage.k8s.io/provisioner-secret-name: rook-csi-cephfs-provisioner
csi.storage.k8s.io/provisioner-secret-namespace: rook-ceph
csi.storage.k8s.io/controller-expand-secret-name: rook-csi-cephfs-provisioner
csi.storage.k8s.io/controller-expand-secret-namespace: rook-ceph
csi.storage.k8s.io/node-stage-secret-name: rook-csi-cephfs-node
csi.storage.k8s.io/node-stage-secret-namespace: rook-ceph
reclaimPolicy: Delete