~data-platform/+git/pgbouncer:edge

Last commit made on 2022-12-13
Get this branch:
git clone -b edge https://git.launchpad.net/~data-platform/+git/pgbouncer
Members of Canonical Data Platform can upload to this branch. Log in for directions.

Branch merges

Branch information

Name:
edge
Repository:
lp:~data-platform/+git/pgbouncer

Recent commits

67bcca7... by Will Fitch

updated base container image to 22.04, and pgbouncer to 1.16.1 (#5)

# PR

https://github.com/canonical/pgbouncer-container/pull/5

## Proposal
Updates the base container image to jammy, allowing us to install pgbouncer v1.16.1, which has a lot more functionality.

## Context
- This is currently untested on the pgbouncer charm, which currently uses `pgbouncer:latest`. I'm going to open a PR to switch that to the v1.12 container, then update it to use the 22.04 container manually, with tests.
  - Therefore, when releasing this container, please don't release it to `latest` right away.

## Release Notes
- update base container image to use ubuntu jammy (22.04) and pgbouncer to 1.16.1.

7e30a5e... by Will Fitch

updating filepath and users to match machine charm (#3)

## Proposal
This PR implements some minor changes to the pgbouncer container so the pgbouncer-k8s-operator charm has the same user and filesystem as the machine charm.

## Release Notes
- removed pgbouncer user. The charms now use the `postgres` user, which is generated when pgbouncer is installed via apt. However, this user can't access /etc/pgbouncer, so we move the pgbouncer installation to /var/lib/postgresql/pgbouncer.

## Testing
This has been used when building/testing the pgbouncer-k8s-operator charm.

e5d500a... by Will Fitch

DPE-70 Add CI (#2)

## Proposal
Currently the container for pgbouncer has no CI to lint or build an image. This PR adds these features, as well as a licence, .gitignore file, and a pull request template.

This CI can later be extended to include [DPE-70](https://warthogs.atlassian.net/browse/DPE-70?atlOrigin=eyJpIjoiZTM2NTU4ZGNjZjY4NGQxOTkyYWJjNWIyZjkzMjkzMmYiLCJwIjoiaiJ9), automatically deploying this container to dockerhub.

## Release Notes
- Added linting CI
- Added build & deploy test CI
- Added License
- Added pull request template

## Testing
These have been run on a [personal fork](https://github.com/WRFitch/pgbouncer-container/actions?query=branch%3ADPE-70-add-ci++).

## Commit History

* preliminary ubuntu container added, featuring some example config files so pgbouncer can come online

* removed -d flag from entrypoint

* added entrypoint script

Entrypoint script generates pgbouncer.ini and userlist.txt from the documented environment variables, removing the need for static defaults and allowing easier control from the charm.

* updating entrypoint script & defaults

Dockerfile no longer sets port default, nor does it expose the port, since we want to do this at runtime and not buildtime.
entrypoint.sh moved to /
Added & documented defaults in entrypoint.sh and readme.md respectively. If there's no value for PGB_DATABASES, error out since we have no databases to connect to.
added set -euo pipefail to entrypoint.sh, which ensures that the script fails if any of its components fail.

* removed superfluous .gitignore and updated readme

* fixed formatting in readme.md

* added licence, gitignore, and CI

* Added pull request template

* adding licence and updating name

* Create lint.yml

* Create pull_request.yml

* fix dockerfile naming

* fixing dockerfile linting

* removing accidental duplicated CI

* fixed dockerfile access again

* updated dockerfile and entrypoint based on linter feedback

* pr workflow fix

* changing image label and removing loop stuff

* renaming files and removing weird readme info

9440993... by Will Fitch

Add Basic Container (#1)

* preliminary ubuntu container added, featuring some example config files so pgbouncer can come online

* removed -d flag from entrypoint

* added entrypoint script

Entrypoint script generates pgbouncer.ini and userlist.txt from the documented environment variables, removing the need for static defaults and allowing easier control from the charm.

* updating entrypoint script & defaults

Dockerfile no longer sets port default, nor does it expose the port, since we want to do this at runtime and not buildtime.
entrypoint.sh moved to /
Added & documented defaults in entrypoint.sh and readme.md respectively. If there's no value for PGB_DATABASES, error out since we have no databases to connect to.
added set -euo pipefail to entrypoint.sh, which ensures that the script fails if any of its components fail.

* removed superfluous .gitignore and updated readme

1824c96... by Will Fitch

Initial commit