Skip to content

Commit 14c08c8

Browse files
committed
Remove a bunch of now-obsolete stuff
1 parent c24d999 commit 14c08c8

File tree

5 files changed

+19
-78
lines changed

5 files changed

+19
-78
lines changed

Makefile

Lines changed: 18 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -60,28 +60,8 @@ help: ## Display this help.
6060

6161
##@ Development
6262

63-
.PHONY: manifests
64-
manifests: controller-gen ## Generate WebhookConfiguration, ClusterRole and CustomResourceDefinition objects.
65-
$(CONTROLLER_GEN) rbac:roleName=manager-role crd webhook paths="./..." output:crd:artifacts:config=config/crd/bases
66-
cp config/crd/bases/* helm/crds
67-
68-
.PHONY: generate
69-
generate: controller-gen ## Generate code containing DeepCopy, DeepCopyInto, and DeepCopyObject method implementations.
70-
$(CONTROLLER_GEN) object:headerFile="hack/boilerplate.go.txt" paths="./..."
71-
72-
tt:
73-
$(CONTROLLER_GEN) object:headerFile="hack/boilerplate.go.txt" paths="./pkg/controller/resourcegraphdefinition"
74-
75-
.PHONY: fmt
76-
fmt: ## Run go fmt against code.
77-
go fmt ./...
78-
79-
.PHONY: vet
80-
vet: ## Run go vet against code.
81-
go vet ./...
82-
8363
.PHONY: test
84-
test: manifests generate fmt vet ## Run tests. Use WHAT=unit or WHAT=integration
64+
test: generate fmt vet ## Run tests. Use WHAT=unit or WHAT=integration
8565
ifeq ($(WHAT),integration)
8666
go test -v ./test/integration/suites/... -coverprofile integration-cover.out
8767
else ifeq ($(WHAT),unit)
@@ -110,12 +90,24 @@ lint-fix: golangci-lint ## Run golangci-lint linter and perform fixes
11090

11191
##@ Build
11292

93+
.PHONY: generate
94+
generate: ## Run go generate
95+
go generate ./...
96+
97+
.PHONY: fmt
98+
fmt: ## Run go fmt
99+
go fmt ./...
100+
101+
.PHONY: vet
102+
vet: ## Run go vet
103+
go vet ./...
104+
113105
.PHONY: build
114-
build: manifests generate fmt vet ## Build controller binary.
106+
build: generate fmt vet ## Build controller binary.
115107
go build -ldflags=${LDFLAGS} -o bin/controller ./cmd/controller/main.go
116108

117109
.PHONY: run
118-
run: manifests generate fmt vet ## Run a controller from your host.
110+
run: generate fmt vet ## Run a controller from your host.
119111
go run ./cmd/controller/main.go
120112

121113
# If you wish to build the manager image targeting other platforms you can use the --platform flag.
@@ -158,13 +150,11 @@ KUBECTL ?= kubectl
158150
KIND ?= kind
159151
KUSTOMIZE ?= $(LOCALBIN)/kustomize
160152
KO ?= $(LOCALBIN)/ko
161-
CONTROLLER_GEN ?= $(LOCALBIN)/controller-gen
162153
ENVTEST ?= $(LOCALBIN)/setup-envtest
163154

164155
## Tool Versions
165156
KO_VERSION ?= v0.17.1
166157
KUSTOMIZE_VERSION ?= v5.2.1
167-
CONTROLLER_TOOLS_VERSION ?= v0.16.2
168158

169159
.PHONY: ko
170160
ko: $(KO) ## Download ko locally if necessary. If wrong version is installed, it will be removed before downloading.
@@ -184,12 +174,6 @@ $(KUSTOMIZE): $(LOCALBIN)
184174
fi
185175
test -s $(LOCALBIN)/kustomize || GOBIN=$(LOCALBIN) GO111MODULE=on go install sigs.k8s.io/kustomize/kustomize/v5@$(KUSTOMIZE_VERSION)
186176

187-
.PHONY: controller-gen
188-
controller-gen: $(CONTROLLER_GEN) ## Download controller-gen locally if necessary. If wrong version is installed, it will be overwritten.
189-
$(CONTROLLER_GEN): $(LOCALBIN)
190-
test -s $(LOCALBIN)/controller-gen && $(LOCALBIN)/controller-gen --version | grep -q $(CONTROLLER_TOOLS_VERSION) || \
191-
GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-tools/cmd/controller-gen@$(CONTROLLER_TOOLS_VERSION)
192-
193177
.PHONY: image
194178
build-image: ko ## Build the kro controller images using ko build
195179
echo "Building kro image $(RELEASE_VERSION).."
@@ -228,11 +212,11 @@ ifndef ignore-not-found
228212
endif
229213

230214
.PHONY: install
231-
install: manifests ## Install CRDs into the K8s cluster specified in ~/.kube/config.
215+
install: generate ## Install CRDs into the K8s cluster specified in ~/.kube/config.
232216
$(KUBECTL) apply -f ./helm/crds
233217

234218
.PHONY: uninstall
235-
uninstall: manifests kustomize ## Uninstall CRDs from the K8s cluster specified in ~/.kube/config
219+
uninstall: kustomize ## Uninstall CRDs from the K8s cluster specified in ~/.kube/config
236220
$(KUBECTL) delete --ignore-not-found=$(ignore-not-found) -f ./helm/crds
237221

238222
.PHONY: deploy-kind
@@ -242,7 +226,7 @@ deploy-kind:
242226
$(KIND) create cluster --name ${KIND_CLUSTER_NAME}
243227
$(KUBECTL) --context kind-$(KIND_CLUSTER_NAME) create namespace kro-system
244228
make install
245-
# This generates deployment with ko://... used in image.
229+
# This generates deployment with ko://... used in image.
246230
# ko then intercepts it builds image, pushes to kind node, replaces the image in deployment and applies it
247231
helm template kro ./helm --namespace kro-system --set image.pullPolicy=Never --set image.ko=true | $(KO) apply -f -
248232
kubectl wait --for=condition=ready --timeout=1m pod -n kro-system -l app.kubernetes.io/component=controller

hack/boilerplate.go.txt

Lines changed: 0 additions & 12 deletions
This file was deleted.

hack/boilerplate.sh

Lines changed: 0 additions & 8 deletions
This file was deleted.

hack/toolchain.sh

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,10 @@ tools() {
1414
echo "Go workspace's \"bin\" directory is not in PATH. Run 'export PATH=\"\$PATH:\${GOPATH:-\$HOME/go}/bin\"'."
1515
fi
1616

17-
go install github.com/awslabs/attribution-gen@latest
1817
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
1918
go install github.com/google/ko@latest
2019
go install github.com/mikefarah/yq/v4@latest
2120
go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest
22-
go install sigs.k8s.io/controller-tools/cmd/controller-gen@latest
2321
go install github.com/sigstore/cosign/v2/cmd/cosign@latest
2422
go install golang.org/x/vuln/cmd/govulncheck@latest
25-
}
23+
}

hack/update-license.sh

Lines changed: 0 additions & 21 deletions
This file was deleted.

0 commit comments

Comments
 (0)