Skip to content

Commit 9815a48

Browse files
committed
Remove a bunch of now-obsolete stuff
1 parent 25cf311 commit 9815a48

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
@@ -59,28 +59,8 @@ help: ## Display this help.
5959

6060
##@ Development
6161

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

11090
##@ Build
11191

92+
.PHONY: generate
93+
generate: ## Run go generate
94+
go generate ./...
95+
96+
.PHONY: fmt
97+
fmt: ## Run go fmt
98+
go fmt ./...
99+
100+
.PHONY: vet
101+
vet: ## Run go vet
102+
go vet ./...
103+
112104
.PHONY: build
113-
build: manifests generate fmt vet ## Build controller binary.
105+
build: generate fmt vet ## Build controller binary.
114106
go build -ldflags=${LDFLAGS} -o bin/controller ./cmd/controller/main.go
115107

116108
.PHONY: run
117-
run: manifests generate fmt vet ## Run a controller from your host.
109+
run: generate fmt vet ## Run a controller from your host.
118110
go run ./cmd/controller/main.go
119111

120112
# If you wish to build the manager image targeting other platforms you can use the --platform flag.
@@ -157,13 +149,11 @@ KUBECTL ?= kubectl
157149
KIND ?= kind
158150
KUSTOMIZE ?= $(LOCALBIN)/kustomize
159151
KO ?= $(LOCALBIN)/ko
160-
CONTROLLER_GEN ?= $(LOCALBIN)/controller-gen
161152
ENVTEST ?= $(LOCALBIN)/setup-envtest
162153

163154
## Tool Versions
164155
KO_VERSION ?= v0.17.1
165156
KUSTOMIZE_VERSION ?= v5.2.1
166-
CONTROLLER_TOOLS_VERSION ?= v0.16.2
167157

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

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

229213
.PHONY: install
230-
install: manifests ## Install CRDs into the K8s cluster specified in ~/.kube/config.
214+
install: generate ## Install CRDs into the K8s cluster specified in ~/.kube/config.
231215
$(KUBECTL) apply -f ./helm/crds
232216

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

237221
.PHONY: deploy-kind
@@ -241,7 +225,7 @@ deploy-kind: ko
241225
$(KIND) create cluster --name ${KIND_CLUSTER_NAME}
242226
$(KUBECTL) --context kind-$(KIND_CLUSTER_NAME) create namespace kro-system
243227
make install
244-
# This generates deployment with ko://... used in image.
228+
# This generates deployment with ko://... used in image.
245229
# ko then intercepts it builds image, pushes to kind node, replaces the image in deployment and applies it
246230
helm template kro ./helm --namespace kro-system --set image.pullPolicy=Never --set image.ko=true | $(KO) apply -f -
247231
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)