Skip to content

Commit ac464b3

Browse files
Add postgres 18 version support for stash (#558)
Signed-off-by: souravbiswassanto <saurov@appscode.com>
1 parent bd187ca commit ac464b3

14 files changed

Lines changed: 219 additions & 1 deletion

catalog/catalog.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,8 @@
9090
"14.0-v26",
9191
"15.1-v18",
9292
"16.1-v7",
93-
"17.2-v5"
93+
"17.2-v5",
94+
"18.2"
9495
]
9596
},
9697
{

catalog/copy-images.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ $CMD cp --allow-nondistributable-artifacts --insecure ghcr.io/stashed/stash-post
8484
$CMD cp --allow-nondistributable-artifacts --insecure ghcr.io/stashed/stash-postgres:15.1-v18 $IMAGE_REGISTRY/stashed/stash-postgres:15.1-v18
8585
$CMD cp --allow-nondistributable-artifacts --insecure ghcr.io/stashed/stash-postgres:16.1-v7 $IMAGE_REGISTRY/stashed/stash-postgres:16.1-v7
8686
$CMD cp --allow-nondistributable-artifacts --insecure ghcr.io/stashed/stash-postgres:17.2-v5 $IMAGE_REGISTRY/stashed/stash-postgres:17.2-v5
87+
$CMD cp --allow-nondistributable-artifacts --insecure ghcr.io/stashed/stash-postgres:18.2 $IMAGE_REGISTRY/stashed/stash-postgres:18.2
8788
$CMD cp --allow-nondistributable-artifacts --insecure ghcr.io/stashed/stash-postgres:9.6.19-v37 $IMAGE_REGISTRY/stashed/stash-postgres:9.6.19-v37
8889
$CMD cp --allow-nondistributable-artifacts --insecure ghcr.io/stashed/stash-redis:5.0.13-v26 $IMAGE_REGISTRY/stashed/stash-redis:5.0.13-v26
8990
$CMD cp --allow-nondistributable-artifacts --insecure ghcr.io/stashed/stash-redis:6.2.5-v26 $IMAGE_REGISTRY/stashed/stash-redis:6.2.5-v26

catalog/export-images.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ $CMD pull --allow-nondistributable-artifacts --insecure ghcr.io/stashed/stash-po
8181
$CMD pull --allow-nondistributable-artifacts --insecure ghcr.io/stashed/stash-postgres:15.1-v18 images/stashed-stash-postgres-15.1-v18.tar
8282
$CMD pull --allow-nondistributable-artifacts --insecure ghcr.io/stashed/stash-postgres:16.1-v7 images/stashed-stash-postgres-16.1-v7.tar
8383
$CMD pull --allow-nondistributable-artifacts --insecure ghcr.io/stashed/stash-postgres:17.2-v5 images/stashed-stash-postgres-17.2-v5.tar
84+
$CMD pull --allow-nondistributable-artifacts --insecure ghcr.io/stashed/stash-postgres:18.2 images/stashed-stash-postgres-18.2.tar
8485
$CMD pull --allow-nondistributable-artifacts --insecure ghcr.io/stashed/stash-postgres:9.6.19-v37 images/stashed-stash-postgres-9.6.19-v37.tar
8586
$CMD pull --allow-nondistributable-artifacts --insecure ghcr.io/stashed/stash-redis:5.0.13-v26 images/stashed-stash-redis-5.0.13-v26.tar
8687
$CMD pull --allow-nondistributable-artifacts --insecure ghcr.io/stashed/stash-redis:6.2.5-v26 images/stashed-stash-redis-6.2.5-v26.tar

catalog/imagelist.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
- ghcr.io/stashed/stash-postgres:15.1-v18
4848
- ghcr.io/stashed/stash-postgres:16.1-v7
4949
- ghcr.io/stashed/stash-postgres:17.2-v5
50+
- ghcr.io/stashed/stash-postgres:18.2
5051
- ghcr.io/stashed/stash-postgres:9.6.19-v37
5152
- ghcr.io/stashed/stash-redis:5.0.13-v26
5253
- ghcr.io/stashed/stash-redis:6.2.5-v26

catalog/import-images.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ $CMD push --allow-nondistributable-artifacts --insecure images/stashed-stash-pos
7575
$CMD push --allow-nondistributable-artifacts --insecure images/stashed-stash-postgres-15.1-v18.tar $IMAGE_REGISTRY/stashed/stash-postgres:15.1-v18
7676
$CMD push --allow-nondistributable-artifacts --insecure images/stashed-stash-postgres-16.1-v7.tar $IMAGE_REGISTRY/stashed/stash-postgres:16.1-v7
7777
$CMD push --allow-nondistributable-artifacts --insecure images/stashed-stash-postgres-17.2-v5.tar $IMAGE_REGISTRY/stashed/stash-postgres:17.2-v5
78+
$CMD push --allow-nondistributable-artifacts --insecure images/stashed-stash-postgres-18.2.tar $IMAGE_REGISTRY/stashed/stash-postgres:18.2
7879
$CMD push --allow-nondistributable-artifacts --insecure images/stashed-stash-postgres-9.6.19-v37.tar $IMAGE_REGISTRY/stashed/stash-postgres:9.6.19-v37
7980
$CMD push --allow-nondistributable-artifacts --insecure images/stashed-stash-redis-5.0.13-v26.tar $IMAGE_REGISTRY/stashed/stash-redis:5.0.13-v26
8081
$CMD push --allow-nondistributable-artifacts --insecure images/stashed-stash-redis-6.2.5-v26.tar $IMAGE_REGISTRY/stashed/stash-redis:6.2.5-v26

catalog/import-into-k3s.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ k3s ctr images import images/stashed-stash-postgres-14.0-v26.tar
7373
k3s ctr images import images/stashed-stash-postgres-15.1-v18.tar
7474
k3s ctr images import images/stashed-stash-postgres-16.1-v7.tar
7575
k3s ctr images import images/stashed-stash-postgres-17.2-v5.tar
76+
k3s ctr images import images/stashed-stash-postgres-18.2.tar
7677
k3s ctr images import images/stashed-stash-postgres-9.6.19-v37.tar
7778
k3s ctr images import images/stashed-stash-redis-5.0.13-v26.tar
7879
k3s ctr images import images/stashed-stash-redis-6.2.5-v26.tar
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
apiVersion: stash.appscode.com/v1beta1
2+
kind: Function
3+
metadata:
4+
name: postgres-backup-18.2
5+
spec:
6+
args:
7+
- backup-pg
8+
- --provider=${REPOSITORY_PROVIDER:=}
9+
- --bucket=${REPOSITORY_BUCKET:=}
10+
- --endpoint=${REPOSITORY_ENDPOINT:=}
11+
- --insecure-tls=${REPOSITORY_INSECURE_TLS:=}
12+
- --region=${REPOSITORY_REGION:=}
13+
- --path=${REPOSITORY_PREFIX:=}
14+
- --storage-secret-name=${REPOSITORY_SECRET_NAME:=}
15+
- --storage-secret-namespace=${REPOSITORY_SECRET_NAMESPACE:=}
16+
- --scratch-dir=/stash-tmp
17+
- --enable-cache=${ENABLE_CACHE:=true}
18+
- --max-connections=${MAX_CONNECTIONS:=0}
19+
- --hostname=${HOSTNAME:=}
20+
- --backup-cmd=${backupCMD:=pg_dumpall}
21+
- --pg-args=${args:=}
22+
- --wait-timeout=${waitTimeout:=300}
23+
- --namespace=${NAMESPACE:=default}
24+
- --appbinding=${TARGET_NAME:=}
25+
- --appbinding-namespace=${TARGET_NAMESPACE:=}
26+
- --backupsession=${BACKUP_SESSION:=}
27+
- --retention-keep-last=${RETENTION_KEEP_LAST:=0}
28+
- --retention-keep-hourly=${RETENTION_KEEP_HOURLY:=0}
29+
- --retention-keep-daily=${RETENTION_KEEP_DAILY:=0}
30+
- --retention-keep-weekly=${RETENTION_KEEP_WEEKLY:=0}
31+
- --retention-keep-monthly=${RETENTION_KEEP_MONTHLY:=0}
32+
- --retention-keep-yearly=${RETENTION_KEEP_YEARLY:=0}
33+
- --retention-keep-tags=${RETENTION_KEEP_TAGS:=}
34+
- --retention-prune=${RETENTION_PRUNE:=false}
35+
- --retention-dry-run=${RETENTION_DRY_RUN:=false}
36+
- --output-dir=${outputDir:=}
37+
- --license-apiservice=${LICENSE_APISERVICE:=}
38+
- --user=${user:=}
39+
image: ghcr.io/stashed/stash-postgres:18.2
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
apiVersion: stash.appscode.com/v1beta1
2+
kind: Task
3+
metadata:
4+
name: postgres-backup-18.2
5+
spec:
6+
steps:
7+
- name: postgres-backup-18.2
8+
params:
9+
- name: outputDir
10+
value: /stash-tmp/output
11+
- name: update-status
12+
params:
13+
- name: outputDir
14+
value: /stash-tmp/output
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
apiVersion: stash.appscode.com/v1beta1
2+
kind: Function
3+
metadata:
4+
name: postgres-restore-18.2
5+
spec:
6+
args:
7+
- restore-pg
8+
- --provider=${REPOSITORY_PROVIDER:=}
9+
- --bucket=${REPOSITORY_BUCKET:=}
10+
- --endpoint=${REPOSITORY_ENDPOINT:=}
11+
- --insecure-tls=${REPOSITORY_INSECURE_TLS:=}
12+
- --region=${REPOSITORY_REGION:=}
13+
- --path=${REPOSITORY_PREFIX:=}
14+
- --storage-secret-name=${REPOSITORY_SECRET_NAME:=}
15+
- --storage-secret-namespace=${REPOSITORY_SECRET_NAMESPACE:=}
16+
- --scratch-dir=/stash-tmp
17+
- --enable-cache=${ENABLE_CACHE:=true}
18+
- --max-connections=${MAX_CONNECTIONS:=0}
19+
- --hostname=${HOSTNAME:=}
20+
- --source-hostname=${SOURCE_HOSTNAME:=}
21+
- --pg-args=${args:=}
22+
- --wait-timeout=${waitTimeout:=300}
23+
- --namespace=${NAMESPACE:=default}
24+
- --appbinding=${TARGET_NAME:=}
25+
- --appbinding-namespace=${TARGET_NAMESPACE:=}
26+
- --snapshot=${RESTORE_SNAPSHOTS:=}
27+
- --output-dir=${outputDir:=}
28+
- --license-apiservice=${LICENSE_APISERVICE:=}
29+
- --user=${user:=}
30+
image: ghcr.io/stashed/stash-postgres:18.2
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
apiVersion: stash.appscode.com/v1beta1
2+
kind: Task
3+
metadata:
4+
name: postgres-restore-18.2
5+
spec:
6+
steps:
7+
- name: postgres-restore-18.2
8+
params:
9+
- name: outputDir
10+
value: /stash-tmp/output
11+
- name: update-status
12+
params:
13+
- name: outputDir
14+
value: /stash-tmp/output

0 commit comments

Comments
 (0)