Skip to content

Commit 557ed81

Browse files
committed
feat: additional tags with minor pg version
This changes the pgedge image build process to produce new tags that include the Postgres minor version. In order to keep the image versioning scheme simple, we'll continue to increment the image version, e.g. `4.0.10-4`, for minor postgres releases. Control Plane will use the image tags that include the minor Postgres version so that users can easily see it if they run `docker ps`.
1 parent 54c9b88 commit 557ed81

File tree

3 files changed

+30
-14
lines changed

3 files changed

+30
-14
lines changed

docker-bake.hcl

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,48 @@
11
variable "IMAGE_REPO_HOST" {
2-
default = "public.ecr.aws/k8c8c8g7"
2+
default = "public.ecr.aws/k8c8c8g7"
33
}
44

55
variable "PGEDGE_REPO_BASE_URL" {
6-
default = "http://pgedge-529820047909-yum.s3-website.us-east-2.amazonaws.com"
6+
default = "http://pgedge-529820047909-yum.s3-website.us-east-2.amazonaws.com"
77
}
88

99
variable "PGEDGE_RELEASE_CHANNEL" {
10-
default = "dev"
10+
default = "dev"
1111
}
1212

1313
function "pgedgeTag" {
14-
params = [repo, pg_version, image_version]
15-
result = ["${repo}:pg${pg_version}_${image_version}"]
14+
params = [repo, pg_version, image_version]
15+
result = [
16+
"${repo}:pg${pg_version.major}_${image_version}",
17+
"${repo}:pg${pg_version.major}.${pg_version.minor}_${image_version}",
18+
]
1619
}
1720

1821
target "pgedge" {
1922
context = "docker/pgedge"
2023
matrix = {
21-
pg_version = ["15", "16", "17"],
24+
pg_version = [
25+
{
26+
major = "15"
27+
minor = "13"
28+
},
29+
{
30+
major = "16"
31+
minor = "9"
32+
},
33+
{
34+
major = "17"
35+
minor = "5"
36+
}
37+
],
2238
image_version = ["4.0.10-4"]
2339
}
24-
name = replace("pgedge-${pg_version}-${image_version}", ".", "_")
40+
name = replace("pgedge-${pg_version.major}-${image_version}", ".", "_")
2541
tags = pgedgeTag("${IMAGE_REPO_HOST}/pgedge", pg_version, image_version)
2642
args = {
2743
REPO_BASE_URL = PGEDGE_REPO_BASE_URL
2844
RELEASE_CHANNEL = PGEDGE_RELEASE_CHANNEL
29-
POSTGRES_VERSION = pg_version
45+
POSTGRES_VERSION = pg_version.major
3046
IMAGE_VERSION = image_version
3147
}
3248
platforms = [

docker/pgedge/CHANGELOG.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@
88

99
#### pg15 variant
1010

11-
- Upgraded to PostgreSQL 15.13-1
11+
- Upgraded PostgreSQL to 15.13-1
1212

1313
#### pg16 variant
1414

15-
- Upgraded to PostgreSQL 16.9-1
15+
- Upgraded PostgreSQL to 16.9-1
1616

1717
#### pg17 variant
1818

19-
- Upgraded to PostgreSQL 17.5-1
19+
- Upgraded PostgreSQL to 17.5-1
2020

2121
## [4.0.10-3] - 2025-03-20
2222

server/internal/orchestrator/swarm/orchestrator.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,11 +129,11 @@ func GetImages(cfg config.Config, version *host.PgEdgeVersion) (*Images, error)
129129
var tag string
130130
switch version.PostgresVersion.Major() {
131131
case 17:
132-
tag = "pgedge:pg17_4.0.10-4"
132+
tag = "pgedge:pg17.5_4.0.10-4"
133133
case 16:
134-
tag = "pgedge:pg16_4.0.10-4"
134+
tag = "pgedge:pg16.9_4.0.10-4"
135135
case 15:
136-
tag = "pgedge:pg15_4.0.10-4"
136+
tag = "pgedge:pg15.13_4.0.10-4"
137137
default:
138138
return nil, fmt.Errorf("unsupported postgres version: %q", version.PostgresVersion)
139139
}

0 commit comments

Comments
 (0)