Skip to content

Commit 0aafed1

Browse files
committed
manually run make upgrade-klone
Signed-off-by: Ashley Davis <[email protected]>
1 parent 6d9adf4 commit 0aafed1

File tree

12 files changed

+185
-143
lines changed

12 files changed

+185
-143
lines changed

.github/workflows/govulncheck.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
run: |
2929
make print-go-version >> "$GITHUB_OUTPUT"
3030
31-
- uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
31+
- uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
3232
with:
3333
go-version: ${{ steps.go-version.outputs.result }}
3434

.github/workflows/make-self-upgrade.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
run: |
4343
make print-go-version >> "$GITHUB_OUTPUT"
4444
45-
- uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
45+
- uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
4646
with:
4747
go-version: ${{ steps.go-version.outputs.result }}
4848

klone.yaml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,50 +10,50 @@ targets:
1010
- folder_name: generate-verify
1111
repo_url: https://github.com/cert-manager/makefile-modules.git
1212
repo_ref: main
13-
repo_hash: 635a9ed0253409ac1543f59d97163d4a6a8c01b2
13+
repo_hash: 7740a28745d013a286c0573a180d0aa53ff0aa6a
1414
repo_path: modules/generate-verify
1515
- folder_name: go
1616
repo_url: https://github.com/cert-manager/makefile-modules.git
1717
repo_ref: main
18-
repo_hash: 635a9ed0253409ac1543f59d97163d4a6a8c01b2
18+
repo_hash: 7740a28745d013a286c0573a180d0aa53ff0aa6a
1919
repo_path: modules/go
2020
- folder_name: helm
2121
repo_url: https://github.com/cert-manager/makefile-modules.git
2222
repo_ref: main
23-
repo_hash: 635a9ed0253409ac1543f59d97163d4a6a8c01b2
23+
repo_hash: 7740a28745d013a286c0573a180d0aa53ff0aa6a
2424
repo_path: modules/helm
2525
- folder_name: help
2626
repo_url: https://github.com/cert-manager/makefile-modules.git
2727
repo_ref: main
28-
repo_hash: 635a9ed0253409ac1543f59d97163d4a6a8c01b2
28+
repo_hash: 7740a28745d013a286c0573a180d0aa53ff0aa6a
2929
repo_path: modules/help
3030
- folder_name: kind
3131
repo_url: https://github.com/cert-manager/makefile-modules.git
3232
repo_ref: main
33-
repo_hash: 635a9ed0253409ac1543f59d97163d4a6a8c01b2
33+
repo_hash: 7740a28745d013a286c0573a180d0aa53ff0aa6a
3434
repo_path: modules/kind
3535
- folder_name: klone
3636
repo_url: https://github.com/cert-manager/makefile-modules.git
3737
repo_ref: main
38-
repo_hash: 635a9ed0253409ac1543f59d97163d4a6a8c01b2
38+
repo_hash: 7740a28745d013a286c0573a180d0aa53ff0aa6a
3939
repo_path: modules/klone
4040
- folder_name: oci-build
4141
repo_url: https://github.com/cert-manager/makefile-modules.git
4242
repo_ref: main
43-
repo_hash: 635a9ed0253409ac1543f59d97163d4a6a8c01b2
43+
repo_hash: 7740a28745d013a286c0573a180d0aa53ff0aa6a
4444
repo_path: modules/oci-build
4545
- folder_name: oci-publish
4646
repo_url: https://github.com/cert-manager/makefile-modules.git
4747
repo_ref: main
48-
repo_hash: 635a9ed0253409ac1543f59d97163d4a6a8c01b2
48+
repo_hash: 7740a28745d013a286c0573a180d0aa53ff0aa6a
4949
repo_path: modules/oci-publish
5050
- folder_name: repository-base
5151
repo_url: https://github.com/cert-manager/makefile-modules.git
5252
repo_ref: main
53-
repo_hash: 635a9ed0253409ac1543f59d97163d4a6a8c01b2
53+
repo_hash: 7740a28745d013a286c0573a180d0aa53ff0aa6a
5454
repo_path: modules/repository-base
5555
- folder_name: tools
5656
repo_url: https://github.com/cert-manager/makefile-modules.git
5757
repo_ref: main
58-
repo_hash: 635a9ed0253409ac1543f59d97163d4a6a8c01b2
58+
repo_hash: 7740a28745d013a286c0573a180d0aa53ff0aa6a
5959
repo_path: modules/tools

make/_shared/generate-verify/util/verify.sh

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,17 @@ cleanup() {
4444
}
4545
trap "cleanup" EXIT SIGINT
4646

47-
rsync -aEq "${projectdir}/." "${tmp}" --exclude "_bin/"
47+
# Why not just "cp" to the tmp dir?
48+
# A dumb "cp" will fail sometimes since _bin can get changed while it's being copied if targets are run in parallel,
49+
# and cp doesn't have some universal "exclude" option to ignore "_bin"
50+
#
51+
# We previously used "rsync" here, but:
52+
# 1. That's another tool we need to depend on
53+
# 2. rsync on macOS 15.4 and newer is actually openrsync, which has different permissions and throws errors when copying git objects
54+
#
55+
# So, we use find to list all files except _bin, and then copy each in turn
56+
find . -maxdepth 1 -not \( -path "./_bin" -prune \) | xargs -I% cp -af "${projectdir}/%" "${tmp}/"
57+
4858
pushd "${tmp}" >/dev/null
4959

5060
"$@"

make/_shared/go/base/.github/workflows/govulncheck.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
run: |
2929
make print-go-version >> "$GITHUB_OUTPUT"
3030
31-
- uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
31+
- uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
3232
with:
3333
go-version: ${{ steps.go-version.outputs.result }}
3434

make/_shared/helm/helm.mk

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,28 @@ $(bin_dir)/scratch/kyverno/pod-security-policy.yaml: | $(NEEDS_KUSTOMIZE) $(bin_
128128
# Extra arguments for kyverno apply.
129129
kyverno_apply_extra_args :=
130130
# Allows known policy violations to be skipped by supplying Kyverno policy
131-
# exceptions.
131+
# exceptions as a Kyverno YAML resource, e.g.:
132+
# apiVersion: kyverno.io/v2
133+
# kind: PolicyException
134+
# metadata:
135+
# name: pod-security-exceptions
136+
# spec:
137+
# exceptions:
138+
# - policyName: disallow-privilege-escalation
139+
# ruleNames:
140+
# - autogen-privilege-escalation
141+
# - policyName: restrict-seccomp-strict
142+
# ruleNames:
143+
# - autogen-check-seccomp-strict
144+
# match:
145+
# any:
146+
# - resources:
147+
# kinds:
148+
# - Deployment
149+
# namespaces:
150+
# - mynamespace
151+
# names:
152+
# - my-deployment
132153
ifneq ("$(wildcard make/verify-pod-security-standards-exceptions.yaml)","")
133154
kyverno_apply_extra_args += --exceptions make/verify-pod-security-standards-exceptions.yaml
134155
endif

make/_shared/kind/00_kind_image_versions.mk

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,16 @@
1515
# This file is auto-generated by the learn_kind_images.sh script in the makefile-modules repo.
1616
# Do not edit manually.
1717

18-
kind_image_kindversion := v0.26.0
18+
kind_image_kindversion := v0.27.0
1919

20-
kind_image_kube_1.29_amd64 := docker.io/kindest/node:v1.29.12@sha256:c1b696872c6d4d41889c1c7ca460d6c6349665061e6dd2a9cc5abda7dd8e21bc
21-
kind_image_kube_1.29_arm64 := docker.io/kindest/node:v1.29.12@sha256:a29e3189829c4784b31507c793b5d186914a6ed81d2296c39d32543988911f36
22-
kind_image_kube_1.30_amd64 := docker.io/kindest/node:v1.30.8@sha256:da9368e0cfa74ca1a7e2c6d6c7abf890e627a94d9c8300dd9d951f63947a456c
23-
kind_image_kube_1.30_arm64 := docker.io/kindest/node:v1.30.8@sha256:27b247e13bac7271e013ea4118843f8072e5a4f1fa8ce2c5c47018e6b2d45cce
24-
kind_image_kube_1.31_amd64 := docker.io/kindest/node:v1.31.4@sha256:29370cbe44fd9798ac1e47e7ad04e53c375c0c683a25cc0cc7db331ad07c9952
25-
kind_image_kube_1.31_arm64 := docker.io/kindest/node:v1.31.4@sha256:496ab674cddaa72e97f2aa70729df5b403f46ee5834fb9a44773284998fea6d5
26-
kind_image_kube_1.32_amd64 := docker.io/kindest/node:v1.32.0@sha256:dd45e7e76478f76d2881cf031e64512f51be63dcb61420307982a24913badf8f
27-
kind_image_kube_1.32_arm64 := docker.io/kindest/node:v1.32.0@sha256:eff24f9d99bc56271a456484d87cd6e6fc0beec7d4418958d589804703c00588
20+
kind_image_kube_1.29_amd64 := docker.io/kindest/node:v1.29.14@sha256:e7858e6394f5e834802ce573ab340a0584d8314f909cb0717e14b57f2dd97257
21+
kind_image_kube_1.29_arm64 := docker.io/kindest/node:v1.29.14@sha256:6eed9bfd0313cc3574c4613adeb7f53832cb8d9c0ca9ffa8b8221716fd96dc18
22+
kind_image_kube_1.30_amd64 := docker.io/kindest/node:v1.30.10@sha256:e382f9b891474f1c4b0b5cfcf27f8e471f1bdc1f285afe38adeec1bd5b856cfe
23+
kind_image_kube_1.30_arm64 := docker.io/kindest/node:v1.30.10@sha256:ca8e16c04ee9ebaeb9a4dd85abbe188f3893fb39bd658d6d3e639d16cf46e3da
24+
kind_image_kube_1.31_amd64 := docker.io/kindest/node:v1.31.6@sha256:37d52dc19f59394f9347b00547c3ed2d73eb301a60294b9b05fbe56fb6196517
25+
kind_image_kube_1.31_arm64 := docker.io/kindest/node:v1.31.6@sha256:4e6223faa19178922d30e7b62546c5464fdf9bc66a3df64073424a51ab44f2ab
26+
kind_image_kube_1.32_amd64 := docker.io/kindest/node:v1.32.2@sha256:a37b679ad8c1cfa7c64aca1734cc4299dc833258d6c131ed0204c8cd2bd56ff7
27+
kind_image_kube_1.32_arm64 := docker.io/kindest/node:v1.32.2@sha256:4d0e1b60f1da0d1349996a9778f8bace905189af5e05e04618eae0a155dd9f9c
2828

2929
kind_image_latest_amd64 := $(kind_image_kube_1.32_amd64)
3030
kind_image_latest_arm64 := $(kind_image_kube_1.32_arm64)

make/_shared/kind/kind-image-preload.mk

Lines changed: 27 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -32,18 +32,33 @@ images_files := $(foreach image,$(images),$(subst :,+,$(image)))
3232
images_tar_dir := $(bin_dir)/downloaded/containers/$(HOST_ARCH)
3333
images_tars := $(images_files:%=$(images_tar_dir)/%.tar)
3434

35-
# Download the images as tarballs. We must use the tag because the digest
36-
# will change after we docker import the image. The tag is the only way to
37-
# reference the image after it has been imported. Before downloading the
38-
# image, we check that the provided digest matches the digest of the image
39-
# that we are about to pull.
40-
$(images_tars): $(images_tar_dir)/%.tar: | $(NEEDS_CRANE)
41-
@$(eval image=$(subst +,:,$*))
42-
@$(eval image_without_digest=$(shell cut -d@ -f1 <<<"$(image)"))
43-
@$(eval digest=$(subst $(image_without_digest)@,,$(image)))
44-
@mkdir -p $(dir $@)
45-
diff <(echo "$(digest) -" | cut -d: -f2) <($(CRANE) manifest --platform=linux/$(HOST_ARCH) $(image_without_digest) | sha256sum)
46-
$(CRANE) pull $(image_without_digest) $@ --platform=linux/$(HOST_ARCH)
35+
# Download the images as tarballs. After downloading the image using
36+
# its digest, we untar the image and modify the .[0].RepoTags[0] value in
37+
# the manifest.json file to have the correct tag (instead of "i-was-a-digest"
38+
# which is set when the image is pulled using its digest). This tag is used
39+
# to reference the image after it has been imported using docker or kind. Otherwise,
40+
# the image would be imported with the tag "i-was-a-digest" which is not very useful.
41+
# We would have to use digests to reference the image everywhere which might
42+
# not always be possible and does not match the default behavior of eg. our helm charts.
43+
# Untarring and modifying manifest.json is a hack and we hope that crane adds an option
44+
# in the future that allows setting the tag on images that are pulled by digest.
45+
# NOTE: the tag is fully determined based on the input, we fully allow the remote
46+
# tag to point to a different digest. This prevents CI from breaking due to upstream
47+
# changes. However, it also means that we can incorrectly combine digests with tags,
48+
# hence caution is advised.
49+
$(images_tars): $(images_tar_dir)/%.tar: | $(NEEDS_CRANE) $(NEEDS_GOJQ)
50+
@$(eval full_image=$(subst +,:,$*))
51+
@$(eval bare_image=$(word 1,$(subst :, ,$(full_image))))
52+
@$(eval digest=$(word 2,$(subst @, ,$(full_image))))
53+
@$(eval tag=$(word 2,$(subst :, ,$(word 1,$(subst @, ,$(full_image))))))
54+
@mkdir -p $@.tmp.unpacked
55+
$(CRANE) pull "$(bare_image)@$(digest)" $@.tmp --platform=linux/$(HOST_ARCH)
56+
@tar xf $@.tmp -C $@.tmp.unpacked
57+
@rm -rf $@.tmp
58+
@$(GOJQ) '.[0].RepoTags[0] |= rtrimstr("i-was-a-digest") + "$(tag)"' $@.tmp.unpacked/manifest.json > $@.tmp.unpacked/manifest.json.new
59+
@mv $@.tmp.unpacked/manifest.json.new $@.tmp.unpacked/manifest.json
60+
@find $@.tmp.unpacked \( -type f -o -type d \) -printf "%P\n" | tar -cf $@ --no-recursion -C $@.tmp.unpacked -T -
61+
@rm -rf $@.tmp.unpacked
4762

4863
images_tar_envs := $(images_files:%=env-%)
4964

make/_shared/oci-build/00_mod.mk

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ oci_platforms ?= linux/amd64,linux/arm/v7,linux/arm64,linux/ppc64le
1616

1717
# Use distroless as minimal base image to package the manager binary
1818
# To get latest SHA run "crane digest quay.io/jetstack/base-static:latest"
19-
base_image_static := quay.io/jetstack/base-static@sha256:9202d031a2bf364519a07629e51daca08233e3096936563ea5f35f0e19003853
19+
base_image_static := quay.io/jetstack/base-static@sha256:713aaf3b2c45b103d37778943f2c384120eabb97b9097eea4b5cbbd32880b86d
2020

2121
# Use custom apko-built image as minimal base image to package the manager binary
2222
# To get latest SHA run "crane digest quay.io/jetstack/base-static-csi:latest"
23-
base_image_csi-static := quay.io/jetstack/base-static-csi@sha256:2e159b417e03b3d454c202f8281922784ef7153873dc5a62bdb5e456de9dc6db
23+
base_image_csi-static := quay.io/jetstack/base-static-csi@sha256:3499c6d3073503bd13e015c27b039e58a790e5623906af1cf42ebbf85a8ff7f6
2424

2525
# Utility functions
2626
fatal_if_undefined = $(if $(findstring undefined,$(origin $1)),$(error $1 is not set))
@@ -43,8 +43,7 @@ go_$1_goexperiment ?= $(GOEXPERIMENT)
4343
go_$1_flags ?= -tags=
4444
oci_$1_additional_layers ?=
4545
oci_$1_linux_capabilities ?=
46-
oci_$1_image_annotation ?=
47-
oci_$1_image_label ?=
46+
oci_$1_build_args ?=
4847
endef
4948

5049
$(foreach build_name,$(build_names),$(eval $(call default_per_build_variables,$(build_name))))

make/_shared/oci-build/01_mod.mk

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,7 @@ $(oci_build_targets): oci-build-%: ko-config-% | $(NEEDS_KO) $(NEEDS_GO) $(NEEDS
6363
LDFLAGS="$(go_$*_ldflags)" \
6464
$(KO) build $(go_$*_mod_dir)/$(go_$*_main_dir) \
6565
--platform=$(oci_platforms) \
66-
--image-annotation=$(oci_$*_image_annotation) \
67-
--image-label=$(oci_$*_image_label) \
66+
$(oci_$*_build_args) \
6867
--oci-layout-path=$(oci_layout_path_$*) \
6968
--sbom-dir=$(CURDIR)/$(oci_layout_path_$*).sbom \
7069
--sbom=spdx \

0 commit comments

Comments
 (0)