Skip to content

Commit 96ff239

Browse files
test install script combined
1 parent 0dc1516 commit 96ff239

File tree

3 files changed

+11
-16
lines changed

3 files changed

+11
-16
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ coverage
2121
# Release output
2222
dist/**
2323
operator-controller.yaml
24+
olmv1.yaml
2425
install.sh
2526

2627
# Kubernetes Generated files - skip generated files, except for vendored files

Makefile

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -236,12 +236,14 @@ kind-load: $(KIND) #EXHELP Loads the currently constructed images into the KIND
236236
$(CONTAINER_RUNTIME) save quay.io/operator-framework/catalogd:devel | $(KIND) load image-archive /dev/stdin --name $(KIND_CLUSTER_NAME)
237237

238238
.PHONY: kind-deploy
239-
kind-deploy: export MANIFEST := ./operator-controller.yaml
240-
kind-deploy: manifests generate-catalogd $(KUSTOMIZE) #EXHELP Install controller and dependencies, including catalogd, onto the kind cluster.
241-
$(KUSTOMIZE) build $(KUSTOMIZE_BUILD_DIR) > operator-controller.yaml
242-
cd catalogd && $(KUSTOMIZE) build config/overlays/cert-manager > catalogd.yaml
239+
kind-deploy: export MANIFEST := ./olmv1.yaml
240+
kind-deploy: manifests generate-catalogd $(KUSTOMIZE)
241+
$(KUSTOMIZE) build $(KUSTOMIZE_BUILD_DIR) > $(MANIFEST)
242+
cd catalogd && $(KUSTOMIZE) build config/overlays/cert-manager >> $(MANIFEST)
243+
sed -i.bak '/spec.selfSigned/d' $(MANIFEST) && rm -f $(MANIFEST).bak
243244
envsubst '$$CERT_MGR_VERSION,$$INSTALL_DEFAULT_CATALOGS,$$MANIFEST' < scripts/install.tpl.sh | bash -s
244245

246+
245247
.PHONY: generate-catalogd
246248
generate-catalogd: ## Generate the catalogd manifests
247249
$(MAKE) -C catalogd generate

scripts/install.tpl.sh

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,17 @@
22
set -euo pipefail
33
IFS=$'\n\t'
44

5-
operator_controller_manifest=$MANIFEST
5+
olmv1_manifest=$MANIFEST
66

7-
if [[ -z "$operator_controller_manifest" ]]; then
7+
if [[ -z "$olmv1_manifest" ]]; then
88
echo "Error: Missing required MANIFEST variable"
99
exit 1
1010
fi
1111

12-
catalogd_manifest="./catalogd/catalogd.yaml"
1312
default_catalogs_manifest="./catalogd/config/base/default/clustercatalogs/default-catalogs.yaml"
1413
cert_mgr_version=$CERT_MGR_VERSION
1514
install_default_catalogs=$INSTALL_DEFAULT_CATALOGS
1615

17-
if [[ ! -f "$catalogd_manifest" ]]; then
18-
echo "Error: Missing required catalogd manifest file at $catalogd_manifest"
19-
exit 1
20-
fi
21-
2216
if [[ -z "$cert_mgr_version" ]]; then
2317
echo "Error: Missing CERT_MGR_VERSION variable"
2418
exit 1
@@ -75,10 +69,11 @@ kubectl_wait "cert-manager" "deployment/cert-manager" "60s"
7569
kubectl_wait_for_query "mutatingwebhookconfigurations/cert-manager-webhook" '{.webhooks[0].clientConfig.caBundle}' 60 5
7670
kubectl_wait_for_query "validatingwebhookconfigurations/cert-manager-webhook" '{.webhooks[0].clientConfig.caBundle}' 60 5
7771

78-
kubectl apply -f "${catalogd_manifest}"
72+
kubectl apply -f "${olmv1_manifest}"
7973
# Wait for the rollout, and then wait for the deployment to be Available
8074
kubectl_wait_rollout "olmv1-system" "deployment/catalogd-controller-manager" "60s"
8175
kubectl_wait "olmv1-system" "deployment/catalogd-controller-manager" "60s"
76+
kubectl_wait "olmv1-system" "deployment/operator-controller-controller-manager" "60s"
8277

8378
if [[ "${install_default_catalogs}" != "false" ]]; then
8479
if [[ ! -f "$default_catalogs_manifest" ]]; then
@@ -89,6 +84,3 @@ if [[ "${install_default_catalogs}" != "false" ]]; then
8984
kubectl apply -f "${default_catalogs_manifest}"
9085
kubectl wait --for=condition=Serving "clustercatalog/operatorhubio" --timeout="60s"
9186
fi
92-
93-
kubectl apply -f "${operator_controller_manifest}"
94-
kubectl_wait "olmv1-system" "deployment/operator-controller-controller-manager" "60s"

0 commit comments

Comments
 (0)