Skip to content

Commit 3b53c09

Browse files
author
jmccormick2001
committed
merge pre32 into master
2 parents e644dfb + a47cbd9 commit 3b53c09

File tree

451 files changed

+8612
-3341
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

451 files changed

+8612
-3341
lines changed

Makefile

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,17 @@ gendeps:
4343
github.com/crunchydata/postgres-operator/apiserver/userservice \
4444
github.com/crunchydata/postgres-operator/apiserver/util \
4545
github.com/crunchydata/postgres-operator/apiserver/versionservice
46+
installrbac:
47+
cd deploy && ./install-rbac.sh
4648
setup:
4749
./bin/get-deps.sh
50+
cd examples/backrest-config && ./create.sh
4851
setupnamespace:
4952
kubectl create -f ./examples/demo-namespace.json
5053
kubectl config set-context demo --cluster=kubernetes --namespace=demo --user=kubernetes-admin
5154
kubectl config use-context demo
52-
55+
bounce:
56+
kubectl get pod --selector=name=postgres-operator -o=jsonpath="{.items[0].metadata.name}" | xargs kubectl delete pod
5357
deployoperator:
5458
cd deploy && ./deploy.sh
5559
main: check-go-vars
@@ -60,6 +64,12 @@ runapiserver: check-go-vars
6064
apiserver --kubeconfig=/etc/kubernetes/admin.conf
6165
apiserver: check-go-vars
6266
go install apiserver.go
67+
pgo-backrest: check-go-vars
68+
go install pgo-backrest/pgo-backrest.go
69+
mv $(GOBIN)/pgo-backrest ./bin/pgo-backrest/
70+
pgo-backrest-image: check-go-vars pgo-backrest
71+
docker build -t pgo-backrest -f $(CO_BASEOS)/Dockerfile.pgo-backrest.$(CO_BASEOS) .
72+
docker tag pgo-backrest $(CO_IMAGE_PREFIX)/pgo-backrest:$(CO_IMAGE_TAG)
6373
pgo: check-go-vars
6474
cd pgo && go install pgo.go
6575
clean: check-go-vars
@@ -97,12 +107,14 @@ all:
97107
make loadimage
98108
make pgo
99109
make rmdataimage
110+
make pgo-backrest-image
100111
push:
101112
docker push $(CO_IMAGE_PREFIX)/pgo-lspvc:$(CO_IMAGE_TAG)
102113
docker push $(CO_IMAGE_PREFIX)/pgo-rmdata:$(CO_IMAGE_TAG)
103114
docker push $(CO_IMAGE_PREFIX)/pgo-load:$(CO_IMAGE_TAG)
104115
docker push $(CO_IMAGE_PREFIX)/postgres-operator:$(CO_IMAGE_TAG)
105116
docker push $(CO_IMAGE_PREFIX)/pgo-apiserver:$(CO_IMAGE_TAG)
117+
docker push $(CO_IMAGE_PREFIX)/pgo-backrest:$(CO_IMAGE_TAG)
106118
pull:
107119
docker pull $(CO_IMAGE_PREFIX)/pgo-lspvc:$(CO_IMAGE_TAG)
108120
docker pull $(CO_IMAGE_PREFIX)/pgo-rmdata:$(CO_IMAGE_TAG)

README.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
</p>
66
++++
77

8-
Latest Release: v3.1, {docdate}
8+
Latest Release: 3.2.0 {docdate}
99

1010
== General
1111

@@ -21,7 +21,7 @@ image::btn.png[Official Documentation]
2121

2222
To build and deploy the Operator on your Kubernetes system, follow the instructions documented on the link:https://crunchydata.github.io/postgres-operator/installation/[Installation] page.
2323

24-
If you're seeking to upgrade your existing Operator installation, please visit the link:https://crunchydata.github.io/postgres-operator/installation/upgrading-the-operator/[Upgrading the Operator] page.
24+
If you're seeking to upgrade your existing Operator installation, please visit the link:https://crunchydata.github.io/postgres-operator/installation/upgrading-the-operator/[Upgrading the Operator] page. Also read the Release Notes as to details on recent changes to the Operator.
2525

2626
More design information is found on the link:https://crunchydata.github.io/postgres-operator/how-it-works/[How It Works] page.
2727

apis/cr/v1/common.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ type PgStorageSpec struct {
4747
StorageType string `json:"storagetype"`
4848
Fsgroup string `json:"fsgroup"`
4949
SupplementalGroups string `json:"supplementalgroups"`
50+
MatchLabels string `json:"matchLabels"`
5051
}
5152

5253
// PgContainerResource ...

apis/cr/v1/task.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ const PgtaskFailover = "failover"
2828
const PgtaskAutoFailover = "autofailover"
2929
const PgtaskAddPolicies = "addpolicies"
3030

31+
const PgtaskBackrest = "backrest"
32+
const PgtaskBackrestBackup = "backup"
33+
const PgtaskBackrestInfo = "info"
34+
const PgtaskBackrestRestore = "restore"
35+
3136
// PgtaskSpec ...
3237
type PgtaskSpec struct {
3338
Name string `json:"name"`

apiserver.go

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import (
2020
"crypto/x509"
2121
log "github.com/Sirupsen/logrus"
2222
"github.com/crunchydata/postgres-operator/apiserver"
23+
"github.com/crunchydata/postgres-operator/apiserver/backrestservice"
2324
"github.com/crunchydata/postgres-operator/apiserver/backupservice"
2425
"github.com/crunchydata/postgres-operator/apiserver/clusterservice"
2526
"github.com/crunchydata/postgres-operator/apiserver/configservice"
@@ -30,6 +31,7 @@ import (
3031
"github.com/crunchydata/postgres-operator/apiserver/loadservice"
3132
"github.com/crunchydata/postgres-operator/apiserver/policyservice"
3233
"github.com/crunchydata/postgres-operator/apiserver/pvcservice"
34+
"github.com/crunchydata/postgres-operator/apiserver/reloadservice"
3335
"github.com/crunchydata/postgres-operator/apiserver/statusservice"
3436
"github.com/crunchydata/postgres-operator/apiserver/upgradeservice"
3537
"github.com/crunchydata/postgres-operator/apiserver/userservice"
@@ -89,6 +91,7 @@ func main() {
8991
r.HandleFunc("/load", loadservice.LoadHandler).Methods("POST")
9092
r.HandleFunc("/user", userservice.UserHandler).Methods("POST")
9193
r.HandleFunc("/users", userservice.CreateUserHandler).Methods("POST")
94+
r.HandleFunc("/users/{name}", userservice.ShowUserHandler).Methods("GET")
9295
//here
9396
r.HandleFunc("/usersdelete/{name}", userservice.DeleteUserHandler).Methods("GET")
9497
r.HandleFunc("/upgrades", upgradeservice.CreateUpgradeHandler).Methods("POST")
@@ -101,6 +104,8 @@ func main() {
101104
r.HandleFunc("/clustersdelete/{name}", clusterservice.DeleteClusterHandler).Methods("GET")
102105
r.HandleFunc("/clusters/test/{name}", clusterservice.TestClusterHandler)
103106
r.HandleFunc("/clusters/scale/{name}", clusterservice.ScaleClusterHandler)
107+
r.HandleFunc("/scale/{name}", clusterservice.ScaleQueryHandler).Methods("GET")
108+
r.HandleFunc("/scaledown/{name}", clusterservice.ScaleDownHandler).Methods("GET")
104109
r.HandleFunc("/status", statusservice.StatusHandler)
105110
r.HandleFunc("/df/{name}", dfservice.DfHandler)
106111
r.HandleFunc("/config", configservice.ShowConfigHandler)
@@ -109,6 +114,10 @@ func main() {
109114
//here
110115
r.HandleFunc("/backupsdelete/{name}", backupservice.DeleteBackupHandler).Methods("GET")
111116
r.HandleFunc("/backups", backupservice.CreateBackupHandler).Methods("POST")
117+
r.HandleFunc("/backrestbackup", backrestservice.CreateBackupHandler).Methods("POST")
118+
r.HandleFunc("/backrest/{name}", backrestservice.ShowBackrestHandler).Methods("GET")
119+
r.HandleFunc("/restore", backrestservice.RestoreHandler).Methods("POST")
120+
r.HandleFunc("/reload", reloadservice.ReloadHandler).Methods("POST")
112121
r.HandleFunc("/failover", failoverservice.CreateFailoverHandler).Methods("POST")
113122
r.HandleFunc("/failover/{name}", failoverservice.QueryFailoverHandler).Methods("GET")
114123

@@ -144,5 +153,4 @@ func main() {
144153
}
145154

146155
log.Fatal(srv.ListenAndServeTLS(serverCert, serverKey))
147-
//log.Fatal(http.ListenAndServe(":8080", r))
148156
}

0 commit comments

Comments
 (0)