Skip to content

Commit 91bc791

Browse files
committed
Bump kubernetes tools
1 parent 04a4255 commit 91bc791

File tree

2 files changed

+15
-11
lines changed

2 files changed

+15
-11
lines changed

makelib/k8s-tools.mk

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,17 @@ __K8S_TOOLS_MAKEFILE__ := included
1919
# tools
2020

2121
# kubectl download and install
22-
KUBECTL_VERSION ?= 1.15.6
22+
KUBECTL_VERSION ?= 1.19.13
2323
KUBECTL_DOWNLOAD_URL ?= https://storage.googleapis.com/kubernetes-release/release/v$(KUBECTL_VERSION)/bin/$(HOSTOS)/$(HOSTARCH)/kubectl
2424
$(eval $(call tool.download,kubectl,$(KUBECTL_VERSION),$(KUBECTL_DOWNLOAD_URL)))
2525

2626
# kind download and install
27-
KIND_VERSION ?= 0.6.1
27+
KIND_VERSION ?= 0.11.1
2828
KIND_DOWNLOAD_URL ?= https://github.com/kubernetes-sigs/kind/releases/download/v$(KIND_VERSION)/kind-$(HOSTOS)-$(HOSTARCH)
2929
$(eval $(call tool.download,kind,$(KIND_VERSION),$(KIND_DOWNLOAD_URL)))
3030

3131
# kind download and install
32-
KUSTOMIZE_VERSION ?= 3.4.0
32+
KUSTOMIZE_VERSION ?= 4.2.0
3333
KUSTOMIZE_DOWNLOAD_URL ?=https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize/v$(KUSTOMIZE_VERSION)/kustomize_v$(KUSTOMIZE_VERSION)_$(HOST_PLATFORM).tar.gz
3434
$(eval $(call tool.download.tar.gz,kustomize,$(KUSTOMIZE_VERSION),$(KUSTOMIZE_DOWNLOAD_URL),kustomize,0))
3535

makelib/kubebuilder-v2.mk

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,21 @@ __KUBEBUILDERV2_MAKEFILE__ := included
1818
# ====================================================================================
1919
# Options
2020

21-
KUBEBUILDER_VERSION ?= 2.2.0
21+
KUBEBUILDER_VERSION ?= 2.3.2
2222
KUBEBUILDER := $(TOOLS_HOST_DIR)/kubebuilder-$(KUBEBUILDER_VERSION)
2323

2424
CRD_DIR ?= config/crds
2525
API_DIR ?= pkg/apis
26+
RBAC_DIR ?= config/rbac
2627

27-
CRD_OPTIONS ?= "crd:trivialVersions=true"
2828
BOILERPLATE_FILE ?= ./hack/boilerplate.go.txt
2929

30+
GEN_CRD_OPTIONS ?= crd:trivialVersions=true
31+
GEN_RBAC_OPTIONS ?= rbac:roleName=manager-role
32+
GEN_WEBHOOK_OPTIONS ?=
33+
GEN_OBJECT_OPTIONS ?= object:headerFile=$(BOILERPLATE_FILE)
34+
GEN_OUTPUTS_OPTIONS ?= output:crd:artifacts:config=$(CRD_DIR) output:rbac:artifacts:config=$(RBAC_DIR)
35+
3036
# these are use by the kubebuilder test harness
3137

3238
TEST_ASSET_KUBE_APISERVER := $(KUBEBUILDER)/kube-apiserver
@@ -51,9 +57,9 @@ $(KUBEBUILDER):
5157
@rm -fr $(TOOLS_HOST_DIR)/tmp
5258
@$(OK) installing kubebuilder $(KUBEBUILDER_VERSION)
5359

54-
CONTROLLER_GEN_VERSION ?= 0.2.4
60+
CONTROLLER_GEN_VERSION ?= 0.6.1
5561
CONTROLLER_GEN_URL ?= sigs.k8s.io/controller-tools/cmd/controller-gen
56-
$(eval $(call tool.go.get,controller-gen,v$(CONTROLLER_GEN_VERSION),$(CONTROLLER_GEN_URL)))
62+
$(eval $(call tool.go.install,controller-gen,v$(CONTROLLER_GEN_VERSION),$(CONTROLLER_GEN_URL)))
5763

5864
# ====================================================================================
5965
# Kubebuilder Targets
@@ -64,10 +70,8 @@ $(eval $(call common.target,kubebuilder.manifests))
6470
.do.kubebuilder.manifests: $(CONTROLLER_GEN)
6571
@$(INFO) Generating Kubebuilder manifests
6672
@# first delete the CRD_DIR, to remove the CRDs of types that no longer exist
67-
@rm -rf $(CRD_DIR)
6873

69-
@$(CONTROLLER_GEN) $(CRD_OPTIONS) rbac:roleName=manager-role webhook paths="./..." output:crd:artifacts:config=$(CRD_DIR)
70-
$(CONTROLLER_GEN) object:headerFile=$(BOILERPLATE_FILE) paths="./..."
74+
@$(CONTROLLER_GEN) paths="./pkg/..." $(GEN_CRD_OPTIONS) $(GEN_RBAC_OPTIONS) $(GEN_WEBHOOK_OPTIONS) $(GEN_OBJECT_OPTIONS) $(GEN_OUTPUTS_OPTIONS)
7175

7276
@$(OK) Generating Kubebuilder manifests
7377

@@ -95,7 +99,7 @@ export KUBEBULDERV2_HELPTEXT
9599
@echo "$$KUBEBULDERV2_HELPTEXT"
96100

97101
.help: .kubebuilder.help
98-
.generate.run: kubebuilder.manifests
102+
go.generate: kubebuilder.manifests
99103

100104
.PHONY: .kubebuilder.help kubebuilder.manifests
101105

0 commit comments

Comments
 (0)