Skip to content

Commit 46ffda3

Browse files
author
Jonathan S. Katz
committed
Various examples for working with PGO
1 parent 12ff4c8 commit 46ffda3

28 files changed

+437
-0
lines changed

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# [PGO](https://github.com/CrunchyData/postgres-operator), Crunchy [Postgres Operator](https://github.com/CrunchyData/postgres-operator) Examples
2+
3+
This repository contains examples for deploying PGO, the Postgres Operator from Crunchy Data, using a variety of examples.
4+
5+
The examples are grouped by various tools that can be used to deploy them.
6+
7+
The best way to get started is to fork this repository and experiment with the examples.
8+
9+
Each of the examples has its own README that guides you through the process of deploying it.
10+
11+
You can find out more information about [PGO](https://github.com/CrunchyData/postgres-operator), the [Postgres Operator](https://github.com/CrunchyData/postgres-operator) from [Crunchy Data](https://www.crunchydata.com) at the project page:
12+
13+
[https://github.com/CrunchyData/postgres-operator](https://github.com/CrunchyData/postgres-operator)

kustomize/azure/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
azure.conf

kustomize/azure/azure.conf.example

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[global]
2+
repo1-azure-account=<YOUR_AZURE_ACCOUNT>
3+
repo1-azure-key=<YOUR_AZURE_KEY>

kustomize/azure/kustomization.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
namespace: postgres-operator
2+
3+
secretGenerator:
4+
- name: pgo-azure-creds
5+
files:
6+
- azure.conf
7+
8+
generatorOptions:
9+
disableNameSuffixHash: true
10+
11+
resources:
12+
- postgres.yaml

kustomize/azure/postgres.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
apiVersion: postgres-operator.crunchydata.com/v1beta1
2+
kind: PostgresCluster
3+
metadata:
4+
name: hippo-azure
5+
spec:
6+
image: registry.developers.crunchydata.com/crunchydata/crunchy-postgres-ha:centos8-13.3-4.7.0
7+
postgresVersion: 13
8+
instances:
9+
- volumeClaimSpec:
10+
accessModes:
11+
- "ReadWriteOnce"
12+
resources:
13+
requests:
14+
storage: 1Gi
15+
archive:
16+
pgbackrest:
17+
image: registry.developers.crunchydata.com/crunchydata/crunchy-pgbackrest:centos8-13.3-4.7.0
18+
repoHost:
19+
dedicated: {}
20+
configuration:
21+
- secret:
22+
name: pgo-azure-creds
23+
global:
24+
repo1-path: /pgbackrest/postgres-operator/hippo-azure/repo1
25+
repos:
26+
- name: repo1
27+
azure:
28+
container: "<YOUR_AZURE_CONTAINER>"

kustomize/gcs/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
gcs-key.json

kustomize/gcs/gcs.conf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[global]
2+
repo1-gcs-key=/etc/pgbackrest/conf.d/gcs-key.json

kustomize/gcs/kustomization.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
namespace: postgres-operator
2+
3+
secretGenerator:
4+
- name: pgo-gcs-creds
5+
files:
6+
- gcs.conf
7+
- gcs-key.json
8+
9+
generatorOptions:
10+
disableNameSuffixHash: true
11+
12+
resources:
13+
- postgres.yaml

kustomize/gcs/postgres.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
apiVersion: postgres-operator.crunchydata.com/v1beta1
2+
kind: PostgresCluster
3+
metadata:
4+
name: hippo-gcs
5+
spec:
6+
image: registry.developers.crunchydata.com/crunchydata/crunchy-postgres-ha:centos8-13.3-4.7.0
7+
postgresVersion: 13
8+
instances:
9+
- volumeClaimSpec:
10+
accessModes:
11+
- "ReadWriteOnce"
12+
resources:
13+
requests:
14+
storage: 1Gi
15+
archive:
16+
pgbackrest:
17+
image: registry.developers.crunchydata.com/crunchydata/crunchy-pgbackrest:centos8-13.3-4.7.0
18+
repoHost:
19+
dedicated: {}
20+
configuration:
21+
- secret:
22+
name: pgo-gcs-creds
23+
global:
24+
repo1-path: /pgbackrest/postgres-operator/hippo-gcs/repo1
25+
repos:
26+
- name: repo1
27+
gcs:
28+
bucket: "<YOUR_GCS_BUCKET_NAME>"
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
apiVersion: postgres-operator.crunchydata.com/v1beta1
2+
kind: PostgresCluster
3+
metadata:
4+
name: hippo-ha
5+
spec:
6+
image: registry.developers.crunchydata.com/crunchydata/crunchy-postgres-ha:centos8-13.3-4.7.0
7+
postgresVersion: 13
8+
instances:
9+
- name: pgha1
10+
replicas: 2
11+
volumeClaimSpec:
12+
accessModes:
13+
- "ReadWriteOnce"
14+
resources:
15+
requests:
16+
storage: 1Gi
17+
affinity:
18+
podAntiAffinity:
19+
preferredDuringSchedulingIgnoredDuringExecution:
20+
- weight: 1
21+
podAffinityTerm:
22+
topologyKey: kubernetes.io/hostname
23+
labelSelector:
24+
matchLabels:
25+
postgres-operator.crunchydata.com/cluster: hippo-ha
26+
postgres-operator.crunchydata.com/instance-set: pgha1
27+
archive:
28+
pgbackrest:
29+
image: registry.developers.crunchydata.com/crunchydata/crunchy-pgbackrest:centos8-13.3-4.7.0
30+
repoHost:
31+
dedicated: {}
32+
repos:
33+
- name: repo1
34+
volume:
35+
volumeClaimSpec:
36+
accessModes:
37+
- "ReadWriteOnce"
38+
resources:
39+
requests:
40+
storage: 1Gi
41+
proxy:
42+
pgBouncer:
43+
image: registry.developers.crunchydata.com/crunchydata/crunchy-pgbouncer:centos8-13.3-4.7.0
44+
replicas: 2
45+
affinity:
46+
podAntiAffinity:
47+
preferredDuringSchedulingIgnoredDuringExecution:
48+
- weight: 1
49+
podAffinityTerm:
50+
topologyKey: kubernetes.io/hostname
51+
labelSelector:
52+
matchLabels:
53+
postgres-operator.crunchydata.com/cluster: hippo-ha
54+
postgres-operator.crunchydata.com/role: pgbouncer

0 commit comments

Comments
 (0)