initial commit
This commit is contained in:
7
odroid/cnpg/examples/backup-example.yaml
Normal file
7
odroid/cnpg/examples/backup-example.yaml
Normal file
@@ -0,0 +1,7 @@
|
||||
apiVersion: postgresql.cnpg.io/v1
|
||||
kind: Backup
|
||||
metadata:
|
||||
name: pg-backup-example
|
||||
spec:
|
||||
cluster:
|
||||
name: pg-backup
|
||||
47
odroid/cnpg/examples/cluster-example-initdb-sql-refs.yaml
Normal file
47
odroid/cnpg/examples/cluster-example-initdb-sql-refs.yaml
Normal file
@@ -0,0 +1,47 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: post-init-sql-configmap
|
||||
data:
|
||||
configmap.sql: |
|
||||
create table configmaps (i integer);
|
||||
insert into configmaps (select generate_series(1,10000));
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: post-init-sql-secret
|
||||
stringData:
|
||||
secret.sql: |
|
||||
create table secrets (i integer);
|
||||
insert into secrets (select generate_series(1,10000));
|
||||
---
|
||||
apiVersion: postgresql.cnpg.io/v1
|
||||
kind: Cluster
|
||||
metadata:
|
||||
name: cluster-example-initdb
|
||||
spec:
|
||||
instances: 3
|
||||
|
||||
bootstrap:
|
||||
initdb:
|
||||
database: appdb
|
||||
owner: appuser
|
||||
postInitSQL:
|
||||
- create table numbers (i integer)
|
||||
- insert into numbers (select generate_series(1,10000))
|
||||
postInitTemplateSQL:
|
||||
- create extension intarray
|
||||
postInitApplicationSQL:
|
||||
- create table application_numbers (i integer)
|
||||
- insert into application_numbers (select generate_series(1,10000))
|
||||
postInitApplicationSQLRefs:
|
||||
configMapRefs:
|
||||
- name: post-init-sql-configmap
|
||||
key: configmap.sql
|
||||
secretRefs:
|
||||
- name: post-init-sql-secret
|
||||
key: secret.sql
|
||||
|
||||
storage:
|
||||
size: 1Gi
|
||||
25
odroid/cnpg/examples/cluster-pvc-template.yaml
Normal file
25
odroid/cnpg/examples/cluster-pvc-template.yaml
Normal file
@@ -0,0 +1,25 @@
|
||||
apiVersion: postgresql.cnpg.io/v1
|
||||
kind: Cluster
|
||||
metadata:
|
||||
name: postgresql-pvc-template
|
||||
spec:
|
||||
instances: 3
|
||||
|
||||
# Example of rolling update strategy:
|
||||
# - unsupervised: automated update of the primary once all
|
||||
# replicas have been upgraded (default)
|
||||
# - supervised: requires manual supervision to perform
|
||||
# the switchover of the primary
|
||||
primaryUpdateStrategy: unsupervised
|
||||
|
||||
# Persistent storage configuration
|
||||
storage:
|
||||
size: 1Gi
|
||||
pvcTemplate:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 1Gi
|
||||
storageClassName: standard
|
||||
volumeMode: Filesystem
|
||||
32
odroid/cnpg/examples/cluster-storage-class-with-backup.yaml
Normal file
32
odroid/cnpg/examples/cluster-storage-class-with-backup.yaml
Normal file
@@ -0,0 +1,32 @@
|
||||
apiVersion: postgresql.cnpg.io/v1
|
||||
kind: Cluster
|
||||
metadata:
|
||||
name: pg-backup
|
||||
spec:
|
||||
instances: 3
|
||||
|
||||
# Example of rolling update strategy:
|
||||
# - unsupervised: automated update of the primary once all
|
||||
# replicas have been upgraded (default)
|
||||
# - supervised: requires manual supervision to perform
|
||||
# the switchover of the primary
|
||||
primaryUpdateStrategy: unsupervised
|
||||
|
||||
# Persistent storage configuration
|
||||
storage:
|
||||
storageClass: standard
|
||||
size: 1Gi
|
||||
|
||||
# Backup properties
|
||||
backup:
|
||||
barmanObjectStore:
|
||||
destinationPath: s3://BUCKET_NAME/path/to/folder
|
||||
s3Credentials:
|
||||
accessKeyId:
|
||||
name: aws-creds
|
||||
key: ACCESS_KEY_ID
|
||||
secretAccessKey:
|
||||
name: aws-creds
|
||||
key: ACCESS_SECRET_KEY
|
||||
wal:
|
||||
compression: gzip
|
||||
Reference in New Issue
Block a user