You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#162, #165 : Compatible with PostgreSql 16 and upgraded the operator framework libraries Kubebuilder 3.12.0 in order to benefit from the latest features up to Kubernetes version 1.27.3
Copy file name to clipboardexpand all lines: Makefile
+52-27
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@
3
3
LATEST = controller:latest
4
4
IMG ?= $(LATEST)
5
5
# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
6
-
ENVTEST_K8S_VERSION = 1.24.2
6
+
ENVTEST_K8S_VERSION = 1.27.3
7
7
8
8
# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set)
9
9
ifeq (,$(shell go env GOBIN))
@@ -12,6 +12,12 @@ else
12
12
GOBIN=$(shell go env GOBIN)
13
13
endif
14
14
15
+
# CONTAINER_TOOL defines the container tool to be used for building images.
16
+
# Be aware that the target commands are only tested with Docker which is
17
+
# scaffolded by default. However, you might want to replace it to use other
18
+
# tools. (i.e. podman)
19
+
CONTAINER_TOOL ?= docker
20
+
15
21
# Setting SHELL to bash allows bash commands to be executed by recipes.
16
22
# Options are set to exit when a recipe line exits non-zero or a piped command fails.
17
23
SHELL = /usr/bin/env bash -o pipefail
@@ -24,7 +30,7 @@ all: build
24
30
25
31
# The help target prints out all targets with their descriptions organized
26
32
# beneath their categories. The categories are represented by '##@' and the
27
-
# target descriptions by '##'. The awk commands is responsible for reading the
33
+
# target descriptions by '##'. The awk command is responsible for reading the
28
34
# entire set of makefiles included in this invocation, looking for lines of the
29
35
# file as xyz: ## something, and then pretty-format the target and help. Then,
30
36
# if there's a line with ##@ something, that gets pretty-printed as a category.
@@ -57,33 +63,47 @@ vet: ## Run go vet against code.
57
63
58
64
.PHONY: test
59
65
test: build envtest ## Run tests.
60
-
go test$(shell pwd)/test -run $(shell pwd)/test/suite_test.go -v -test.timeout 10000s
61
-
#KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) -p path)" go test $(shell pwd)/test -run $(shell pwd)/test/suite_test.go -v -coverprofile cover.out -test.timeout 10000s
62
-
#KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) -p path)" go test test/suite_test.go -coverprofile cover.out -v -test.timeout 10000s
66
+
go test$(shell pwd)/internal/test -run $(shell pwd)/internal/test/suite_test.go -v -test.timeout 10000s
67
+
#KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) --bin-dir $(LOCALBIN) -p path)" go test ./... -coverprofile cover.out
63
68
64
69
##@ Build
65
70
66
71
.PHONY: build
67
72
build: manifests generate fmt vet ## Build manager binary.
68
-
go generate
69
-
go build -o bin/manager main.go
73
+
go generate cmd/main.go
74
+
go build -o bin/manager cmd/main.go
70
75
71
76
.PHONY: run
72
77
run: install ## Run a controller from your host.
73
-
go run ./main.go
74
-
75
-
#docker-build: test ## Build docker image with the manager.
76
-
.PHONY: docker-build-push
77
-
docker-build-push: build ## Build docker image with the manager.
uninstall: manifests kustomize ## Uninstall CRDs from the K8s cluster specified in ~/.kube/config. Call with ignore-not-found=true to ignore resource not found errors during deletion.
## Run acceptance tests then deploy into Docker Hub the controller as the Docker image provided in arg ${IMG}
113
133
## and update the local file "kubegres.yaml" with the image ${IMG}
114
134
.PHONY: deploy
115
-
deploy: deploy-check test docker-build-push kustomize ## Deploy controller to the K8s cluster specified in ~/.kube/config.
135
+
deploy: deploy-check docker-buildx kustomize ## Deploy controller to the K8s cluster specified in ~/.kube/config.
116
136
cd config/manager &&$(KUSTOMIZE) edit set image controller=${IMG}
117
137
$(KUSTOMIZE) build config/default > kubegres.yaml
118
138
@echo "DEPLOYED $(IMG) INTO DOCKER HUB. UPDATED 'kubegres.yaml' WITH '$(IMG)'. YOU CAN COMMIT 'kubegres.yaml' AND CREATE A RELEASE IN GITHUB."
119
139
120
140
.PHONY: undeploy
121
141
undeploy: ## Undeploy controller from the K8s cluster specified in ~/.kube/config. Call with ignore-not-found=true to ignore resource not found errors during deletion.
Copy file name to clipboardexpand all lines: README.md
+14-14
Original file line number
Diff line number
Diff line change
@@ -1,14 +1,14 @@
1
-
[Kubegres](https://www.kubegres.io/) is a Kubernetes operator allowing to deploy one or many clusters of PostgreSql pods with data
2
-
replication and failover enabled out-of-the box. It brings simplicity when using PostgreSql considering how complex managing
1
+
[Kubegres](https://www.kubegres.io/) is a Kubernetes operator allowing to deploy one or many clusters of PostgreSql pods with data
2
+
replication and failover enabled out-of-the box. It brings simplicity when using PostgreSql considering how complex managing
3
3
stateful-set's life-cycle and data replication could be with Kubernetes.
4
4
5
5
**Features**
6
6
7
-
* It can manage one or many clusters of Postgres instances.
8
-
Each cluster of Postgres instances is created using a YAML of "kind: Kubegres". Each cluster is self-contained and is
7
+
* It can manage one or many clusters of Postgres instances.
8
+
Each cluster of Postgres instances is created using a YAML of "kind: Kubegres". Each cluster is self-contained and is
9
9
identified by its unique name and namespace.
10
10
11
-
* It creates a cluster of PostgreSql servers with [Streaming Replication](https://wiki.postgresql.org/wiki/Streaming_Replication) enabled: it creates a Primary PostgreSql pod and a
11
+
* It creates a cluster of PostgreSql servers with [Streaming Replication](https://wiki.postgresql.org/wiki/Streaming_Replication) enabled: it creates a Primary PostgreSql pod and a
12
12
number of Replica PostgreSql pods and replicates primary's database in real-time to Replica pods.
13
13
14
14
* It manages fail-over: if a Primary PostgreSql crashes, it automatically promotes a Replica PostgreSql as a Primary.
@@ -17,14 +17,14 @@ stateful-set's life-cycle and data replication could be with Kubernetes.
17
17
18
18
* It provides a very simple YAML with properties specialised for PostgreSql.
19
19
20
-
* It is resilient, has over [85 automatized tests](https://github.com/reactive-tech/kubegres/tree/main/test) cases and
21
-
has been running in production.
20
+
* It is resilient, has over [85 automatized tests](https://github.com/reactive-tech/kubegres/tree/main/test) cases and
21
+
has been running in production.
22
22
23
23
24
24
**How does Kubegres differentiate itself?**
25
25
26
26
Kubegres is fully integrated with Kubernetes' lifecycle as it runs as an operator written in Go.
27
-
It is minimalist in terms of codebase compared to other open-source Postgres operators. It has the minimal and
27
+
It is minimalist in terms of codebase compared to other open-source Postgres operators. It has the minimal and
28
28
yet robust required features to manage a cluster of PostgreSql on Kubernetes. We aim keeping this project small and simple.
29
29
30
30
Among many reasons, there are [5 main ones why we recommend Kubegres](https://www.kubegres.io/#kubegres_compared).
@@ -39,23 +39,23 @@ If you would like to contribute to Kubegres, please read the page [How to contri
39
39
40
40
**More details about the project**
41
41
42
-
[Kubegres](https://www.kubegres.io/) was developed by [Reactive Tech Limited](https://www.reactive-tech.io/) and Alex
43
-
Arica as the lead developer. Reactive Tech offers [support services](https://www.kubegres.io/support/) for Kubegres,
42
+
[Kubegres](https://www.kubegres.io/) was developed by [Reactive Tech Limited](https://www.reactive-tech.io/) and Alex
43
+
Arica as the lead developer. Reactive Tech offers [support services](https://www.kubegres.io/support/) for Kubegres,
44
44
Kubernetes and PostgreSql.
45
45
46
-
It was developed with the framework [Kubebuilder](https://book.kubebuilder.io/) version 3, an SDK for building Kubernetes
46
+
It was developed with the framework [Kubebuilder](https://book.kubebuilder.io/) version 3, an SDK for building Kubernetes
47
47
APIs using CRDs. Kubebuilder is maintained by the official Kubernetes API Machinery Special Interest Group (SIG).
48
48
49
49
**Support**
50
50
51
-
[Reactive Tech Limited](https://www.reactive-tech.io/) offers support for organisations using Kubegres. And we prioritise
51
+
[Reactive Tech Limited](https://www.reactive-tech.io/) offers support for organisations using Kubegres. And we prioritise
52
52
new features requested by organisations paying supports as long the new features would benefit the Open Source community.
53
-
We start working on the implementation of new features within 24h of the request from organisations paying supports.
53
+
We start working on the implementation of new features within 24h of the request from organisations paying supports.
54
54
More details in the [support page](https://www.kubegres.io/support/).
55
55
56
56
**Sponsor**
57
57
58
-
If you would like to help this project by sponsoring it, we can display your company's logo on this GitHub page
58
+
If you would like to help this project by sponsoring it, we can display your company's logo on this GitHub page
59
59
and on [https://www.kubegres.io](https://www.kubegres.io). More details in the [sponsor page](https://www.kubegres.io/sponsor/).
0 commit comments