Skip to content

Commit e38522c

Browse files
authored
go.{mod,sum},build_docker.sh: bump mkctr, add ability to set OCI annotations for images (tailscale#14065)
Updates tailscale#12914 Signed-off-by: Irbe Krumina <[email protected]>
1 parent d8a3683 commit e38522c

File tree

3 files changed

+63
-52
lines changed

3 files changed

+63
-52
lines changed

build_docker.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,20 @@ eval "$(./build_dist.sh shellvars)"
1717
DEFAULT_TARGET="client"
1818
DEFAULT_TAGS="v${VERSION_SHORT},v${VERSION_MINOR}"
1919
DEFAULT_BASE="tailscale/alpine-base:3.18"
20+
# Set a few pre-defined OCI annotations. The source annotation is used by tools such as Renovate that scan the linked
21+
# Github repo to find release notes for any new image tags. Note that for official Tailscale images the default
22+
# annotations defined here will be overriden by release scripts that call this script.
23+
# https://github.com/opencontainers/image-spec/blob/main/annotations.md#pre-defined-annotation-keys
24+
DEFAULT_ANNOTATIONS="org.opencontainers.image.source=https://github.com/tailscale/tailscale/blob/main/build_docker.sh,org.opencontainers.image.vendor=Tailscale"
2025

2126
PUSH="${PUSH:-false}"
2227
TARGET="${TARGET:-${DEFAULT_TARGET}}"
2328
TAGS="${TAGS:-${DEFAULT_TAGS}}"
2429
BASE="${BASE:-${DEFAULT_BASE}}"
2530
PLATFORM="${PLATFORM:-}" # default to all platforms
31+
# OCI annotations that will be added to the image.
32+
# https://github.com/opencontainers/image-spec/blob/main/annotations.md
33+
ANNOTATIONS="${ANNOTATIONS:-${DEFAULT_ANNOTATIONS}}"
2634

2735
case "$TARGET" in
2836
client)
@@ -43,6 +51,7 @@ case "$TARGET" in
4351
--repos="${REPOS}" \
4452
--push="${PUSH}" \
4553
--target="${PLATFORM}" \
54+
--annotations="${ANNOTATIONS}" \
4655
/usr/local/bin/containerboot
4756
;;
4857
operator)
@@ -60,6 +69,7 @@ case "$TARGET" in
6069
--repos="${REPOS}" \
6170
--push="${PUSH}" \
6271
--target="${PLATFORM}" \
72+
--annotations="${ANNOTATIONS}" \
6373
/usr/local/bin/operator
6474
;;
6575
k8s-nameserver)
@@ -77,6 +87,7 @@ case "$TARGET" in
7787
--repos="${REPOS}" \
7888
--push="${PUSH}" \
7989
--target="${PLATFORM}" \
90+
--annotations="${ANNOTATIONS}" \
8091
/usr/local/bin/k8s-nameserver
8192
;;
8293
*)

go.mod

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ require (
4242
github.com/golang/snappy v0.0.4
4343
github.com/golangci/golangci-lint v1.57.1
4444
github.com/google/go-cmp v0.6.0
45-
github.com/google/go-containerregistry v0.18.0
45+
github.com/google/go-containerregistry v0.20.2
4646
github.com/google/gopacket v1.1.19
4747
github.com/google/nftables v0.2.1-0.20240414091927-5e242ec57806
4848
github.com/google/uuid v1.6.0
@@ -55,7 +55,7 @@ require (
5555
github.com/josharian/native v1.1.1-0.20230202152459-5c7d0dd6ab86
5656
github.com/jsimonetti/rtnetlink v1.4.0
5757
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51
58-
github.com/klauspost/compress v1.17.4
58+
github.com/klauspost/compress v1.17.11
5959
github.com/kortschak/wol v0.0.0-20200729010619-da482cc4850a
6060
github.com/mattn/go-colorable v0.1.13
6161
github.com/mattn/go-isatty v0.0.20
@@ -80,7 +80,7 @@ require (
8080
github.com/tailscale/golang-x-crypto v0.0.0-20240604161659-3fde5e568aa4
8181
github.com/tailscale/goupnp v1.0.1-0.20210804011211-c64d0f06ea05
8282
github.com/tailscale/hujson v0.0.0-20221223112325-20486734a56a
83-
github.com/tailscale/mkctr v0.0.0-20240628074852-17ca944da6ba
83+
github.com/tailscale/mkctr v0.0.0-20241111153353-1a38f6676f10
8484
github.com/tailscale/netlink v1.1.1-0.20240822203006-4d49adab4de7
8585
github.com/tailscale/peercred v0.0.0-20240214030740-b535050b2aa4
8686
github.com/tailscale/web-client-prebuilt v0.0.0-20240226180453-5db17b287bf1
@@ -100,8 +100,8 @@ require (
100100
golang.org/x/mod v0.19.0
101101
golang.org/x/net v0.27.0
102102
golang.org/x/oauth2 v0.16.0
103-
golang.org/x/sync v0.7.0
104-
golang.org/x/sys v0.22.0
103+
golang.org/x/sync v0.9.0
104+
golang.org/x/sys v0.27.0
105105
golang.org/x/term v0.22.0
106106
golang.org/x/time v0.5.0
107107
golang.org/x/tools v0.23.0
@@ -125,7 +125,7 @@ require (
125125
github.com/Antonboom/testifylint v1.2.0 // indirect
126126
github.com/GaijinEntertainment/go-exhaustruct/v3 v3.2.0 // indirect
127127
github.com/Masterminds/sprig v2.22.0+incompatible // indirect
128-
github.com/Microsoft/go-winio v0.6.1 // indirect
128+
github.com/Microsoft/go-winio v0.6.2 // indirect
129129
github.com/OpenPeeDeeP/depguard/v2 v2.2.0 // indirect
130130
github.com/alecthomas/go-check-sumtype v0.1.4 // indirect
131131
github.com/alexkohler/nakedret/v2 v2.0.4 // indirect
@@ -138,7 +138,7 @@ require (
138138
github.com/cyphar/filepath-securejoin v0.2.4 // indirect
139139
github.com/dave/astrid v0.0.0-20170323122508-8c2895878b14 // indirect
140140
github.com/dave/brenda v1.1.0 // indirect
141-
github.com/docker/go-connections v0.4.0 // indirect
141+
github.com/docker/go-connections v0.5.0 // indirect
142142
github.com/docker/go-units v0.5.0 // indirect
143143
github.com/felixge/httpsnoop v1.0.4 // indirect
144144
github.com/ghostiam/protogetter v0.3.5 // indirect
@@ -160,10 +160,10 @@ require (
160160
github.com/ykadowak/zerologlint v0.1.5 // indirect
161161
go-simpler.org/musttag v0.9.0 // indirect
162162
go-simpler.org/sloglint v0.5.0 // indirect
163-
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.47.0 // indirect
164-
go.opentelemetry.io/otel v1.22.0 // indirect
165-
go.opentelemetry.io/otel/metric v1.22.0 // indirect
166-
go.opentelemetry.io/otel/trace v1.22.0 // indirect
163+
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.57.0 // indirect
164+
go.opentelemetry.io/otel v1.32.0 // indirect
165+
go.opentelemetry.io/otel/metric v1.32.0 // indirect
166+
go.opentelemetry.io/otel/trace v1.32.0 // indirect
167167
go.uber.org/automaxprocs v1.5.3 // indirect
168168
golang.org/x/xerrors v0.0.0-20240716161551-93cc26a95ae9 // indirect
169169
)
@@ -220,10 +220,10 @@ require (
220220
github.com/daixiang0/gci v0.12.3 // indirect
221221
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
222222
github.com/denis-tingaikin/go-header v0.5.0 // indirect
223-
github.com/docker/cli v25.0.0+incompatible // indirect
223+
github.com/docker/cli v27.3.1+incompatible // indirect
224224
github.com/docker/distribution v2.8.3+incompatible // indirect
225-
github.com/docker/docker v26.1.4+incompatible // indirect
226-
github.com/docker/docker-credential-helpers v0.8.1 // indirect
225+
github.com/docker/docker v27.3.1+incompatible // indirect
226+
github.com/docker/docker-credential-helpers v0.8.2 // indirect
227227
github.com/emicklei/go-restful/v3 v3.11.2 // indirect
228228
github.com/emirpasic/gods v1.18.1 // indirect
229229
github.com/ettle/strcase v0.2.0 // indirect
@@ -322,7 +322,7 @@ require (
322322
github.com/nunnatsa/ginkgolinter v0.16.1 // indirect
323323
github.com/olekukonko/tablewriter v0.0.5 // indirect
324324
github.com/opencontainers/go-digest v1.0.0 // indirect
325-
github.com/opencontainers/image-spec v1.1.0-rc6 // indirect
325+
github.com/opencontainers/image-spec v1.1.0 // indirect
326326
github.com/pelletier/go-toml/v2 v2.2.0 // indirect
327327
github.com/pierrec/lz4/v4 v4.1.21 // indirect
328328
github.com/pjbgf/sha1cd v0.3.0 // indirect
@@ -376,7 +376,7 @@ require (
376376
github.com/ultraware/funlen v0.1.0 // indirect
377377
github.com/ultraware/whitespace v0.1.0 // indirect
378378
github.com/uudashr/gocognit v1.1.2 // indirect
379-
github.com/vbatts/tar-split v0.11.5 // indirect
379+
github.com/vbatts/tar-split v0.11.6 // indirect
380380
github.com/x448/float16 v0.8.4 // indirect
381381
github.com/xanzy/ssh-agent v0.3.3 // indirect
382382
github.com/yagipy/maintidx v1.0.0 // indirect

0 commit comments

Comments
 (0)