Skip to content

Commit ca8035a

Browse files
unify install script
1 parent 41c4e42 commit ca8035a

File tree

6 files changed

+2710
-39
lines changed

6 files changed

+2710
-39
lines changed

Makefile

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -99,12 +99,8 @@ tidy: #HELP Update dependencies.
9999
$(Q)go mod tidy -go=$(GOLANG_VERSION)
100100

101101
.PHONY: manifests
102-
# To exclude catalogd. Otherwise, the CRD, Webhook and other configurations will be generated and added to the config/
103-
PATHS = ./api/... ./cmd/... ./internal/... ./test/...
104-
manifests: $(CONTROLLER_GEN) #EXHELP Generate WebhookConfiguration, ClusterRole, and CustomResourceDefinition objects.
105-
@for path in $(PATHS); do \
106-
$(CONTROLLER_GEN) rbac:roleName=manager-role crd webhook paths="$$path" output:crd:artifacts:config=config/base/crd/bases output:rbac:artifacts:config=config/base/rbac; \
107-
done
102+
manifests: $(CONTROLLER_GEN) #EXHELP Generate WebhookConfiguration, ClusterRole and CustomResourceDefinition objects.
103+
$(CONTROLLER_GEN) rbac:roleName=manager-role crd webhook paths="./..." output:crd:artifacts:config=config/base/crd/bases output:rbac:artifacts:config=config/base/rbac
108104

109105
.PHONY: generate
110106
generate: $(CONTROLLER_GEN) #EXHELP Generate code containing DeepCopy, DeepCopyInto, and DeepCopyObject method implementations.
@@ -236,12 +232,13 @@ kind-load: $(KIND) #EXHELP Loads the currently constructed images into the KIND
236232
$(CONTAINER_RUNTIME) save quay.io/operator-framework/catalogd:devel | $(KIND) load image-archive /dev/stdin --name $(KIND_CLUSTER_NAME)
237233

238234
.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
235+
kind-deploy: export MANIFEST := ./olmv1.yaml
236+
kind-deploy: manifests generate-catalogd $(KUSTOMIZE)
237+
$(KUSTOMIZE) build $(KUSTOMIZE_BUILD_DIR) > $(MANIFEST)
238+
cd catalogd && $(KUSTOMIZE) build config/overlays/cert-manager >> ../$(MANIFEST)
243239
envsubst '$$CERT_MGR_VERSION,$$INSTALL_DEFAULT_CATALOGS,$$MANIFEST' < scripts/install.tpl.sh | bash -s
244240

241+
245242
.PHONY: generate-catalogd
246243
generate-catalogd: ## Generate the catalogd manifests
247244
$(MAKE) -C catalogd generate
@@ -337,10 +334,10 @@ release: $(GORELEASER) #EXHELP Runs goreleaser for the operator-controller. By d
337334
$(GORELEASER) $(GORELEASER_ARGS)
338335

339336
.PHONY: quickstart
340-
quickstart: export MANIFEST := ./operator-controller.yaml
341-
quickstart: $(KUSTOMIZE) manifests generate-catalogd #EXHELP Generate the installation release manifests and scripts.
342-
$(KUSTOMIZE) build $(KUSTOMIZE_BUILD_DIR) | sed "s/:devel/:$(VERSION)/g" > operator-controller.yaml
343-
cd catalogd && $(KUSTOMIZE) build config/overlays/cert-manager > catalogd.yaml
337+
quickstart: export MANIFEST := ./olmv1.yaml
338+
quickstart: $(KUSTOMIZE) manifests build-catalogd #EXHELP Generate the unified installation release manifests and scripts.
339+
$(KUSTOMIZE) build $(KUSTOMIZE_BUILD_DIR) | sed "s/:devel/:$(VERSION)/g" > $(MANIFEST)
340+
cd catalogd && $(KUSTOMIZE) build config/overlays/cert-manager >> ../$(MANIFEST)
344341
envsubst '$$CERT_MGR_VERSION,$$INSTALL_DEFAULT_CATALOGS,$$MANIFEST' < scripts/install.tpl.sh > install.sh
345342

346343

catalogd/config/base/manager/manager.yaml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,3 @@
1-
apiVersion: v1
2-
kind: Namespace
3-
metadata:
4-
labels:
5-
app.kubernetes.io/part-of: olm
6-
pod-security.kubernetes.io/enforce: baseline
7-
pod-security.kubernetes.io/enforce-version: latest
8-
name: system
9-
---
101
apiVersion: apps/v1
112
kind: Deployment
123
metadata:

0 commit comments

Comments
 (0)