Skip to content

Commit 4c39f1c

Browse files
committed
Merge branch 'main' into feat/add-pg_vim-extension
2 parents 553d7de + b25baf5 commit 4c39f1c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+3202
-229
lines changed

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
blank_issues_enabled: true
2+
- name: Slack chat
3+
url: https://github.com/cloudnative-pg/cloudnative-pg?tab=readme-ov-file#communications
4+
about: Please join the slack channel and interact with our community
Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
name: New Extension Proposal
2+
description: Propose a new PostgreSQL extension to be included in the containers and commit to its maintenance.
3+
title: "[New Extension]: "
4+
labels: ["triage", "new-extension"]
5+
projects: ["cloudnative-pg/postgres-extensions-containers"]
6+
body:
7+
- type: markdown
8+
attributes:
9+
value: |
10+
Thanks for proposing a new extension for the PostgreSQL Extensions Containers project!
11+
12+
The submission process requires the proposer to commit to becoming the **Component Owner** and taking on the long-term maintenance of the extension image. Please review the [governance document for the submission process](https://github.com/cloudnative-pg/postgres-extensions-containers?tab=readme-ov-file#submission-process).
13+
14+
- type: checkboxes
15+
id: search
16+
attributes:
17+
label: Is there an existing issue for this extension request?
18+
description: Before you submit a request, please **search existing issues** to ensure this extension hasn't already been proposed.
19+
options:
20+
- label: I have searched for an existing issue, and could not find a duplicate request.
21+
required: true
22+
23+
- type: input
24+
id: extension-name
25+
attributes:
26+
label: Extension Name
27+
description: What is the official name of the PostgreSQL extension?
28+
placeholder: ex. pgvector
29+
validations:
30+
required: true
31+
32+
- type: input
33+
id: project-url
34+
attributes:
35+
label: Project Repository URL
36+
description: The URL of the main source code repository (e.g., GitHub, GitLab).
37+
placeholder: ex. https://github.com/pgvector/pgvector
38+
validations:
39+
required: true
40+
41+
- type: input
42+
id: website-url
43+
attributes:
44+
label: Extension Website URL (Optional)
45+
description: The URL of the official website or main documentation page.
46+
placeholder: ex. https://pgvector.io/
47+
validations:
48+
required: false
49+
50+
- type: textarea
51+
id: description
52+
attributes:
53+
label: Short Description
54+
description: A brief description of the extension and its primary use case.
55+
placeholder: ex. The pgvector extension provides vector similarity search capabilities for PostgreSQL.
56+
validations:
57+
required: true
58+
59+
- type: input
60+
id: license-url
61+
attributes:
62+
label: Main LICENSE Link
63+
description: A direct link to the main license file in the repository (e.g., a link to the raw LICENSE file).
64+
placeholder: ex. https://github.com/pgvector/pgvector/blob/master/LICENSE
65+
validations:
66+
required: true
67+
68+
- type: checkboxes
69+
id: license-check
70+
attributes:
71+
label: License Compliance
72+
description: Please confirm the license of the extension complies with the **allowed licenses** for this project.
73+
options:
74+
- label: The extension's license (linked above) complies with the list of allowed licenses.
75+
required: true
76+
77+
- type: textarea
78+
id: dependent-extensions
79+
attributes:
80+
label: Known Dependent Extensions
81+
description: List any other PostgreSQL extensions that MUST be installed before or alongside this extension (e.g., if this extension requires 'plpgsql' or 'postgis' to be present). If none, please state "None".
82+
placeholder: ex. postgis
83+
validations:
84+
required: true
85+
86+
- type: checkboxes
87+
id: maintenance-commitment
88+
attributes:
89+
label: Component Owner and Maintenance Commitment
90+
description: By checking this box, you confirm your commitment to the long-term maintenance of the extension image. This includes providing updates for new upstream versions, responding to security issues, and ensuring compatibility with new PostgreSQL/OS versions.
91+
options:
92+
- label: I/My organization commit to becoming the Component Owner and maintaining the extension image in the future.
93+
required: true
94+
95+
- type: textarea
96+
id: additional-notes
97+
attributes:
98+
label: Additional Notes (Optional)
99+
description: Any other relevant information, required dependencies (like OS packages), or context that might be useful for packaging.
100+
placeholder: ex. This extension requires the 'openssl' library (OS package) to be installed.
101+
validations:
102+
required: false
103+
104+
- type: input
105+
id: github-handles
106+
attributes:
107+
label: GitHub Handles of Component Owners
108+
description: List the GitHub handles (e.g., `@user1`, `@org/team`) that will be responsible for maintaining the extension and should be added to the `CODEOWNERS` file.
109+
placeholder: ex. @user1
110+
validations:
111+
required: true
112+
113+
- type: checkboxes
114+
id: terms
115+
attributes:
116+
label: Code of Conduct
117+
description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/cloudnative-pg/governance/blob/main/CODE_OF_CONDUCT.md)
118+
options:
119+
- label: I agree to follow this project's Code of Conduct
120+
required: true

.github/workflows/bake.yml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
matrix: ${{ steps.get-matrix.outputs.matrix}}
3030
steps:
3131
- name: Checkout
32-
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6
32+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
3333
with:
3434
persist-credentials: false
3535

@@ -40,7 +40,7 @@ jobs:
4040
filters: |
4141
_shared: &shared
4242
- 'docker-bake.hcl'
43-
- 'Makefile'
43+
- 'Taskfile.yml'
4444
- 'kind-config.yaml'
4545
- 'test/**'
4646
- '.github/workflows/bake*.yml'
@@ -93,3 +93,16 @@ jobs:
9393
extension_name: ${{ matrix.extension }}
9494
secrets:
9595
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
96+
97+
Catalogs:
98+
name: Update Catalogs
99+
needs: Bake
100+
runs-on: ubuntu-24.04
101+
permissions:
102+
contents: write
103+
if: github.ref == 'refs/heads/main'
104+
steps:
105+
- name: Repository Dispatch
106+
uses: peter-evans/repository-dispatch@28959ce8df70de7be546dd1250a005dd32156697 # v4
107+
with:
108+
event-type: update-catalogs

.github/workflows/bake_targets.yml

Lines changed: 23 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ jobs:
2727
images: ${{ steps.images.outputs.images }}
2828
steps:
2929
- name: Checkout Code
30-
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6
30+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
3131
with:
3232
persist-credentials: false
3333

3434
- name: Log in to the GitHub Container registry
35-
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3
35+
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3
3636
with:
3737
registry: ghcr.io
3838
username: ${{ github.actor }}
@@ -44,12 +44,13 @@ jobs:
4444
platforms: 'linux/arm64'
4545

4646
- name: Set up Docker Buildx
47-
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3
47+
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3
4848

4949
- name: Build and push
5050
uses: docker/bake-action@5be5f02ff8819ecd3092ea6b2e6261c31774f2b4 # v6
5151
id: build
5252
env:
53+
BUILDX_METADATA_PROVENANCE: disabled
5354
environment: testing
5455
registry: ghcr.io/${{ github.repository_owner }}
5556
revision: ${{ github.sha }}
@@ -93,7 +94,7 @@ jobs:
9394
image: ${{fromJson(needs.testbuild.outputs.images)}}
9495
steps:
9596
- name: Checkout Code
96-
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6
97+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
9798
with:
9899
persist-credentials: false
99100

@@ -118,76 +119,37 @@ jobs:
118119
fail-fast: false
119120
matrix:
120121
image: ${{fromJson(needs.testbuild.outputs.images)}}
121-
cnpg: ["main", "1.27"]
122-
env:
123-
# renovate: datasource=github-tags depName=kubernetes-sigs/kind versioning=semver
124-
KIND_VERSION: "v0.30.0"
125-
# renovate: datasource=docker depName=kindest/node
126-
KIND_NODE_VERSION: "v1.34.0"
122+
cnpg: ["main", "1.27", "1.28"]
127123
steps:
128124
- name: Checkout Code
129-
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6
125+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
130126
with:
131127
persist-credentials: false
132128

133-
- name: Install Go
134-
uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6
135-
with:
136-
cache: false
137-
go-version: 'stable'
138-
139-
- name: Create kind cluster
140-
uses: helm/kind-action@92086f6be054225fa813e0a4b13787fc9088faab # v1.13.0
141-
with:
142-
version: ${{ env.KIND_VERSION }}
143-
kubectl_version: ${{ env.KIND_NODE_VERSION }}
144-
node_image: kindest/node:${{ env.KIND_NODE_VERSION }}
145-
config: kind-config.yaml
129+
- name: Install Task
130+
uses: go-task/setup-task@0ab1b2a65bc55236a3bc64cde78f80e20e8885c2 # v1.0.0
146131

147-
- name: Install CNPG (${{ matrix.cnpg }})
148-
env:
149-
CNPG_RELEASE: ${{ matrix.cnpg }}
150-
run: |
151-
operator_manifest="https://raw.githubusercontent.com/cloudnative-pg/artifacts/release-$CNPG_RELEASE/manifests/operator-manifest.yaml"
152-
if [[ "$CNPG_RELEASE" == "main" ]]; then
153-
operator_manifest="https://raw.githubusercontent.com/cloudnative-pg/artifacts/main/manifests/operator-manifest.yaml"
154-
fi
155-
curl -sSfL "$operator_manifest" | kubectl apply --server-side -f -
156-
kubectl wait --for=condition=Available --timeout=2m -n cnpg-system deployments cnpg-controller-manager
157-
158-
- name: Generate Chainsaw runtime values
132+
- name: Install Dagger
159133
env:
160-
EXT_NAME: ${{ inputs.extension_name }}
161-
EXT_IMAGE: ${{ matrix.image }}
134+
# renovate: datasource=github-tags depName=dagger/dagger versioning=semver
135+
DAGGER_VERSION: 0.19.11
162136
run: |
163-
# Get the PG base image
164-
export PG_IMAGE=$(skopeo inspect "docker://$EXT_IMAGE" -f '{{ json .Labels }}' | jq -r '."io.cloudnativepg.image.base.name"')
137+
curl -L https://dl.dagger.io/dagger/install.sh | BIN_DIR=$HOME/.local/bin sh
165138
166-
go install github.com/tmccombs/hcl2json@v0.6.8
167-
go install github.com/mikefarah/yq/v4@v4
168-
169-
# Convert metadata.hcl to YAML and merge it with runtime values to generate a valid Chainsaw values.yaml
170-
yq eval -P '
171-
.metadata.extension_image = strenv(EXT_IMAGE) |
172-
.metadata.pg_image = strenv(PG_IMAGE) |
173-
.metadata
174-
' <(hcl2json "$EXT_NAME/metadata.hcl") > "$EXT_NAME/values.yaml"
175-
cat "$EXT_NAME/values.yaml"
139+
- name: Set up environment
140+
run: |
141+
task e2e:setup-env
176142
177-
- name: Install Chainsaw
178-
uses: kyverno/action-install-chainsaw@6354895e0f99ab23d3e38d85cf5c71b5dc21d727 # v0.2.13
143+
- name: Generate Chainsaw testing values
144+
run: |
145+
task e2e:generate-values EXTENSION_IMAGE="${{ matrix.image }}" TARGET="${{ inputs.extension_name }}"
179146
180-
- name: Run Kyverno/Chainsaw
181-
env:
182-
EXT_NAME: ${{ inputs.extension_name }}
147+
- name: Run e2e tests
183148
run: |
184-
# Common smoke tests
185-
chainsaw test ./test --values "$EXT_NAME/values.yaml"
149+
# Get Kind cluster internal kubeconfig
150+
task e2e:export-kubeconfig KUBECONFIG_PATH=./kubeconfig INTERNAL=true
186151
187-
# Specific smoke tests
188-
if [ -d "$EXT_NAME/test" ]; then
189-
chainsaw test "$EXT_NAME/test" --values "$EXT_NAME/values.yaml"
190-
fi
152+
task e2e:test TARGET="${{ inputs.extension_name }}" KUBECONFIG_PATH="./kubeconfig"
191153
192154
copytoproduction:
193155
name: Copy images to production
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: Update Extension Image Catalogs
2+
3+
on:
4+
schedule:
5+
# Refresh Catalogs once a week, on Mondays - 1h after postgres-container images
6+
- cron: 0 9 * * 1
7+
workflow_dispatch:
8+
repository_dispatch:
9+
types: [update-catalogs]
10+
11+
permissions: read-all
12+
13+
defaults:
14+
run:
15+
shell: "bash -Eeuo pipefail -x {0}"
16+
17+
jobs:
18+
update-catalogs:
19+
runs-on: ubuntu-24.04
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
23+
with:
24+
persist-credentials: false
25+
26+
- name: Checkout artifacts
27+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
28+
with:
29+
path: artifacts
30+
repository: cloudnative-pg/artifacts
31+
token: ${{ secrets.REPO_GHA_PAT }}
32+
ref: main
33+
34+
- name: Update catalogs
35+
id: update-extension-catalogs
36+
uses: dagger/dagger-for-github@d913e70051faf3b907d4dd96ef1161083c88c644 # v8.2.0
37+
env:
38+
# renovate: datasource=github-tags depName=dagger/dagger versioning=semver
39+
DAGGER_VERSION: 0.19.11
40+
with:
41+
version: ${{ env.DAGGER_VERSION }}
42+
verb: call
43+
module: ./dagger/maintenance/
44+
args: generate-catalogs --catalogs-dir artifacts/image-catalogs/ export --path artifacts/image-catalogs/
45+
46+
- name: Diff
47+
working-directory: artifacts
48+
run: |
49+
git add -A .
50+
git status
51+
git diff --staged
52+
53+
- uses: EndBug/add-and-commit@a94899bca583c204427a224a7af87c02f9b325d5 # v9
54+
if: github.ref == 'refs/heads/main'
55+
with:
56+
cwd: 'artifacts'
57+
add: 'image-catalogs'
58+
author_name: CloudNativePG Automated Updates
59+
author_email: noreply@cnpg.com
60+
message: 'chore: update extensions imageCatalogs'

0 commit comments

Comments
 (0)