Skip to content

Commit 641d8ff

Browse files
committed
docs: first draft
Signed-off-by: Niccolò Fei <[email protected]>
1 parent 758772c commit 641d8ff

File tree

5 files changed

+56
-12
lines changed

5 files changed

+56
-12
lines changed

.github/workflows/bake.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Build and publish extensions
1+
name: Build, test and publish extensions
22

33
on:
44
push:
@@ -54,3 +54,5 @@ jobs:
5454
with:
5555
environment: ${{ (github.ref == 'refs/heads/main') && 'production' || 'testing'}}
5656
extension_name: ${{ matrix.name }}
57+
secrets:
58+
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}

.github/workflows/bake_targets.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Build target extension
1+
name: Build, test and publish a target extension
22

33
on:
44
workflow_call:

.github/workflows/update.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
name: Update Extension versions
55

66
on:
7-
push:
87
schedule:
98
- cron: 0 0 * * 1
109
workflow_dispatch:
@@ -13,7 +12,7 @@ defaults:
1312
run:
1413
shell: 'bash -Eeuo pipefail -x {0}'
1514

16-
permissions: read-all
15+
permissions: {}
1716

1817
jobs:
1918
fetch-extensions:
@@ -43,7 +42,6 @@ jobs:
4342
extension: ${{fromJson(needs.fetch-extensions.outputs.extensions)}}
4443
permissions:
4544
contents: write
46-
pull-requests: write
4745
steps:
4846
- name: Checkout repository
4947
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
@@ -99,6 +97,7 @@ jobs:
9997
uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7
10098
if: github.ref == 'refs/heads/main'
10199
with:
100+
token: ${{ secrets.REPO_GHA_PAT }}
102101
title: "chore: update ${{ matrix.extension }} versions"
103102
body: "Updating the versions of ${{ matrix.extension }}"
104103
branch: "${{ matrix.extension }}-update"

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ in CloudNativePG.
2020

2121
## Supported Extensions
2222

23-
Currently: **none**.
24-
This repository lays the foundation for packaging extensions going forward.
23+
Currently:
24+
- **pgvector** - Open-source vector similarity search for PostgreSQL
2525

2626
---
2727

@@ -34,18 +34,18 @@ Each extension image tag follows this format:
3434
```
3535

3636
**Example:**
37-
Building `pgvector` version `0.8.1` on PostgreSQL `17.6` for the `trixie`
37+
Building `pgvector` version `0.8.1` on PostgreSQL `18.0` for the `trixie`
3838
distro, with build timestamp `202509101200`, results in:
3939

4040
```
41-
pgvector:17.6-0.8.1-202509101200-trixie
41+
pgvector:18.0-0.8.1-202509101200-trixie
4242
```
4343

4444
For convenience, **rolling tags** should also be published:
4545

4646
```
47-
pgvector:17.6-0.8.1-trixie
48-
pgvector:17-0.8.1-trixie
47+
pgvector:18.0-0.8.1-trixie
48+
pgvector:18-0.8.1-trixie
4949
```
5050

5151
This scheme ensures:

pgvector/README.md

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,44 @@
1-
# TODO
1+
# PgVector
2+
3+
[PgVector](https://github.com/pgvector/pgvector) is an open-source vector similarity search for PostgreSQL.
4+
5+
## How It Works
6+
7+
To use this extension container image, first add it to your Cluster.
8+
For example:
9+
10+
```yaml
11+
apiVersion: postgresql.cnpg.io/v1
12+
kind: Cluster
13+
metadata:
14+
name: cluster-pgvector
15+
spec:
16+
imageName: ghcr.io/cloudnative-pg/postgresql:18-minimal-trixie
17+
instances: 1
18+
19+
storage:
20+
size: 1Gi
21+
22+
postgresql:
23+
extensions:
24+
- name: pgvector
25+
image:
26+
reference: ghcr.io/cloudnative-pg/pgvector:18-0.8.1-trixie
27+
```
28+
29+
Then, create or add it to an existing Database object to install the extension in a target database.
30+
For example, to add it to the `app` Database:
31+
32+
```yaml
33+
apiVersion: postgresql.cnpg.io/v1
34+
kind: Database
35+
metadata:
36+
name: cluster-pgvector-app
37+
spec:
38+
name: app
39+
owner: app
40+
cluster:
41+
name: cluster-pgvector
42+
extensions:
43+
- name: vector
44+
```

0 commit comments

Comments
 (0)