Skip to content

Commit b706242

Browse files
committed
Various examples for working with PGO
1 parent dd08635 commit b706242

32 files changed

+526
-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)

helm/postgres/Chart.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
apiVersion: v3
2+
name: postgrescluster
3+
description: A Helm chart for Kubernetes
4+
type: application
5+
version: 0.1.0
6+
appVersion: 5.0.0

helm/postgres/templates/NOTES.txt

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
Thank you for deploying a Crunchy PostgreSQL cluster!
2+
3+
((((((((((((((((((((((
4+
(((((((((((((%%%%%%%(((((((((((((((
5+
(((((((((((%%% %%%%((((((((((((
6+
(((((((((((%%( (((( ( %%%(((((((((((
7+
(((((((((((((%% (( ,(( %%%(((((((((((
8+
(((((((((((((((%% *%%/ %%%%%%%((((((((((
9+
(((((((((((((((((((%%(( %%%%%%%%%%#(((((%%%%%%%%%%#((((((((((((
10+
((((((((((((((((((%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%((((((((((((((
11+
*((((((((((((((((((((%%%%%% /%%%%%%%%%%%%%%%%%%%((((((((((((((((
12+
(((((((((((((((((((((((%%%/ .%, %%%((((((((((((((((((,
13+
((((((((((((((((((((((% %#(((((((((((((((((
14+
(((((((((((((((%%%%%% #%(((((((((((((((((
15+
((((((((((((((%% %%(((((((((((((((,
16+
((((((((((((%%%#% % %%(((((((((((((((
17+
((((((((((((%. % % #((((((((((((((
18+
(((((((((((%% % %%* %(((((((((((((
19+
#(###(###(#%% %%% %% %%% #%%#(###(###(#
20+
###########%%%%% /%%%%%%%%%%%%% %% %%%%% ,%%#######
21+
###############%% %%%%%% %%% %%%%%%%% %%#####
22+
################%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% %%##
23+
################%% %%%%%%%%%%%%%%%%% %%%% %
24+
##############%# %% (%%%%%%% %%%%%%
25+
#############% %%%%% %%%%%%%%%%%
26+
###########% %%%%%%%%%%% %%%%%%%%%
27+
#########%% %% %%%%%%%%%%%%%%%#
28+
########%% %% %%%%%%%%%
29+
######%% %% %%%%%%
30+
####%%% %%%%% %
31+
%% %%%%

helm/postgres/templates/postgres.yaml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
apiVersion: postgres-operator.crunchydata.com/v1beta1
2+
kind: PostgresCluster
3+
metadata:
4+
name: {{ .Values.name }}
5+
spec:
6+
image: {{ .Values.postgres }}
7+
postgresVersion: {{ .Values.postgresVersion }}
8+
instances:
9+
- name: instance1
10+
dataVolumeClaimSpec:
11+
accessModes:
12+
- "ReadWriteOnce"
13+
resources:
14+
requests:
15+
storage: 1Gi
16+
backups:
17+
pgbackrest:
18+
image: {{ .Values.pgBackRest}}
19+
repoHost:
20+
dedicated: {}
21+
repos:
22+
- name: repo1
23+
volume:
24+
volumeClaimSpec:
25+
accessModes:
26+
- "ReadWriteOnce"
27+
resources:
28+
requests:
29+
storage: 1Gi
30+
- name: repo2
31+
volume:
32+
volumeClaimSpec:
33+
accessModes:
34+
- "ReadWriteOnce"
35+
resources:
36+
requests:
37+
storage: 1Gi
38+
proxy:
39+
pgBouncer:
40+
image: {{ .Values.pgBouncer}}

helm/postgres/values.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
# Cluster name
3+
name: hippo
4+
5+
# PostgreSQL Version
6+
# Version should match version defined in PostgreSQL images
7+
postgresVersion: 13
8+
9+
# Images
10+
postgres: registry.developers.crunchydata.com/crunchydata/crunchy-postgres-ha:centos8-13.3-0
11+
pgBackRest: registry.developers.crunchydata.com/crunchydata/crunchy-pgbackrest:centos8-2.33-0
12+
pgBouncer: registry.developers.crunchydata.com/crunchydata/crunchy-pgbouncer:centos8-1.15-0

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-0
7+
postgresVersion: 13
8+
instances:
9+
- dataVolumeClaimSpec:
10+
accessModes:
11+
- "ReadWriteOnce"
12+
resources:
13+
requests:
14+
storage: 1Gi
15+
backups:
16+
pgbackrest:
17+
image: registry.developers.crunchydata.com/crunchydata/crunchy-pgbackrest:centos8-2.33-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

0 commit comments

Comments
 (0)