Skip to content

Commit cf345b5

Browse files
committed
Move catalogd/Makefile to Makefile.catalogd
Signed-off-by: Edmund Ochieng <[email protected]>
1 parent 125ce94 commit cf345b5

File tree

2 files changed

+18
-18
lines changed

2 files changed

+18
-18
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ bingo-upgrade: $(BINGO) #EXHELP Upgrade tools
142142
.PHONY: verify-crd-compatibility
143143
CRD_DIFF_ORIGINAL_REF := main
144144
CRD_DIFF_UPDATED_SOURCE := file://config/operator-controller/base/crd/bases/olm.operatorframework.io_clusterextensions.yaml
145-
CATALOGD_CRD_DIFF_UPDATED_SOURCE := file://catalogd/config/base/crd/bases/olm.operatorframework.io_clustercatalogs.yaml
145+
CATALOGD_CRD_DIFF_UPDATED_SOURCE := file://config/catalogd/base/crd/bases/olm.operatorframework.io_clustercatalogs.yaml
146146
CRD_DIFF_CONFIG := crd-diff-config.yaml
147147

148148
verify-crd-compatibility: $(CRD_DIFF) manifests
Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ $(warning Could not find docker or podman in path! This may result in targets re
2424
endif
2525

2626
# For standard development and release flows, we use the config/overlays/cert-manager overlay.
27-
KUSTOMIZE_OVERLAY := config/overlays/cert-manager
27+
KUSTOMIZE_OVERLAY := config/catalogd/overlays/cert-manager
2828

2929
# bingo manages consistent tooling versions for things like kind, kustomize, etc.
30-
include ./../.bingo/Variables.mk
30+
include ./.bingo/Variables.mk
3131

3232
# Dependencies
3333
export CERT_MGR_VERSION := v1.15.3
@@ -67,24 +67,24 @@ help: ## Display this help.
6767
##@ Development
6868

6969
clean: ## Remove binaries and test artifacts
70-
rm -rf bin
70+
rm -rf catalogd/bin
7171

7272
.PHONY: generate
7373
generate: $(CONTROLLER_GEN) ## Generate code and manifests.
74-
$(CONTROLLER_GEN) object:headerFile="../hack/boilerplate.go.txt" paths="./..."
75-
$(CONTROLLER_GEN) rbac:roleName=manager-role crd webhook paths="./..." output:crd:artifacts:config=config/base/crd/bases output:rbac:artifacts:config=config/base/rbac output:webhook:artifacts:config=config/base/manager/webhook/
74+
$(CONTROLLER_GEN) object:headerFile="hack/boilerplate.go.txt" paths="./catalogd/..."
75+
$(CONTROLLER_GEN) rbac:roleName=manager-role crd webhook paths="./catalogd/..." output:crd:artifacts:config=config/catalogd/base/crd/bases output:rbac:artifacts:config=config/catalogd/base/rbac output:webhook:artifacts:config=config/catalogd/base/manager/webhook/
7676

7777
FOCUS := $(if $(TEST),-v -focus "$(TEST)")
7878
ifeq ($(origin E2E_FLAGS), undefined)
7979
E2E_FLAGS :=
8080
endif
81-
test-e2e: ## Run the e2e tests on existing cluster
82-
$(GINKGO) $(E2E_FLAGS) -trace -vv $(FOCUS) test/e2e
81+
test-e2e: $(GINKGO) ## Run the e2e tests on existing cluster
82+
$(GINKGO) $(E2E_FLAGS) -trace -vv $(FOCUS) catalogd/test/e2e
8383

8484
e2e: KIND_CLUSTER_NAME := catalogd-e2e
8585
e2e: ISSUER_KIND := Issuer
8686
e2e: ISSUER_NAME := selfsigned-issuer
87-
e2e: KUSTOMIZE_OVERLAY := config/overlays/e2e
87+
e2e: KUSTOMIZE_OVERLAY := config/catalogd/overlays/e2e
8888
e2e: run image-registry test-e2e kind-cluster-cleanup ## Run e2e test suite on local kind cluster
8989

9090
image-registry: ## Setup in-cluster image registry
@@ -138,22 +138,22 @@ export GO_BUILD_LDFLAGS := -s -w \
138138
export GO_BUILD_GCFLAGS := all=-trimpath=${PWD}
139139
export GO_BUILD_TAGS := containers_image_openpgp
140140

141-
BUILDCMD = go build -tags '$(GO_BUILD_TAGS)' -ldflags '$(GO_BUILD_LDFLAGS)' -gcflags '$(GO_BUILD_GCFLAGS)' -asmflags '$(GO_BUILD_ASMFLAGS)' -o $(BUILDBIN)/$(notdir $@) ./cmd/$(notdir $@)
141+
BUILDCMD = go build -tags '$(GO_BUILD_TAGS)' -ldflags '$(GO_BUILD_LDFLAGS)' -gcflags '$(GO_BUILD_GCFLAGS)' -asmflags '$(GO_BUILD_ASMFLAGS)' -o $(BUILDBIN)/$(notdir $@) ./catalogd/cmd/$(notdir $@)
142142

143143
.PHONY: build-deps
144144
build-deps: generate
145145

146146
.PHONY: build go-build-local $(BINARIES)
147147
build: build-deps go-build-local ## Build binaries for current GOOS and GOARCH.
148148
go-build-local: $(BINARIES)
149-
$(BINARIES): BUILDBIN = bin
149+
$(BINARIES): BUILDBIN = catalogd/bin
150150
$(BINARIES):
151151
$(BUILDCMD)
152152

153153
.PHONY: build-linux go-build-linux $(LINUX_BINARIES)
154154
build-linux: build-deps go-build-linux ## Build binaries for GOOS=linux and local GOARCH.
155155
go-build-linux: $(LINUX_BINARIES)
156-
$(LINUX_BINARIES): BUILDBIN = bin/linux
156+
$(LINUX_BINARIES): BUILDBIN = catalogd/bin/linux
157157
$(LINUX_BINARIES):
158158
GOOS=linux $(BUILDCMD)
159159

@@ -163,7 +163,7 @@ run: generate kind-cluster install ## Create a kind cluster and install a local
163163

164164
.PHONY: build-container
165165
build-container: build-linux ## Build docker image for catalogd.
166-
$(CONTAINER_RUNTIME) build -f Dockerfile -t $(IMAGE) ./bin/linux
166+
$(CONTAINER_RUNTIME) build -f catalogd/Dockerfile -t $(IMAGE) ./catalogd/bin/linux
167167

168168
##@ Deploy
169169

@@ -185,15 +185,15 @@ install: check-cluster build-container kind-load deploy wait ## Install local ca
185185

186186
.PHONY: deploy
187187
deploy: export MANIFEST="./catalogd.yaml"
188-
deploy: export DEFAULT_CATALOGS="./config/base/default/clustercatalogs/default-catalogs.yaml"
188+
deploy: export DEFAULT_CATALOGS="./config/catalogd/base/default/clustercatalogs/default-catalogs.yaml"
189189
deploy: $(KUSTOMIZE) ## Deploy Catalogd to the K8s cluster specified in ~/.kube/config with cert-manager and default clustercatalogs
190-
cd config/base/manager && $(KUSTOMIZE) edit set image controller=$(IMAGE) && cd ../../..
190+
cd config/catalogd/base/manager && $(KUSTOMIZE) edit set image controller=$(IMAGE) && cd ../../../../
191191
$(KUSTOMIZE) build $(KUSTOMIZE_OVERLAY) | sed "s/cert-git-version/cert-$(GIT_VERSION)/g" > catalogd.yaml
192-
envsubst '$$CERT_MGR_VERSION,$$MANIFEST,$$DEFAULT_CATALOGS' < scripts/install.tpl.sh | bash -s
192+
envsubst '$$CERT_MGR_VERSION,$$MANIFEST,$$DEFAULT_CATALOGS' < catalogd/scripts/install.tpl.sh | bash -s
193193

194194
.PHONY: only-deploy-manifest
195195
only-deploy-manifest: $(KUSTOMIZE) ## Deploy just the Catalogd manifest--used in e2e testing where cert-manager is installed in a separate step
196-
cd config/base/manager && $(KUSTOMIZE) edit set image controller=$(IMAGE)
196+
cd config/catalogd/base/manager && $(KUSTOMIZE) edit set image controller=$(IMAGE)
197197
$(KUSTOMIZE) build $(KUSTOMIZE_OVERLAY) | kubectl apply -f -
198198

199199
wait:
@@ -208,7 +208,7 @@ cert-manager:
208208

209209
.PHONY: demo-update
210210
demo-update:
211-
hack/scripts/generate-asciidemo.sh
211+
catalogd/hack/scripts/generate-asciidemo.sh
212212

213213
.PHONY: check-cluster
214214
check-cluster:

0 commit comments

Comments
 (0)