Cloud Native PostgreSQL is a stack designed by EnterpriseDB to manage PostgreSQL workloads on Kubernetes, particularly optimised for Private Cloud environments with Local Persistent Volumes (PV).
To develop the operator, you will need a UNIX based operating system that
support the following software, which must be available in the PATH
environment variable:
- Go 1.14+ compiler
- GNU Make
- Kind v0.9.x or greater
- golangci-lint
On Mac OS X, you can install the above components through brew
:
brew install go kind golangci/tap/golangci-lint
!!! note
Kind version 0.9.x is required at the time of this writing.
If you already have kind, run brew upgrade kind
to update
to the latest version.
You can invoke the compilation procedure with:
make
!!! note Kustomize version v3.8.2 and greater is not compatible with the current version of the build system. In case you have it installed it is advised to remove it and let the build system to download a compatible version of the software.
If you want to deploy a cluster using the operator from your current git branch, you can use the procedure described in this paragraph.
You must set the QUAY_USERNAME
and QUAY_PASSWORD
environment variables to the
values found in your Account Settings in quay.io. Navigate to https://quay.io/
then click on your name in the upper-right and select "Account Settings". Ensure
the User Settings tab on the left is selected, and click on "CLI Password" at the
top of the settings. Enter your quay.io password to see your credentials.
Select "Encrypted Password" on left and copy the "Username", and the "Encrypted Password"
values into the environment variables QUAY_USERNAME
and QUAY_PASSWORD
respectively
in your shell. You can now use the following commands:
make dev-init
to create a local clustermake dev-clean
to clean up the local clustermake dev-reset
to reinitialize the local cluster
To generate or update the licenses
folder run the following command:
make licenses
-
Update the
NEWS
file for the new version. A command likegit log --pretty=oneline v0.1.0..main
wherev0.1.0
is the latest released version will be useful. -
run
hack/release.sh v0.2.0
wherev0.2.0
is the new version to be released. -
Create the release on the Portal and upload the manifest generated in the previous point in
releases/postgresql-operator-0.2.0.yaml
-
Update the official documentation by updating the cnp-docs-packaging source and creating a new tag named after the version and the packaging version (i.e.
v0.2.0-1
). Then, run a new build from Jenkins (you can reuse an existing release build task and change the tag name). -
Upload the images on the Quay.io repository
skopeo copy docker://internal.2ndq.io/k8s/cloud-native-postgresql:v0.2.0 docker://quay.io/enterprisedb/cloud-native-postgresql:v0.2.0
skopeo copy docker://internal.2ndq.io/k8s/cloud-native-postgresql:v0.2.0 docker://quay.io/enterprisedb/cloud-native-postgresql:latest