Skip to content

Commit fac7246

Browse files
authored
Merge pull request #35 from cybertec-postgresql/backup_pvc
Introduce PVC based repo-host for pgbackrest
2 parents 738b4c9 + 25b1707 commit fac7246

File tree

31 files changed

+2033
-584
lines changed

31 files changed

+2033
-584
lines changed

Makefile

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,12 @@ BASE_IMAGE ?= rockylinux:9
2626
PACKAGER ?= dnf
2727
BUILD ?= 1
2828
ROOTPATH = $(GOPATH)/src/github.com/cybertec/cybertec-pg-operator
29+
VERIFY_CODEGEN ?= 1
2930
ifndef ROOTPATH
3031
export ROOTPATH=$(GOPATH)/src/github.com/cybertec/cybertec-pg-operator
3132
endif
3233

34+
ALL_SOURCES = $(shell find pkg/ -name '*.go')
3335

3436
ifeq ($(DEBUG),1)
3537
DOCKERFILE = DebugDockerfile
@@ -59,9 +61,11 @@ default: local
5961
clean:
6062
rm -rf build
6163

62-
local: ${SOURCES}
63-
hack/verify-codegen.sh
64-
CGO_ENABLED=${CGO_ENABLED} go build -o build/${BINARY} $(LOCAL_BUILD_FLAGS) -ldflags "$(LDFLAGS)" $^
64+
local: build/cybertec-pg-operator
65+
66+
build/cybertec-pg-operator: ${SOURCES} ${ALL_SOURCES}
67+
if [ "$(VERIFY_CODEGEN)" = "1" ]; then hack/verify-codegen.sh; fi
68+
CGO_ENABLED=${CGO_ENABLED} go build -o build/${BINARY} $(LOCAL_BUILD_FLAGS) -ldflags "$(LDFLAGS)" $<
6569

6670
linux: ${SOURCES}
6771
GOOS=linux GOARCH=amd64 CGO_ENABLED=${CGO_ENABLED} go build -o build/linux/${BINARY} ${BUILD_FLAGS} -ldflags "$(LDFLAGS)" $^
@@ -79,6 +83,9 @@ docker: ${DOCKERDIR}/${DOCKERFILE}
7983

8084
# ${VERSION}
8185

86+
docker-local: build/cybertec-pg-operator
87+
docker build --rm -t "$(IMAGE):$(TAG)$(CDP_TAG)$(DEBUG_FRESH)$(DEBUG_POSTFIX)" -f "${DOCKERDIR}/Dockerfile-dev" --build-arg VERSION="${VERSION}" --build-arg BASE_IMAGE="${BASE_IMAGE}" --build-arg PACKAGER="${PACKAGER}" .
88+
8289

8390
indocker-race:
8491
docker run --rm -v "${GOPATH}":"${GOPATH}" -e GOPATH="${GOPATH}" -e RACE=1 -w ${PWD} golang:1.19.8 bash -c "make linux"

README.md

Lines changed: 18 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
1-
# CYBERTEC PG Operator
2-
3-
CPO (CYBERTEC PG Operator) allows you to create and run PostgreSQL clusters on Kubernetes.
41

5-
The operator reduces your efforts and simplifies the administration of your PostgreSQL clusters so that you can concentrate on other things.
62
# CYBERTEC PG Operator
73

84
CPO (CYBERTEC PG Operator) allows you to create and run PostgreSQL clusters on Kubernetes.
95

106
The operator reduces your efforts and simplifies the administration of your PostgreSQL clusters so that you can concentrate on other things.
11-
<img src="docs/diagrams/logo.png" width="200">
7+
<img src="docs/diagrams/cpo_logo.svg" width="350">
128

139
The Postgres Operator delivers an easy to run highly-available [PostgreSQL](https://www.postgresql.org/)
1410
clusters on Kubernetes (K8s) powered by [Patroni](https://github.com/zalando/patroni).
@@ -22,7 +18,6 @@ pipelines with no access to Kubernetes API directly, promoting infrastructure as
2218
* Database connection pooling with PGBouncer
2319
* Support fast in place major version upgrade. Supports global upgrade of all clusters.
2420
* Restore and cloning Postgres clusters on PVC, AWS, GCS and Azure
25-
* Additionally logical backups to S3 or GCS bucket can be configured
2621
* Standby cluster
2722
* Configurable for non-cloud environments
2823
* Basic credential and user management on K8s, eases application deployments
@@ -33,47 +28,37 @@ pipelines with no access to Kubernetes API directly, promoting infrastructure as
3328

3429
### PostgreSQL features
3530

36-
* Supports PostgreSQL 15, starting from 10+
31+
* Supports PostgreSQL 16, starting from 10+
32+
* Streaming replication cluster via Patroni
33+
* Integrated backup solution, automatic backups and very easy restore (Backup & PITR)
34+
* Rolling update procedure for adjustments to the pods and minor updates
35+
* Major upgrade with minimum interruption time
36+
* Reduction of downtime thanks to redundancy, pod anti-affinity, auto-failover and self-healing
37+
* Supports PostgreSQL 16, starting from 10+
3738
* Streaming replication cluster via Patroni
3839
* Point-In-Time-Recovery with
40+
* Point-In-Time-Recovery with
3941
[pg_basebackup](https://www.postgresql.org/docs/16/app-pgbasebackup.html) /
4042
[pgBackRest](https://pgbackrest.org/) via [CYBERTEC-pg-container](https://github.com/cybertec-postgresql/CYBERTEC-pg-container)
41-
[pg_stat_statements](https://www.postgresql.org/docs/15/pgstatstatements.html),
43+
[pg_stat_statements](https://www.postgresql.org/docs/16/pgstatstatements.html),
4244
* Incl. popular Postgres extensions such as
43-
[pg_cron](https://github.com/citusdata/pg_cron),
44-
[pg_partman](https://github.com/pgpartman/pg_partman),
45+
[pgaudit](https://github.com/pgaudit/pgaudit),
46+
[pgauditlogtofile](https://github.com/fmbiete/pgauditlogtofile),
47+
<!-- [pg_partman](https://github.com/pgpartman/pg_partman), -->
4548
[postgis](https://postgis.net/),
46-
[set_user](https://github.com/pgaudit/set_user) and
49+
[set_user](https://github.com/pgaudit/set_user)
50+
[pg_cron](https://github.com/citusdata/pg_cron),
4751
[timescaledb](https://github.com/timescale/timescaledb)
4852
[credcheck](https://github.com/MigOpsRepos/credcheck)
4953

50-
The Postgres Operator has been developed at Zalando and is being used in
51-
production for over five years.
54+
The Operator project is being driven forward by CYBERTEC and is currently in production at various locations.
5255

5356
## Supported Postgres & K8s versions
5457

5558
| Release | Postgres versions | pgBackRest versions | Patroni versions | K8s versions | Golang |
5659
| :-------- | :---------------: | :-------------------: | :--------------: | :----------------:| :-----: |
57-
| latest | 13 &rarr; 16 | 2.51 | 3.2.2 | 1.21+ | 1.19.8 |
58-
| next rc | 13 &rarr; 16 | 2.51 | 3.2.2 | 1.21+ | 1.22.1 |
59-
60-
* Integrated backup solution, automatic backups and very easy restore (snapshot & PITR)
61-
* Rolling update procedure for adjustments to the pods and minor updates
62-
* Major upgrade with minimum interruption time
63-
* Reduction of downtime thanks to redundancy, pod anti-affinity, auto-failover and self-healing
64-
* Supports PostgreSQL 16, starting from 13+
65-
* Streaming replication cluster via Patroni
66-
* Point-In-Time-Recovery with
67-
[pg_basebackup](https://www.postgresql.org/docs/11/app-pgbasebackup.html) /
68-
[pgBackRest](https://pgbackrest.org/) via [CYBERTEC-pg-container](https://github.com/cybertec-postgresql/CYBERTEC-pg-container)
69-
[pg_stat_statements](https://www.postgresql.org/docs/15/pgstatstatements.html),
70-
* Incl. popular Postgres extensions such as
71-
[pg_cron](https://github.com/citusdata/pg_cron),
72-
[pg_partman](https://github.com/pgpartman/pg_partman),
73-
[postgis](https://postgis.net/),
74-
[set_user](https://github.com/pgaudit/set_user) and
75-
[timescaledb](https://github.com/timescale/timescaledb)
76-
[credcheck](https://github.com/MigOpsRepos/credcheck)
60+
| latest | 10 &rarr; 16 | 2.51 | 3.3.0 | 1.21+ | 1.22.1 |
61+
| next rc | 10 &rarr; 16 | 2.51 | 3.3.0 | 1.21+ | 1.22.1 |
7762

7863
## Getting started
7964

docker/Dockerfile-dev

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
ARG BASE_IMAGE
2+
#=registry.opensource.zalan.do/library/alpine-3.15:latest
3+
ARG VERSION=latest
4+
5+
FROM ${BASE_IMAGE}
6+
ARG PACKAGER
7+
LABEL maintainer="Opensource @ CYBERTEC <[email protected]>"
8+
9+
# We need root certificates to deal with teams api over https
10+
RUN ${PACKAGER} -y update && ${PACKAGER} -y install ca-certificates && ${PACKAGER} clean all;
11+
12+
# RUN addgroup -g 1000 pgo
13+
# RUN adduser -D -u 1000 -G pgo -g 'Postgres Operator' pgo
14+
15+
RUN groupadd -g 1000 cpo
16+
RUN useradd cpo -u 1000 -g 1000
17+
18+
USER 1000:1000
19+
20+
COPY build/* /
21+
22+
ENTRYPOINT ["/cybertec-pg-operator"]

docs/diagrams/cpo_logo.svg

Lines changed: 66 additions & 0 deletions
Loading

e2e/tests/k8s_api.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ def get_pg_nodes(self, pg_cluster_name, namespace='default'):
5454
return master_pod_node, replica_pod_nodes
5555

5656
def get_cluster_nodes(self, cluster_labels='application=cpo,cluster.cpo.opensource.cybertec.at/name=acid-minimal-cluster', namespace='default'):
57+
5758
m = []
5859
r = []
5960
podsList = self.api.core_v1.list_namespaced_pod(namespace, label_selector=cluster_labels)
@@ -342,6 +343,7 @@ def get_effective_pod_image(self, pod_name, namespace='default'):
342343
return pod.items[0].spec.containers[0].image
343344

344345
def get_cluster_pod(self, role, labels='application=cpo,cluster.cpo.opensource.cybertec.at/name=acid-minimal-cluster', namespace='default'):
346+
345347
labels = labels + ',member.cpo.opensource.cybertec.at/role=' + role
346348

347349
pods = self.api.core_v1.list_namespaced_pod(

e2e/tests/test_e2e.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,6 @@ def test_additional_pod_capabilities(self):
222222
# changed security context of postgres container should trigger a rolling update
223223
k8s.wait_for_pod_failover(replica_nodes, 'member.cpo.opensource.cybertec.at/role=master,' + cluster_label)
224224
k8s.wait_for_pod_start('member.cpo.opensource.cybertec.at/role=replica,' + cluster_label)
225-
226225
self.eventuallyEqual(lambda: k8s.get_operator_state(), {"0": "idle"}, "Operator does not get in sync")
227226
self.eventuallyEqual(lambda: k8s.count_pods_with_container_capabilities(capabilities, cluster_label),
228227
2, "Container capabilities not updated")
@@ -656,7 +655,6 @@ def test_custom_ssl_certificate(self):
656655
# wait for switched over
657656
k8s.wait_for_pod_failover(replica_nodes, 'member.cpo.opensource.cybertec.at/role=master,' + cluster_label)
658657
k8s.wait_for_pod_start('member.cpo.opensource.cybertec.at/role=replica,' + cluster_label)
659-
660658
self.eventuallyEqual(lambda: k8s.count_pods_with_env_variable("SSL_CERTIFICATE_FILE", cluster_label), 2, "TLS env variable SSL_CERTIFICATE_FILE missing in Spilo pods")
661659
self.eventuallyEqual(lambda: k8s.count_pods_with_env_variable("SSL_PRIVATE_KEY_FILE", cluster_label), 2, "TLS env variable SSL_PRIVATE_KEY_FILE missing in Spilo pods")
662660
self.eventuallyEqual(lambda: k8s.count_pods_with_volume_mount(tls_secret, cluster_label), 2, "TLS volume mount missing in Spilo pods")
@@ -818,6 +816,7 @@ def test_enable_disable_connection_pooler(self):
818816
self.eventuallyEqual(lambda: k8s.count_services_with_label(pooler_label),
819817
0, "Pooler service not removed")
820818
self.eventuallyEqual(lambda: k8s.count_secrets_with_label('application=cpo,cluster.cpo.opensource.cybertec.at/name=acid-minimal-cluster'),
819+
821820
4, "Secrets not deleted")
822821

823822
# Verify that all the databases have pooler schema installed.
@@ -856,7 +855,6 @@ def test_enable_load_balancer(self):
856855

857856
k8s = self.k8s
858857
cluster_label = 'application=cpo,cluster.cpo.opensource.cybertec.at/name=acid-minimal-cluster,member.cpo.opensource.cybertec.at/role={}'
859-
860858
self.eventuallyEqual(lambda: k8s.get_service_type(cluster_label.format("master")),
861859
'ClusterIP',
862860
"Expected ClusterIP type initially, found {}")
@@ -1206,8 +1204,8 @@ def test_persistent_volume_claim_retention_policy(self):
12061204
Test the retention policy for persistent volume claim
12071205
'''
12081206
k8s = self.k8s
1209-
cluster_label = 'application=cpo,cluster.cpo.opensource.cybertec.at/name=acid-minimal-cluster'
12101207

1208+
cluster_label = 'application=cpo,cluster.cpo.opensource.cybertec.at/name=acid-minimal-cluster'
12111209
self.eventuallyEqual(lambda: k8s.get_operator_state(), {"0": "idle"}, "Operator does not get in sync")
12121210
self.eventuallyEqual(lambda: k8s.count_pvcs_with_label(cluster_label), 2, "PVCs is not equal to number of instance")
12131211

@@ -1368,6 +1366,7 @@ def test_node_affinity(self):
13681366
k8s = self.k8s
13691367
cluster_label = 'application=cpo,cluster.cpo.opensource.cybertec.at/name=acid-minimal-cluster'
13701368

1369+
13711370
# verify we are in good state from potential previous tests
13721371
self.eventuallyEqual(lambda: k8s.count_running_pods(), 2, "No 2 pods running")
13731372

@@ -1890,10 +1889,11 @@ def test_service_annotations(self):
18901889
"foo": "bar",
18911890
"alice": "bob"
18921891
}
1893-
1892+
18941893
self.eventuallyTrue(lambda: k8s.check_service_annotations("cluster.cpo.opensource.cybertec.at/name=acid-minimal-cluster,member.cpo.opensource.cybertec.at/role=master", annotations), "Wrong annotations")
18951894
self.eventuallyTrue(lambda: k8s.check_service_annotations("cluster.cpo.opensource.cybertec.at/name=acid-minimal-cluster,member.cpo.opensource.cybertec.at/role=replica", annotations), "Wrong annotations")
18961895

1896+
18971897
# clean up
18981898
unpatch_custom_service_annotations = {
18991899
"data": {
@@ -2121,7 +2121,6 @@ def assert_master_is_unique(self, namespace='default', clusterName="acid-minimal
21212121
'''
21222122
k8s = self.k8s
21232123
labels = 'member.cpo.opensource.cybertec.at/role=master,cluster.cpo.opensource.cybertec.at/name=' + clusterName
2124-
21252124
num_of_master_pods = k8s.count_pods_with_label(labels, namespace)
21262125
self.assertEqual(num_of_master_pods, 1, "Expected 1 master pod, found {}".format(num_of_master_pods))
21272126

@@ -2132,6 +2131,7 @@ def assert_distributed_pods(self, target_nodes, cluster_labels='cluster.cpo.open
21322131
Toggle pod anti affinty to distribute pods accross nodes (replica in particular).
21332132
'''
21342133
k8s = self.k8s
2134+
21352135
cluster_labels = 'application=cpo,cluster.cpo.opensource.cybertec.at/name=acid-minimal-cluster'
21362136

21372137
# get nodes of master and replica(s)

go.mod

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ require (
1111
github.com/r3labs/diff v1.1.0
1212
github.com/sirupsen/logrus v1.9.0
1313
github.com/stretchr/testify v1.8.0
14-
golang.org/x/crypto v0.17.0
14+
golang.org/x/crypto v0.21.0
1515
golang.org/x/exp v0.0.0-20230108222341-4b8118a2686a
1616
gopkg.in/yaml.v2 v2.4.0
1717
k8s.io/api v0.25.9
@@ -50,10 +50,10 @@ require (
5050
github.com/pmezard/go-difflib v1.0.0 // indirect
5151
github.com/spf13/pflag v1.0.5 // indirect
5252
golang.org/x/mod v0.8.0 // indirect
53-
golang.org/x/net v0.17.0 // indirect
53+
golang.org/x/net v0.23.0 // indirect
5454
golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 // indirect
55-
golang.org/x/sys v0.15.0 // indirect
56-
golang.org/x/term v0.15.0 // indirect
55+
golang.org/x/sys v0.18.0 // indirect
56+
golang.org/x/term v0.18.0 // indirect
5757
golang.org/x/text v0.14.0 // indirect
5858
golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 // indirect
5959
golang.org/x/tools v0.6.0 // indirect

go.sum

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -224,8 +224,8 @@ golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8U
224224
golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
225225
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
226226
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
227-
golang.org/x/crypto v0.17.0 h1:r8bRNjWL3GshPW3gkd+RpvzWrZAwPS49OmTGZ/uhM4k=
228-
golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4=
227+
golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA=
228+
golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs=
229229
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
230230
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
231231
golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
@@ -291,8 +291,8 @@ golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81R
291291
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
292292
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
293293
golang.org/x/net v0.0.0-20210614182718-04defd469f4e/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
294-
golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM=
295-
golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE=
294+
golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs=
295+
golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg=
296296
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
297297
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
298298
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
@@ -342,11 +342,11 @@ golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7w
342342
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
343343
golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
344344
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
345-
golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc=
346-
golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
345+
golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4=
346+
golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
347347
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
348-
golang.org/x/term v0.15.0 h1:y/Oo/a/q3IXu26lQgl04j/gjuBDOBlx7X6Om1j2CPW4=
349-
golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0=
348+
golang.org/x/term v0.18.0 h1:FcHjZXDMxI8mM3nwhX9HlKop4C0YQvCVCdwYl2wOtE8=
349+
golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58=
350350
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
351351
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
352352
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=

manifests/postgresql.crd.yaml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -778,28 +778,29 @@ spec:
778778
properties:
779779
secret:
780780
type: string
781-
parameters:
782-
additionalProperties:
783-
type: string
784-
type: object
785781
protection:
786782
type: object
787783
properties:
788784
restore:
789785
type: boolean
786+
global:
787+
type: object
788+
additionalProperties:
789+
type: string
790790
repos:
791791
type: array
792792
items:
793793
properties:
794794
name:
795795
type: string
796-
pattern: ^repo[1-4]
796+
pattern: ^repo[1-4]$
797797
storage:
798798
type: string
799799
enum:
800800
- "s3"
801801
- "gcs"
802802
- "azure"
803+
- "pvc"
803804
resource:
804805
type: string
805806
endpoint:
@@ -815,6 +816,8 @@ spec:
815816
type: string
816817
diff:
817818
type: string
819+
Pvcsize:
820+
type: string
818821
required:
819822
- name
820823
- storage
@@ -831,9 +834,10 @@ spec:
831834
type: string
832835
repo:
833836
type: string
837+
pattern: ^repo[1-4]$
834838
options:
835-
type: array
836-
items:
839+
type: object
840+
additionalProperties:
837841
type: string
838842
resources:
839843
type: object

pkg/apis/cpo.opensource.cybertec.at/v1/const.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package v1
22

3-
// ClusterStatusUnknown etc : status of a Postgres cluster known to the operator
3+
// ClusterStatusUnknown etc : status of a Postgres cluster known to the operator
44
const (
55
ClusterStatusUnknown = ""
66
ClusterStatusCreating = "Creating"
@@ -10,6 +10,7 @@ const (
1010
ClusterStatusAddFailed = "CreateFailed"
1111
ClusterStatusRunning = "Running"
1212
ClusterStatusInvalid = "Invalid"
13+
ClusterStatusRestoring = "Restoring"
1314
)
1415

1516
const (

0 commit comments

Comments
 (0)