This repo contains the Platform Service (PS) and community maintained version of PostgreSQL managed by Patroni for High Availability (HA). You will find this image in the bcgov namespace on all PS managed clusters.
oc get is -n bcgovYou will find a sample of how to deploy the image here.
This image is based on PostgreSQL v12.4. It will be periodically rebuilt acording to the cron schedule in the workflow. When it is rebuilt, patch updates as well as operating security fixes will be incorporated and redistributed to all clusters via the stable tag.
The stable tag for this image is 2.0.1-12.4-latest. When the image is rebuilt patch updates to PostgreSQL will be incorporated along with operating system updates.
See the release notes for more information and any other unique tags.
Below is a sample of how you might reference this image from a StatefulSet deployment manifest.
image: image-registry.openshift-image-registry.svc:5000/bcgov/patroni-postgres:12.4-latestFind a sample StatefulSet deployment here.
ProTip 🤓
Use the internal host for the bcgov image catalog; if you use the external one (contains gov.bc.ca) you'll need to authenticate.
This image is built as per the workflow and the OpenShift templates.
Run RBAC to create an SA and bind it to, this is done on a lab or build cluster:
kind: ClusterRole
name: system:image-pullerUsing the token from the SA above, create a docker registry secret with the appropriate credentials. For the --docker-server argument use the external registry host name.
oc create secret docker-registry bcgov-tools-klab \
--docker-server=image-registry.foo.bar.gov.bc.ca \
--docker-username=bcgov-images-cicd \
--docker-password=$SATOKEN \
--docker-email=unusedThen allow the builder service account to access the newly minted docker credentials for pulling images:
oc secrets add sa/builder secrets/bcgov-tools-klab --for=pullAnd finally, create an imagestreamtag to import the image to your cluster. Again, for the -from-image argument use the external registry host name.
oc create imagestreamtag patroni-postgresql:12.4-latest \
--from-image=image-registry.foo.bar.gov.bc.ca /bcgov-tools/patroni-postgresql:12.4-latestCheck to make sure it imported:
oc get isoc describe is/patroni-postgresql