Skip to content

Commit 17c8a88

Browse files
committed
run 'make upgrade-klone' and 'make generate'
Signed-off-by: Tim Ramlot <[email protected]>
1 parent 3bb99c9 commit 17c8a88

File tree

9 files changed

+73
-32
lines changed

9 files changed

+73
-32
lines changed

.github/workflows/govulncheck.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ jobs:
1717
govulncheck:
1818
runs-on: ubuntu-latest
1919

20+
if: github.repository_owner == 'cert-manager'
21+
2022
steps:
2123
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2224
# Adding `fetch-depth: 0` makes sure tags are also fetched. We need

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: 63de69c93b4abd5f087b5ec9e845ac901334f3f4
13+
repo_hash: 01f8036da297256be41f6cc520cb248cb0f609fc
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: 63de69c93b4abd5f087b5ec9e845ac901334f3f4
18+
repo_hash: 01f8036da297256be41f6cc520cb248cb0f609fc
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: 63de69c93b4abd5f087b5ec9e845ac901334f3f4
23+
repo_hash: 01f8036da297256be41f6cc520cb248cb0f609fc
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: 63de69c93b4abd5f087b5ec9e845ac901334f3f4
28+
repo_hash: 01f8036da297256be41f6cc520cb248cb0f609fc
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: 63de69c93b4abd5f087b5ec9e845ac901334f3f4
33+
repo_hash: 01f8036da297256be41f6cc520cb248cb0f609fc
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: 63de69c93b4abd5f087b5ec9e845ac901334f3f4
38+
repo_hash: 01f8036da297256be41f6cc520cb248cb0f609fc
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: 63de69c93b4abd5f087b5ec9e845ac901334f3f4
43+
repo_hash: 01f8036da297256be41f6cc520cb248cb0f609fc
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: 63de69c93b4abd5f087b5ec9e845ac901334f3f4
48+
repo_hash: 01f8036da297256be41f6cc520cb248cb0f609fc
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: 63de69c93b4abd5f087b5ec9e845ac901334f3f4
53+
repo_hash: 01f8036da297256be41f6cc520cb248cb0f609fc
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: 63de69c93b4abd5f087b5ec9e845ac901334f3f4
58+
repo_hash: 01f8036da297256be41f6cc520cb248cb0f609fc
5959
repo_path: modules/tools

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ jobs:
1717
govulncheck:
1818
runs-on: ubuntu-latest
1919

20+
if: github.repository_owner == 'cert-manager'
21+
2022
steps:
2123
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2224
# Adding `fetch-depth: 0` makes sure tags are also fetched. We need

make/_shared/helm/helm.mk

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,3 +178,16 @@ verify-helm-lint: $(helm_chart_archive) | $(NEEDS_HELM)
178178
$(HELM) lint $(helm_chart_archive)
179179

180180
shared_verify_targets_dirty += verify-helm-lint
181+
182+
.PHONY: verify-helm-kubeconform
183+
## Verify that the Helm chart passes a strict check using kubeconform
184+
## @category [shared] Generate/ Verify
185+
verify-helm-kubeconform: $(helm_chart_archive) | $(NEEDS_KUBECONFORM)
186+
@$(HELM) template $(helm_chart_archive) $(INSTALL_OPTIONS) \
187+
| $(KUBECONFORM) \
188+
-schema-location default \
189+
-schema-location "https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/{{.NormalizedKubernetesVersion}}/{{.ResourceKind}}.json" \
190+
-schema-location "https://raw.githubusercontent.com/datreeio/CRDs-catalog/main/{{.Group}}/{{.ResourceKind}}_{{.ResourceAPIVersion}}.json" \
191+
-strict
192+
193+
shared_verify_targets_dirty += verify-helm-kubeconform

make/_shared/kind/00_kind_image_versions.mk

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ kind_image_kube_1.31_amd64 := docker.io/kindest/node:v1.31.6@sha256:37d52dc19f59
2525
kind_image_kube_1.31_arm64 := docker.io/kindest/node:v1.31.6@sha256:4e6223faa19178922d30e7b62546c5464fdf9bc66a3df64073424a51ab44f2ab
2626
kind_image_kube_1.32_amd64 := docker.io/kindest/node:v1.32.2@sha256:a37b679ad8c1cfa7c64aca1734cc4299dc833258d6c131ed0204c8cd2bd56ff7
2727
kind_image_kube_1.32_arm64 := docker.io/kindest/node:v1.32.2@sha256:4d0e1b60f1da0d1349996a9778f8bace905189af5e05e04618eae0a155dd9f9c
28+
kind_image_kube_1.33_amd64 := docker.io/kindest/node:v1.33.0@sha256:c9ec7bf998c310c5a6c903d66c2e595fb3e2eb53fb626cd53d07a3a5499de412
29+
kind_image_kube_1.33_arm64 := docker.io/kindest/node:v1.33.0@sha256:96ae3b980f87769e0117c2a89ec74fc660b84eedb573432abd2a682af3eccc02
2830

29-
kind_image_latest_amd64 := $(kind_image_kube_1.32_amd64)
30-
kind_image_latest_arm64 := $(kind_image_kube_1.32_arm64)
31+
kind_image_latest_amd64 := $(kind_image_kube_1.33_amd64)
32+
kind_image_latest_arm64 := $(kind_image_kube_1.33_arm64)

make/_shared/kind/00_mod.mk

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,17 @@ include $(dir $(lastword $(MAKEFILE_LIST)))/00_kind_image_versions.mk
1717
images_amd64 ?=
1818
images_arm64 ?=
1919

20+
# K8S_VERSION can be used to specify a specific
21+
# kubernetes version to use with Kind.
22+
K8S_VERSION ?=
23+
ifeq ($(K8S_VERSION),)
2024
images_amd64 += $(kind_image_latest_amd64)
2125
images_arm64 += $(kind_image_latest_arm64)
26+
else
27+
fatal_if_undefined = $(if $(findstring undefined,$(origin $1)),$(error $1 is not set))
28+
$(call fatal_if_undefined,kind_image_kube_$(K8S_VERSION)_amd64)
29+
$(call fatal_if_undefined,kind_image_kube_$(K8S_VERSION)_arm64)
30+
31+
images_amd64 += $(kind_image_kube_$(K8S_VERSION)_amd64)
32+
images_arm64 += $(kind_image_kube_$(K8S_VERSION)_arm64)
33+
endif

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

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -27,21 +27,18 @@ endif
2727
##########################################
2828

2929
images := $(images_$(HOST_ARCH))
30-
images_files := $(foreach image,$(images),$(subst :,+,$(image)))
3130

3231
images_tar_dir := $(bin_dir)/downloaded/containers/$(HOST_ARCH)
33-
images_tars := $(images_files:%=$(images_tar_dir)/%.tar)
32+
images_tars := $(foreach image,$(images),$(images_tar_dir)/$(subst :,+,$(image)).tar)
3433

3534
# 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
35+
# its digest, we use image-tool to modify the .[0].RepoTags[0] value in
3736
# the manifest.json file to have the correct tag (instead of "i-was-a-digest"
3837
# which is set when the image is pulled using its digest). This tag is used
3938
# to reference the image after it has been imported using docker or kind. Otherwise,
4039
# the image would be imported with the tag "i-was-a-digest" which is not very useful.
4140
# We would have to use digests to reference the image everywhere which might
4241
# 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.
4542
# NOTE: the tag is fully determined based on the input, we fully allow the remote
4643
# tag to point to a different digest. This prevents CI from breaking due to upstream
4744
# changes. However, it also means that we can incorrectly combine digests with tags,
@@ -55,17 +52,18 @@ $(images_tars): $(images_tar_dir)/%.tar: | $(NEEDS_IMAGE-TOOL) $(NEEDS_CRANE) $(
5552
$(CRANE) pull "$(bare_image)@$(digest)" $@ --platform=linux/$(HOST_ARCH)
5653
$(IMAGE-TOOL) tag-docker-tar $@ "$(bare_image):$(tag)"
5754

58-
images_tar_envs := $(images_files:%=env-%)
55+
# $1 = image
56+
# $2 = image:tag@sha256:digest
57+
define image_variables
58+
$1.TAR := $(images_tar_dir)/$(subst :,+,$2).tar
59+
$1.REPO := $1
60+
$1.TAG := $(word 2,$(subst :, ,$(word 1,$(subst @, ,$2))))
61+
$1.FULL := $(word 1,$(subst @, ,$2))
62+
endef
5963

60-
.PHONY: $(images_tar_envs)
61-
$(images_tar_envs): env-%: $(images_tar_dir)/%.tar | $(NEEDS_GOJQ)
62-
@$(eval image_without_tag=$(shell cut -d+ -f1 <<<"$*"))
63-
@$(eval $(image_without_tag).TAR="$(images_tar_dir)/$*.tar")
64-
@$(eval $(image_without_tag).REPO=$(shell tar xfO "$(images_tar_dir)/$*.tar" manifest.json | $(GOJQ) '.[0].RepoTags[0]' -r | cut -d: -f1))
65-
@$(eval $(image_without_tag).TAG=$(shell tar xfO "$(images_tar_dir)/$*.tar" manifest.json | $(GOJQ) '.[0].RepoTags[0]' -r | cut -d: -f2))
66-
@$(eval $(image_without_tag).FULL=$($(image_without_tag).REPO):$($(image_without_tag).TAG))
64+
$(foreach image,$(images),$(eval $(call image_variables,$(word 1,$(subst :, ,$(image))),$(image))))
6765

6866
.PHONY: images-preload
6967
## Preload images.
7068
## @category [shared] Kind cluster
71-
images-preload: | $(images_tar_envs)
69+
images-preload: | $(images_tars)

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

Lines changed: 3 additions & 3 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:713aaf3b2c45b103d37778943f2c384120eabb97b9097eea4b5cbbd32880b86d
19+
base_image_static := quay.io/jetstack/base-static@sha256:16a5a64b918592f5c38fa73721a87f8585a3a501d261087e7b953f8b59279cd0
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:3499c6d3073503bd13e015c27b039e58a790e5623906af1cf42ebbf85a8ff7f6
23+
base_image_csi-static := quay.io/jetstack/base-static-csi@sha256:fb97fc098aabdfb5b9b01475d3531b688a9c2219f4bbc143816d3e47a267be6d
2424

2525
# Utility functions
2626
fatal_if_undefined = $(if $(findstring undefined,$(origin $1)),$(error $1 is not set))
@@ -128,7 +128,7 @@ ko_config_targets := $(build_names:%=ko-config-%)
128128
# - oci_digest_path_$(build_name) = path to the file that will contain the digests
129129
# - ko_config_path_$(build_name) = path to the ko config file
130130
# - docker_tarball_path_$(build_name) = path that the docker tarball that the docker-tarball-$(build_name) will produce
131-
$(foreach build_name,$(build_names),$(eval oci_layout_path_$(build_name) := $(bin_dir)/scratch/image/oci-layout-$(build_name).$(oci_$(build_name)_image_tag)))
131+
$(foreach build_name,$(build_names),$(eval oci_layout_path_$(build_name) := $(bin_dir)/scratch/image/oci-layout-$(build_name)))
132132
$(foreach build_name,$(build_names),$(eval oci_digest_path_$(build_name) := $(CURDIR)/$(oci_layout_path_$(build_name)).digests))
133133
$(foreach build_name,$(build_names),$(eval ko_config_path_$(build_name) := $(CURDIR)/$(oci_layout_path_$(build_name)).ko_config.yaml))
134134
$(foreach build_name,$(build_names),$(eval docker_tarball_path_$(build_name) := $(CURDIR)/$(oci_layout_path_$(build_name)).docker.tar))

make/_shared/tools/00_mod.mk

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,17 @@ endif
1818

1919
##########################################
2020

21-
export DOWNLOAD_DIR ?= $(CURDIR)/$(bin_dir)/downloaded
22-
export GOVENDOR_DIR ?= $(CURDIR)/$(bin_dir)/go_vendor
21+
default_shared_dir := $(CURDIR)/$(bin_dir)
22+
# If $(HOME) is set and $(CI) is not, use the $(HOME)/.cache
23+
# folder to store downloaded binaries.
24+
ifneq ($(shell printenv HOME),)
25+
ifeq ($(shell printenv CI),)
26+
default_shared_dir := $(HOME)/.cache/makefile-modules
27+
endif
28+
endif
29+
30+
export DOWNLOAD_DIR ?= $(default_shared_dir)/downloaded
31+
export GOVENDOR_DIR ?= $(default_shared_dir)/go_vendor
2332

2433
$(bin_dir)/tools $(DOWNLOAD_DIR)/tools:
2534
@mkdir -p $@
@@ -125,7 +134,7 @@ tools += cmctl=v2.1.1
125134
# https://pkg.go.dev/github.com/cert-manager/release/cmd/cmrel?tab=versions
126135
tools += cmrel=e3cbe5171488deda000145003e22567bdce622ea
127136
# https://pkg.go.dev/github.com/golangci/golangci-lint/v2/cmd/golangci-lint?tab=versions
128-
tools += golangci-lint=v2.1.1
137+
tools += golangci-lint=v2.1.2
129138
# https://pkg.go.dev/golang.org/x/vuln?tab=versions
130139
tools += govulncheck=v1.1.4
131140
# https://pkg.go.dev/github.com/operator-framework/operator-sdk/cmd/operator-sdk?tab=versions
@@ -138,6 +147,8 @@ tools += preflight=1.12.1
138147
tools += gci=v0.13.6
139148
# https://github.com/google/yamlfmt/releases
140149
tools += yamlfmt=v0.16.0
150+
# https://github.com/yannh/kubeconform/releases
151+
tools += kubeconform=v0.6.7
141152

142153
# https://pkg.go.dev/k8s.io/code-generator/cmd?tab=versions
143154
K8S_CODEGEN_VERSION := v0.32.3
@@ -345,6 +356,7 @@ go_dependencies += operator-sdk=github.com/operator-framework/operator-sdk/cmd/o
345356
go_dependencies += gh=github.com/cli/cli/v2/cmd/gh
346357
go_dependencies += gci=github.com/daixiang0/gci
347358
go_dependencies += yamlfmt=github.com/google/yamlfmt/cmd/yamlfmt
359+
go_dependencies += kubeconform=github.com/yannh/kubeconform/cmd/kubeconform
348360

349361
#################
350362
# go build tags #

0 commit comments

Comments
 (0)