From aeff598233a476dd09b0e57ed545d5d3a37cc60b Mon Sep 17 00:00:00 2001 From: Cindy Bang Date: Mon, 29 Apr 2024 09:00:00 -0400 Subject: [PATCH] chore: add kubebuilder --- Makefile | 8 ++++++++ devbox.json | 3 ++- devbox.lock | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 58 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index c62f657eb..b3109b500 100644 --- a/Makefile +++ b/Makefile @@ -296,6 +296,7 @@ KUBECTL ?= $(LOCALBIN)/kubectl KUSTOMIZE ?= $(LOCALBIN)/kustomize CTLPTL ?= $(LOCALBIN)/ctlptl CLUSTERCTL ?= $(LOCALBIN)/clusterctl +KUBEBUILDER ?= $(LOCALBIN)/kubebuilder CONTROLLER_GEN ?= $(LOCALBIN)/controller-gen TILT ?= $(LOCALBIN)/tilt KIND ?= $(LOCALBIN)/kind @@ -310,6 +311,7 @@ MOCKGEN ?= $(LOCALBIN)/mockgen KUSTOMIZE_VERSION ?= v5.1.1 CTLPTL_VERSION ?= v0.8.25 CLUSTERCTL_VERSION ?= v1.5.3 +KUBEBUILDER_VERSION ?= v3.14.1 CONTROLLER_TOOLS_VERSION ?= v0.14.0 TILT_VERSION ?= 0.33.6 KIND_VERSION ?= 0.20.0 @@ -339,6 +341,12 @@ $(CLUSTERCTL): $(LOCALBIN) curl -fsSL https://github.com/kubernetes-sigs/cluster-api/releases/download/$(CLUSTERCTL_VERSION)/clusterctl-$(OS)-$(ARCH_SHORT) -o $(CLUSTERCTL) chmod +x $(CLUSTERCTL) +.PHONY: kubebuilder +kubebuilder: $(KUBEBUILDER) ## Download kubebuilder locally if necessary. +$(KUBEBUILDER): $(LOCALBIN) + curl -L -o $(LOCALBIN)/kubebuilder https://github.com/kubernetes-sigs/kubebuilder/releases/download/$(KUBEBUILDER_VERSION)/kubebuilder_$(OS)_$(ARCH_SHORT) + chmod +x $(LOCALBIN)/kubebuilder + .PHONY: controller-gen controller-gen: $(CONTROLLER_GEN) ## Download controller-gen locally if necessary. $(CONTROLLER_GEN): $(LOCALBIN) diff --git a/devbox.json b/devbox.json index e85c3b7ab..3185cd1f6 100644 --- a/devbox.json +++ b/devbox.json @@ -19,7 +19,8 @@ "mockgen@latest", "kyverno-chainsaw@latest", "kubernetes-helm@latest", - "kubectl@latest" + "kubectl@latest", + "kubebuilder@latest" ], "shell": { "init_hook": [ diff --git a/devbox.lock b/devbox.lock index 62596c450..3d51a84aa 100644 --- a/devbox.lock +++ b/devbox.lock @@ -293,6 +293,54 @@ } } }, + "kubebuilder@latest": { + "last_modified": "2024-04-19T17:36:04-04:00", + "resolved": "github:NixOS/nixpkgs/92d295f588631b0db2da509f381b4fb1e74173c5#kubebuilder", + "source": "devbox-search", + "version": "3.14.1", + "systems": { + "aarch64-darwin": { + "outputs": [ + { + "name": "out", + "path": "/nix/store/0amj5zw2rka2zjvq076ljfn80pch4dsa-kubebuilder-3.14.1", + "default": true + } + ], + "store_path": "/nix/store/0amj5zw2rka2zjvq076ljfn80pch4dsa-kubebuilder-3.14.1" + }, + "aarch64-linux": { + "outputs": [ + { + "name": "out", + "path": "/nix/store/ckx2xzgy6h4qq1pqr7z8k39yg6s0spin-kubebuilder-3.14.1", + "default": true + } + ], + "store_path": "/nix/store/ckx2xzgy6h4qq1pqr7z8k39yg6s0spin-kubebuilder-3.14.1" + }, + "x86_64-darwin": { + "outputs": [ + { + "name": "out", + "path": "/nix/store/4zwb2jklg7wy2whkhp9wg5gnlqldms3a-kubebuilder-3.14.1", + "default": true + } + ], + "store_path": "/nix/store/4zwb2jklg7wy2whkhp9wg5gnlqldms3a-kubebuilder-3.14.1" + }, + "x86_64-linux": { + "outputs": [ + { + "name": "out", + "path": "/nix/store/fswxi79rrm0qdqsv6njwmygyc8mzz6sy-kubebuilder-3.14.1", + "default": true + } + ], + "store_path": "/nix/store/fswxi79rrm0qdqsv6njwmygyc8mzz6sy-kubebuilder-3.14.1" + } + } + }, "kubectl@latest": { "last_modified": "2024-03-22T11:26:23Z", "resolved": "github:NixOS/nixpkgs/a3ed7406349a9335cb4c2a71369b697cecd9d351#kubectl",