Skip to content

Commit 86e8cde

Browse files
committed
Use version tag for release container images
Assisted-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 0ae5335 commit 86e8cde

2 files changed

Lines changed: 23 additions & 7 deletions

File tree

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
DEFAULTS_GO := internal/config/defaults.go
55
extract = $(shell grep '$(1)' $(DEFAULTS_GO) | head -1 | sed 's/.*"\(.*\)"/\1/')
66

7-
BINK_IMAGE := $(call extract,BinkImage )
8-
CLUSTER_IMAGE := $(call extract,DefaultClusterImage )
9-
DNS_IMAGE := $(call extract,DNSImage )
7+
BINK_IMAGE := $(call extract,binkImageBase ):latest
8+
CLUSTER_IMAGE := $(call extract,clusterImageBase ):latest
9+
DNS_IMAGE := $(call extract,dnsImageBase ):latest
1010
FEDORA_VERSION := $(call extract,FedoraVersion )
1111

1212
# Binary

internal/config/defaults.go

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,19 @@
33

44
package config
55

6+
import "github.com/bootc-dev/bink/internal/version"
7+
68
const (
79
DefaultNetworkName = "podman"
810
DefaultSubnet = "10.88.0.0/16"
911

1012
FedoraVersion = "43"
1113

12-
BinkImage = "ghcr.io/alicefr/bink/bink:latest"
13-
DefaultClusterImage = "ghcr.io/alicefr/bink/cluster:latest"
14-
DefaultNodeImage = "ghcr.io/alicefr/bink/node:v1.35-fedora-44-disk"
14+
binkImageBase = "ghcr.io/alicefr/bink/bink"
15+
clusterImageBase = "ghcr.io/alicefr/bink/cluster"
16+
dnsImageBase = "ghcr.io/alicefr/bink/dns"
17+
18+
DefaultNodeImage = "ghcr.io/alicefr/bink/node:v1.35-fedora-44-disk"
1519

1620
DefaultBaseDisk = "/images/disk.qcow2"
1721
DefaultControlPlaneMemory = 1900
@@ -50,7 +54,6 @@ const (
5054
ContainerNamePrefix = "k8s-"
5155

5256
DNSContainerName = "dns"
53-
DNSImage = "ghcr.io/alicefr/bink/dns:latest"
5457
DNSMasqHostsFile = "/var/lib/dnsmasq/cluster-hosts"
5558
DNSMasqConfigDir = "/etc/dnsmasq.d"
5659
ClusterDomain = "cluster.local"
@@ -79,3 +82,16 @@ const (
7982

8083
DefaultImagePullTimeout = 600
8184
)
85+
86+
var (
87+
BinkImage = binkImageBase + ":" + imageTag()
88+
DefaultClusterImage = clusterImageBase + ":" + imageTag()
89+
DNSImage = dnsImageBase + ":" + imageTag()
90+
)
91+
92+
func imageTag() string {
93+
if version.Version == "" || version.Version == "dev" {
94+
return "latest"
95+
}
96+
return version.Version
97+
}

0 commit comments

Comments
 (0)