@@ -68,7 +68,7 @@ fmt: ## Run go fmt against code.
6868vet : # # Run go vet against code.
6969 go vet ./...
7070
71- .PHONY : test test-e2e e2e kind-load kind-cluster kind-cluster-cleanup
71+ .PHONY : test test-e2e e2e kind-load kind-cluster kind-cluster-cleanup kind-deploy
7272test : manifests generate fmt vet test-unit e2e # # Run all tests.
7373
7474FOCUS := $(if $(TEST ) ,-v -focus "$(TEST ) ")
@@ -84,13 +84,18 @@ test-unit: envtest ## Run the unit tests
8484e2e : KIND_CLUSTER_NAME=operator-controller-e2e
8585e2e : run test-e2e kind-cluster-cleanup # # Run e2e test suite on local kind cluster
8686
87- kind-load : kind # # Loads the currently constructed image onto the cluster
87+ kind-load : kind # # Loads the currently constructed image onto the kind cluster
8888 $(KIND ) load docker-image $(IMG ) --name $(KIND_CLUSTER_NAME )
8989
9090kind-cluster : kind kind-cluster-cleanup # # Standup a kind cluster
9191 $(KIND ) create cluster --name ${KIND_CLUSTER_NAME}
9292 $(KIND ) export kubeconfig --name ${KIND_CLUSTER_NAME}
9393
94+ kind-deploy : export MANIFEST="./operator-controller.yaml"
95+ kind-deploy : kind manifests kustomize # # Install controller and dependencies onto the kind cluster
96+ kubectl kustomize config/default > operator-controller.yaml
97+ envsubst ' $$CATALOGD_VERSION,$$CERT_MGR_VERSION,$$RUKPAK_VERSION,$$MANIFEST' < scripts/install.tpl.sh | bash -s
98+
9499kind-cluster-cleanup : kind # # Delete the kind cluster
95100 $(KIND ) delete cluster --name ${KIND_CLUSTER_NAME}
96101
@@ -110,7 +115,7 @@ build-linux: $(BUILDDEPS) ## Build manager binary using goreleaser for GOOS=linu
110115 GOOS=linux $(BUILDCMD )
111116
112117.PHONY : run
113- run : docker-build kind-cluster kind-load install # # Build the operator-controller then deploy it into a new kind cluster.
118+ run : docker-build kind-cluster kind-load kind-deploy # # Build the operator-controller then deploy it into a new kind cluster.
114119
115120.PHONY : wait
116121wait :
@@ -133,21 +138,23 @@ release: goreleaser ## Runs goreleaser for the operator-controller. By default,
133138 $(GORELEASER ) $(GORELEASER_ARGS )
134139
135140quickstart : export MANIFEST="https://github.com/operator-framework/operator-controller/releases/download/$(VERSION ) /operator-controller.yaml"
136- quickstart : kustomize generate # # Generate the installation release manifests and scripts
141+ quickstart : kustomize # # Generate the installation release manifests and scripts with dependencies
137142 kubectl kustomize config/default | sed " s/:devel/:$( VERSION) /g" > operator-controller.yaml
138143 envsubst ' $$CATALOGD_VERSION,$$CERT_MGR_VERSION,$$RUKPAK_VERSION,$$MANIFEST' < scripts/install.tpl.sh > install.sh
139144
145+ # #############
146+ # Deployment #
147+ # #############
148+
140149# #@ Deployment
141150
142151ifndef ignore-not-found
143152 ignore-not-found = false
144153endif
145154
146155.PHONY : install
147- install : export MANIFEST="./operator-controller.yaml"
148- install : manifests kustomize generate # # Install CRDs into the K8s cluster specified in ~/.kube/config.
149- kubectl kustomize config/default > operator-controller.yaml
150- envsubst ' $$CATALOGD_VERSION,$$CERT_MGR_VERSION,$$RUKPAK_VERSION,$$MANIFEST' < scripts/install.tpl.sh | bash -s
156+ install : manifests kustomize # # Install CRDs into the K8s cluster specified in ~/.kube/config.
157+ $(KUSTOMIZE ) build config/crd | kubectl apply -f -
151158
152159.PHONY : uninstall
153160uninstall : manifests kustomize # # Uninstall CRDs from the K8s cluster specified in ~/.kube/config. Call with ignore-not-found=true to ignore resource not found errors during deletion.
@@ -166,6 +173,8 @@ undeploy: ## Undeploy controller from the K8s cluster specified in ~/.kube/confi
166173# Hack / Tools #
167174# ###############
168175
176+ # #@ Tools
177+
169178# # Location to install dependencies to
170179LOCALBIN ?= $(shell pwd) /hack/tools/bin
171180$(LOCALBIN ) :
0 commit comments