Rather than running helm on the client and passing it to kubectl, just install Flux and set the Helm repos on the server side Add resolv.conf to the Kubernetes config so that the hosts can resolve hostnames in order to pull down the Helm repositories Add backups to the database configurations
59 lines
1.3 KiB
YAML
59 lines
1.3 KiB
YAML
apiVersion: postgresql.cnpg.io/v1
|
|
kind: Cluster
|
|
metadata:
|
|
name: postgres
|
|
spec:
|
|
instances: 3
|
|
storage:
|
|
size: 10Gi
|
|
primaryUpdateStrategy: unsupervised
|
|
|
|
managed:
|
|
roles:
|
|
- name: gitlab
|
|
ensure: present
|
|
comment: Gitlab user
|
|
login: true
|
|
superuser: false
|
|
passwordSecret:
|
|
name: postgres-user-gitlab
|
|
- name: pgadmin
|
|
ensure: present
|
|
comment: PG Admin user
|
|
login: true
|
|
superuser: true
|
|
passwordSecret:
|
|
name: postgres-user-pgadmin
|
|
- name: matrix
|
|
ensure: present
|
|
comment: Matrix DB user
|
|
login: true
|
|
superuser: false
|
|
passwordSecret:
|
|
name: postgres-user-matrix
|
|
backup:
|
|
retentionPolicy: "30d"
|
|
barmanObjectStore:
|
|
destinationPath: "s3://k3sbackup/postgres"
|
|
endpointURL: "http://s3.thehellings.lan:9000/"
|
|
s3Credentials:
|
|
accessKeyId:
|
|
name: k3sbackup
|
|
key: username
|
|
secretAccessKey:
|
|
name: k3sbackup
|
|
key: password
|
|
wal:
|
|
compression: gzip
|
|
---
|
|
apiVersion: postgresql.cnpg.io/v1
|
|
kind: ScheduledBackup
|
|
metadata:
|
|
name: postgres-backup
|
|
spec:
|
|
immediate: true # Create one when this is added to the cluster
|
|
schedule: "0 0 0 * * *" # Midnight, nightly
|
|
backupOwnerReference: self
|
|
cluster:
|
|
name: postgres
|