Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: cloudnative-pg/charts
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: a097b3e7a108852868155b6d979c165be91f4360
Choose a base ref
..
head repository: cloudnative-pg/charts
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: e8795eb2fb560bc3b36a953dbe9e99f74b9c5176
Choose a head ref
Showing with 11,803 additions and 5,151 deletions.
  1. +16 −0 .github/actions/deploy-operator/action.yml
  2. +24 −0 .github/actions/setup-kind/action.yml
  3. +32 −0 .github/actions/verify-cluster-ready/action.yml
  4. +32 −0 .github/actions/verify-pooler-ready/action.yml
  5. +0 −6 .github/dependabot.yml
  6. +27 −0 .github/renovate.json5
  7. +0 −60 .github/workflows/continuous-delivery.yml
  8. +6 −6 .github/workflows/lint.yml
  9. +22 −22 .github/workflows/release-pr.yml
  10. +75 −9 .github/workflows/release-publish.yml
  11. +0 −43 .github/workflows/release-tag.yml
  12. +71 −0 .github/workflows/tests-cluster-standalone.yml
  13. +41 −0 .github/workflows/tests-operator.yml
  14. +3 −0 .gitignore
  15. +3 −1 CODEOWNERS
  16. +1 −1 CONTRIBUTING.md
  17. +7 −10 Makefile
  18. +13 −20 README.md
  19. +133 −86 RELEASE.md
  20. +6 −0 charts/cloudnative-pg/Chart.lock
  21. +11 −3 charts/cloudnative-pg/Chart.yaml
  22. +44 −29 charts/cloudnative-pg/README.md
  23. +3 −0 charts/cloudnative-pg/monitoring/grafana-dashboard.json
  24. +1 −1 charts/cloudnative-pg/templates/config.yaml
  25. +8,191 −4,747 charts/cloudnative-pg/templates/crds/crds.yaml
  26. +17 −4 charts/cloudnative-pg/templates/deployment.yaml
  27. +6 −6 charts/cloudnative-pg/templates/mutatingwebhookconfiguration.yaml
  28. +29 −0 charts/cloudnative-pg/templates/podmonitor.yaml
  29. +108 −44 charts/cloudnative-pg/templates/rbac.yaml
  30. +4 −4 charts/cloudnative-pg/templates/validatingwebhookconfiguration.yaml
  31. +63 −19 charts/cloudnative-pg/values.schema.json
  32. +146 −30 charts/cloudnative-pg/values.yaml
  33. +1 −0 charts/cluster/.gitignore
  34. +23 −0 charts/cluster/.helmignore
  35. +31 −0 charts/cluster/Chart.yaml
  36. +240 −0 charts/cluster/README.md
  37. +147 −0 charts/cluster/README.md.gotmpl
  38. +106 −0 charts/cluster/docs/Getting Started.md
  39. +27 −0 charts/cluster/docs/Recovery.md
  40. +49 −0 charts/cluster/docs/runbooks/CNPGClusterHACritical.md
  41. +51 −0 charts/cluster/docs/runbooks/CNPGClusterHAWarning.md
  42. +24 −0 charts/cluster/docs/runbooks/CNPGClusterHighConnectionsCritical.md
  43. +24 −0 charts/cluster/docs/runbooks/CNPGClusterHighConnectionsWarning.md
  44. +31 −0 charts/cluster/docs/runbooks/CNPGClusterHighReplicationLag.md
  45. +28 −0 charts/cluster/docs/runbooks/CNPGClusterInstancesOnSameNode.md
  46. +31 −0 charts/cluster/docs/runbooks/CNPGClusterLowDiskSpaceCritical.md
  47. +31 −0 charts/cluster/docs/runbooks/CNPGClusterLowDiskSpaceWarning.md
  48. +43 −0 charts/cluster/docs/runbooks/CNPGClusterOffline.md
  49. +37 −0 charts/cluster/docs/runbooks/CNPGClusterZoneSpreadWarning.md
  50. +5 −0 charts/cluster/examples/basic.yaml
  51. +24 −0 charts/cluster/examples/custom-queries.yaml
  52. +8 −0 charts/cluster/examples/pgbouncer.yaml
  53. +6 −0 charts/cluster/examples/postgis.yaml
  54. +22 −0 charts/cluster/examples/recovery-backup.yaml
  55. +30 −0 charts/cluster/examples/recovery-object_store.yaml
  56. +19 −0 charts/cluster/examples/standalone-s3.yaml
  57. +26 −0 charts/cluster/prometheus_rules/cluster-ha-critical.yaml
  58. +24 −0 charts/cluster/prometheus_rules/cluster-ha-warning.yaml
  59. +17 −0 charts/cluster/prometheus_rules/cluster-high_connection-critical.yaml
  60. +17 −0 charts/cluster/prometheus_rules/cluster-high_connection-warning.yaml
  61. +19 −0 charts/cluster/prometheus_rules/cluster-high_replication_lag.yaml
  62. +19 −0 charts/cluster/prometheus_rules/cluster-instances_on_same_node.yaml
  63. +24 −0 charts/cluster/prometheus_rules/cluster-low_disk_space-critical.yaml
  64. +24 −0 charts/cluster/prometheus_rules/cluster-low_disk_space-warning.yaml
  65. +19 −0 charts/cluster/prometheus_rules/cluster-offline.yaml
  66. +18 −0 charts/cluster/prometheus_rules/cluster-zone_spread-warning.yaml
  67. +69 −0 charts/cluster/templates/NOTES.txt
  68. +19 −0 charts/cluster/templates/_backup.tpl
  69. +71 −0 charts/cluster/templates/_barman_object_store.tpl
  70. +47 −0 charts/cluster/templates/_bootstrap.tpl
  71. +12 −0 charts/cluster/templates/_colorize.tpl
  72. +70 −0 charts/cluster/templates/_helpers.tpl
  73. +11 −0 charts/cluster/templates/backup-azure-creds.yaml
  74. +8 −0 charts/cluster/templates/backup-google-creds.yaml
  75. +9 −0 charts/cluster/templates/backup-s3-creds.yaml
  76. +9 −0 charts/cluster/templates/ca-bundle.yaml
  77. +78 −0 charts/cluster/templates/cluster.yaml
  78. +21 −0 charts/cluster/templates/pooler.yaml
  79. +29 −0 charts/cluster/templates/prometheus-rule.yaml
  80. +11 −0 charts/cluster/templates/recovery-azure-creds.yaml
  81. +8 −0 charts/cluster/templates/recovery-google-creds.yaml
  82. +9 −0 charts/cluster/templates/recovery-s3-creds.yaml
  83. +18 −0 charts/cluster/templates/scheduled-backups.yaml
  84. +37 −0 charts/cluster/templates/tests/ping.yaml
  85. +17 −0 charts/cluster/templates/user-metrics.yaml
  86. +474 −0 charts/cluster/values.schema.json
  87. +313 −0 charts/cluster/values.yaml
  88. BIN dashboard.png
  89. +83 −0 provenance.gpg
16 changes: 16 additions & 0 deletions .github/actions/deploy-operator/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Deploy the CNPG Operator
description: Deploys the CNPG Operator to a Kubernetes cluster
runs:
using: composite
steps:
- name: Deploy the operator
shell: bash
run:
helm dependency update charts/cloudnative-pg

helm upgrade
--install
--namespace cnpg-system
--create-namespace
--wait
cnpg charts/cloudnative-pg
24 changes: 24 additions & 0 deletions .github/actions/setup-kind/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Setup Kind
description: Sets up a kind cluster and installs Helm and kubectl
outputs:
helm-path:
description: The path to the Helm binary
value: ${{ steps.helm.outputs.helm-path }}
kubectl-path:
description: The path to the kubectl binary
value: ${{ steps.kubectl.outputs.kubectl-path }}
runs:
using: composite
steps:
- id: helm
name: Set up Helm
uses: azure/setup-helm@5119fcb9089d432beecbf79bb2c7915207344b78 # v3.5
with:
version: v3.6.2

- id: kubectl
name: Install kubectl
uses: azure/setup-kubectl@901a10e89ea615cf61f57ac05cecdf23e7de06d8 # v3.2

- name: Create kind cluster
uses: helm/kind-action@0025e74a8c7512023d06dc019c617aa3cf561fde # v1.10.0
32 changes: 32 additions & 0 deletions .github/actions/verify-cluster-ready/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Verifies that a CNPG cluster has a certain amount of ready instances
description: Verifies that a CNPG cluster has a certain amount of ready instances
inputs:
cluster-name:
description: The name of the cluster to verify
required: true
default: database-cluster
ready-instances:
description: The amount of ready instances to wait for
required: true
default: "3"

runs:
using: composite
steps:
- name: Wait for the cluster to become ready
shell: bash
run: |
ITER=0
while true; do
if [[ $ITER -ge 300 ]]; then
echo "Cluster not ready"
exit 1
fi
READY_INSTANCES=$(kubectl get clusters.postgresql.cnpg.io ${INPUT_CLUSTER_NAME} -o jsonpath='{.status.readyInstances}')
if [[ "$READY_INSTANCES" == ${INPUT_READY_INSTANCES} ]]; then
echo "Cluster up and running"
break
fi
sleep 1
(( ++ITER ))
done
32 changes: 32 additions & 0 deletions .github/actions/verify-pooler-ready/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Verifies that a CNPG cluster has a certain amount of ready instances
description: Verifies that a CNPG cluster has a certain amount of ready instances
inputs:
pooler-name:
description: The name of the pooler to verify
required: true
default: database-cluster
ready-instances:
description: The amount of ready instances to wait for
required: true
default: "3"

runs:
using: composite
steps:
- name: Wait for the pooler to become ready
shell: bash
run: |
ITER=0
while true; do
if [[ $ITER -ge 300 ]]; then
echo "Pooler not ready"
exit 1
fi
READY_INSTANCES=$(kubectl get deployments.apps ${INPUT_POOLER_NAME} -o jsonpath='{.status.readyReplicas}')
if [[ "$READY_INSTANCES" == ${INPUT_READY_INSTANCES} ]]; then
echo "Pooler up and running"
break
fi
sleep 1
(( ++ITER ))
done
6 changes: 0 additions & 6 deletions .github/dependabot.yml

This file was deleted.

27 changes: 27 additions & 0 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:base"
],
"prConcurrentLimit": 5,
"semanticCommits": "enabled",
"regexManagers": [
{
"fileMatch": ["charts\\/cloudnative-pg\\/Chart\\.yaml$"],
"matchStrings": [
"appVersion: \"(?<currentValue>.*?)\"",
],
"datasourceTemplate": "docker",
"depNameTemplate": "ghcr.io/cloudnative-pg/cloudnative-pg",
"versioningTemplate": "loose"
},
],
"packageRules": [
{
"matchDepTypes": [
"action"
],
"pinDigests": true
},
]
}
60 changes: 0 additions & 60 deletions .github/workflows/continuous-delivery.yml

This file was deleted.

12 changes: 6 additions & 6 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -8,24 +8,24 @@ on:

jobs:
linter:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3.5.2
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
fetch-depth: 0

- name: Set up Helm
uses: azure/setup-helm@v3.5
uses: azure/setup-helm@5119fcb9089d432beecbf79bb2c7915207344b78 # v3.5
with:
version: v3.4.0

- uses: actions/setup-python@v4
- uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1
with:
python-version: 3.7

- name: Set up chart-testing
uses: helm/chart-testing-action@v2.4.0
uses: helm/chart-testing-action@e6669bcd63d7cb57cb4380c33043eebe5d111992 # v2.6.1

- name: Run chart-testing (list-changed)
id: list-changed
@@ -37,4 +37,4 @@ jobs:
- name: Run chart-testing (lint)
run: |
ct lint --target-branch=main --check-version-increment=false
ct lint --chart-repos cnpg-grafana=https://cloudnative-pg.github.io/grafana-dashboards --target-branch=main --check-version-increment=false
44 changes: 22 additions & 22 deletions .github/workflows/release-pr.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
# Create a PR for a release when a commit is pushed on a release/v* branch

##
# Create a PR for a release when a commit is pushed on a release/*-v* branch to support the releases of both the
# operator and cluster charts
name: release-pr

on:
push:
branches:
- release/*-v*
- release/*-v*

permissions:
pull-requests: write

jobs:
pull-request:
runs-on: ubuntu-20.04
create-pull-request:
runs-on: ubuntu-22.04
steps:
-
name: Checkout
uses: actions/checkout@v3.5.2
-
name: Get tag
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Create Pull Request
id: create-pr
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
echo "TAG=${GITHUB_REF##*/}" >> $GITHUB_ENV
-
name: Pull Request
id: open-pr
uses: repo-sync/pull-request@v2.6.2
with:
destination_branch: "main"
github_token: ${{ secrets.GITHUB_TOKEN }}
pr_body: "Automated PR. Will trigger the ${{ env.TAG }} release when approved."
pr_label: release
pr_title: "Release ${{ env.TAG }}"

TAG="${GITHUB_REF##*/}"
TITLE="Release ${TAG}"
BODY="Automated PR. Will trigger the ${TAG} release when approved."
LABEL=release
ASSIGNEE=${{ github.actor }}
gh pr create --title "${TITLE}" --body "${BODY}" --label "${LABEL}" --assignee "${ASSIGNEE}" ||
gh pr edit --title "${TITLE}" --body "${BODY}" --add-label "${LABEL}"
84 changes: 75 additions & 9 deletions .github/workflows/release-publish.yml
Original file line number Diff line number Diff line change
@@ -2,21 +2,87 @@ name: release-publish

on:
push:
tags:
- '*-v*'
branches:
- main

permissions:
contents: write # Required for pushing the Helm charts to the gh-pages branch
packages: write # Required for GHCR access
id-token: write # Required for signing

jobs:
release:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3.5.2
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
fetch-depth: 0 # important for fetching all history to run comparison against

- name: Fetch history
run: git fetch --prune

- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
- name: Import PGP Private Key
run: |
echo "${{ secrets.PGP_PRIVATE_KEY }}" | gpg --dearmor --output /tmp/keyring.gpg
echo "${{ secrets.PGP_KEY_PASSPHRASE }}" > /tmp/passphrase-file.txt
- name: Set up Helm
uses: azure/setup-helm@fe7b79cd5ee1e45176fcad797de68ecaf3ca4814 # v4.2.0
with:
fetch-depth: 0
version: v3.14.1

- name: Add chart dependencies
run: |
helm repo add cnpg-grafana-dashboard https://cloudnative-pg.github.io/grafana-dashboards
- name: Run chart-releaser
uses: helm/chart-releaser-action@a917fd15b20e8b64b94d9158ad54cd6345335584 # v1.6.0
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
CR_KEY: helm-charts+no-reply@cloudnative-pg.io
CR_KEYRING: /tmp/keyring.gpg
CR_PASSPHRASE_FILE: /tmp/passphrase-file.txt
CR_SIGN: true
CR_SKIP_EXISTING: true
CR_GENERATE_RELEASE_NOTES: true
CR_RELEASE_NAME_TEMPLATE: "{{ .Name }}-v{{ .Version }}"

- name: Publish Helm charts
uses: stefanprodan/helm-gh-pages@v1.7.0
- name: Securely delete the PGP key and passphrase
if: always()
run: shred --remove=wipesync /tmp/keyring.gpg /tmp/passphrase-file.txt

- name: Login to GitHub Container Registry
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
with:
helm_version: 3.4.0
token: "${{ secrets.REPO_GHA_PAT }}"
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Install sigstore/cosign
uses: sigstore/cosign-installer@59acb6260d9c0ba8f4a2f9d9b48431a222b68e20 # v3.5.0

- name: Push charts to GHCR
env:
COSIGN_EXPERIMENTAL: 1
# when filling gaps with previously released charts, cr would create
# nothing in .cr-release-packages/, and the original globbing character
# would be preserved, causing a non-zero exit. Set nullglob to fix this
run: |
shopt -s nullglob
for pkg in .cr-release-packages/*.tgz; do
if [ -z "${pkg:-}" ]; then
break
fi
helm push "${pkg}" oci://ghcr.io/"${GITHUB_REPOSITORY}"
file=${pkg##*/}
name=${file%-*}
version=${file%.*}
version=${version##*-}
cosign sign --yes ghcr.io/"${GITHUB_REPOSITORY}"/"${name}":"${version}"
done
Loading