Skip to content

Commit 2a8a1aa

Browse files
Improve script install
1 parent 8adea72 commit 2a8a1aa

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

Makefile

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -237,13 +237,14 @@ kind-load: $(KIND) #EXHELP Loads the currently constructed images into the KIND
237237

238238
.PHONY: kind-deploy
239239
kind-deploy: export MANIFEST := ./operator-controller.yaml
240-
kind-deploy: manifests $(KUSTOMIZE) #EXHELP Install controller and dependencies, including catalogd, onto the kind cluster.
240+
kind-deploy: manifests generate-catalogd $(KUSTOMIZE) #EXHELP Install controller and dependencies, including catalogd, onto the kind cluster.
241241
$(KUSTOMIZE) build $(KUSTOMIZE_BUILD_DIR) > operator-controller.yaml
242242
cd catalogd && $(KUSTOMIZE) build config/overlays/cert-manager > catalogd.yaml
243-
envsubst '$$CERT_MGR_VERSION,$$INSTALL_DEFAULT_CATALOGS,$$MANIFEST' < scripts/install.tpl.sh > install.sh
244-
bash install.sh \
245-
--catalogd-manifest=./catalogd/catalogd.yaml \
246-
--default-catalogs-manifest=./catalogd/config/base/default/clustercatalogs/default-catalogs.yaml
243+
envsubst '$$CERT_MGR_VERSION,$$INSTALL_DEFAULT_CATALOGS,$$MANIFEST' < scripts/install.tpl.sh | bash -s
244+
245+
.PHONY: generate-catalogd
246+
generate-catalogd: ## Generate the catalogd manifests
247+
$(MAKE) -C catalogd generate
247248

248249
.PHONY: kind-cluster
249250
kind-cluster: $(KIND) #EXHELP Standup a kind cluster.

scripts/install.tpl.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,6 @@ if [[ ! -f "$catalogd_manifest" ]]; then
1919
exit 1
2020
fi
2121

22-
if [[ ! -f "$default_catalogs_manifest" ]]; then
23-
echo "Error: Missing required default catalogs manifest file at $default_catalogs_manifest"
24-
exit 1
25-
fi
26-
2722
if [[ -z "$cert_mgr_version" ]]; then
2823
echo "Error: Missing CERT_MGR_VERSION variable"
2924
exit 1
@@ -86,6 +81,11 @@ kubectl_wait_rollout "olmv1-system" "deployment/catalogd-controller-manager" "60
8681
kubectl_wait "olmv1-system" "deployment/catalogd-controller-manager" "60s"
8782

8883
if [[ "${install_default_catalogs}" != "false" ]]; then
84+
if [[ ! -f "$default_catalogs_manifest" ]]; then
85+
echo "Error: Missing required default catalogs manifest file at $default_catalogs_manifest"
86+
exit 1
87+
fi
88+
8989
kubectl apply -f "${default_catalogs_manifest}"
9090
kubectl wait --for=condition=Serving "clustercatalog/operatorhubio" --timeout="60s"
9191
fi

0 commit comments

Comments
 (0)