Skip to content

Commit 43feefa

Browse files
Upgrade from kubebuilder v3.11.1 to v3.12.0 (#1011)
* Upgrade from kubebuilder v3.11.1 to v3.12.0 * Generated by GitHub Actions (go / generate) https://github.com/int128/argocd-commenter/actions/runs/10400081959 --------- Co-authored-by: update-generated-files-action <41898282+github-actions[bot]@users.noreply.github.com>
1 parent f6acea4 commit 43feefa

File tree

4 files changed

+24
-15
lines changed

4 files changed

+24
-15
lines changed

Makefile

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Image URL to use all building/pushing image targets
33
IMG ?= controller:latest
44
# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
5-
ENVTEST_K8S_VERSION = 1.27.1
5+
ENVTEST_K8S_VERSION = 1.28.0
66

77
# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set)
88
ifeq (,$(shell go env GOBIN))
@@ -29,7 +29,7 @@ all: build
2929

3030
# The help target prints out all targets with their descriptions organized
3131
# beneath their categories. The categories are represented by '##@' and the
32-
# target descriptions by '##'. The awk commands is responsible for reading the
32+
# target descriptions by '##'. The awk command is responsible for reading the
3333
# entire set of makefiles included in this invocation, looking for lines of the
3434
# file as xyz: ## something, and then pretty-format the target and help. Then,
3535
# if there's a line with ##@ something, that gets pretty-printed as a category.
@@ -74,26 +74,26 @@ build: manifests generate fmt vet ## Build manager binary.
7474
run: manifests generate fmt vet ## Run a controller from your host.
7575
go run ./cmd/main.go
7676

77-
# If you wish built the manager image targeting other platforms you can use the --platform flag.
78-
# (i.e. docker build --platform linux/arm64 ). However, you must enable docker buildKit for it.
77+
# If you wish to build the manager image targeting other platforms you can use the --platform flag.
78+
# (i.e. docker build --platform linux/arm64). However, you must enable docker buildKit for it.
7979
# More info: https://docs.docker.com/develop/develop-images/build_enhancements/
8080
.PHONY: docker-build
81-
docker-build: test ## Build docker image with the manager.
81+
docker-build: ## Build docker image with the manager.
8282
$(CONTAINER_TOOL) build -t ${IMG} .
8383

8484
.PHONY: docker-push
8585
docker-push: ## Push docker image with the manager.
8686
$(CONTAINER_TOOL) push ${IMG}
8787

88-
# PLATFORMS defines the target platforms for the manager image be build to provide support to multiple
88+
# PLATFORMS defines the target platforms for the manager image be built to provide support to multiple
8989
# architectures. (i.e. make docker-buildx IMG=myregistry/mypoperator:0.0.1). To use this option you need to:
90-
# - able to use docker buildx . More info: https://docs.docker.com/build/buildx/
91-
# - have enable BuildKit, More info: https://docs.docker.com/develop/develop-images/build_enhancements/
92-
# - be able to push the image for your registry (i.e. if you do not inform a valid value via IMG=<myregistry/image:<tag>> then the export will fail)
93-
# To properly provided solutions that supports more than one platform you should use this option.
90+
# - be able to use docker buildx. More info: https://docs.docker.com/build/buildx/
91+
# - have enabled BuildKit. More info: https://docs.docker.com/develop/develop-images/build_enhancements/
92+
# - be able to push the image to your registry (i.e. if you do not set a valid value via IMG=<myregistry/image:<tag>> then the export will fail)
93+
# To adequately provide solutions that are compatible with multiple platforms, you should consider using this option.
9494
PLATFORMS ?= linux/arm64,linux/amd64,linux/s390x,linux/ppc64le
9595
.PHONY: docker-buildx
96-
docker-buildx: test ## Build and push docker image for the manager for cross-platform support
96+
docker-buildx: ## Build and push docker image for the manager for cross-platform support
9797
# copy existing Dockerfile and insert --platform=${BUILDPLATFORM} into Dockerfile.cross, and preserve the original Dockerfile
9898
sed -e '1 s/\(^FROM\)/FROM --platform=\$$\{BUILDPLATFORM\}/; t' -e ' 1,// s//FROM --platform=\$$\{BUILDPLATFORM\}/' Dockerfile > Dockerfile.cross
9999
- $(CONTAINER_TOOL) buildx create --name project-v3-builder
@@ -139,8 +139,8 @@ CONTROLLER_GEN ?= $(LOCALBIN)/controller-gen
139139
ENVTEST ?= $(LOCALBIN)/setup-envtest
140140

141141
## Tool Versions
142-
KUSTOMIZE_VERSION ?= v5.0.1
143-
CONTROLLER_TOOLS_VERSION ?= v0.12.0
142+
KUSTOMIZE_VERSION ?= v5.1.1
143+
CONTROLLER_TOOLS_VERSION ?= v0.13.0
144144

145145
.PHONY: kustomize
146146
kustomize: $(KUSTOMIZE) ## Download kustomize locally if necessary. If wrong version is installed, it will be removed before downloading.

api/v1/zz_generated.deepcopy.go

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/crd/bases/argocdcommenter.int128.github.io_applicationhealths.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
33
kind: CustomResourceDefinition
44
metadata:
55
annotations:
6-
controller-gen.kubebuilder.io/version: v0.12.0
6+
controller-gen.kubebuilder.io/version: v0.13.0
77
name: applicationhealths.argocdcommenter.int128.github.io
88
spec:
99
group: argocdcommenter.int128.github.io

internal/controller/suite_test.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,11 @@ package controller
1818

1919
import (
2020
"context"
21+
"fmt"
2122
"go/build"
2223
"net/http/httptest"
2324
"path/filepath"
25+
"runtime"
2426
"testing"
2527
"time"
2628

@@ -82,6 +84,14 @@ var _ = BeforeSuite(func() {
8284
testEnv := &envtest.Environment{
8385
CRDDirectoryPaths: crdPaths,
8486
ErrorIfCRDPathMissing: true,
87+
88+
// The BinaryAssetsDirectory is only required if you want to run the tests directly
89+
// without call the makefile target test. If not informed it will look for the
90+
// default path defined in controller-runtime which is /usr/local/kubebuilder/.
91+
// Note that you must have the required binaries setup under the bin directory to perform
92+
// the tests directly. When we run make test it will be setup and used automatically.
93+
BinaryAssetsDirectory: filepath.Join("..", "..", "bin", "k8s",
94+
fmt.Sprintf("1.28.0-%s-%s", runtime.GOOS, runtime.GOARCH)),
8595
}
8696

8797
ctx, cancel := context.WithCancel(context.TODO())

0 commit comments

Comments
 (0)