Skip to content

Commit

Permalink
Add kapp-controller to Makefile to be installed with "run" command.
Browse files Browse the repository at this point in the history
Signed-off-by: dtfranz <dfranz@redhat.com>
  • Loading branch information
dtfranz committed Feb 26, 2024
1 parent 84e747d commit 493365f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export IMAGE_REPO ?= quay.io/operator-framework/operator-controller
export IMAGE_TAG ?= devel
export CERT_MGR_VERSION ?= v1.9.0
export CATALOGD_VERSION ?= $(shell go list -mod=mod -m -f "{{.Version}}" github.com/operator-framework/catalogd)
export KAPP_VERSION ?= v0.50.0# TODO replace with above or below line to pull version from go.mod
export RUKPAK_VERSION=$(shell go list -mod=mod -m -f "{{.Version}}" github.com/operator-framework/rukpak)
export WAIT_TIMEOUT ?= 60s
IMG?=$(IMAGE_REPO):$(IMAGE_TAG)
Expand Down Expand Up @@ -157,7 +158,7 @@ kind-load: $(KIND) #EXHELP Loads the currently constructed image onto the cluste
kind-deploy: export MANIFEST="./operator-controller.yaml"
kind-deploy: manifests $(KUSTOMIZE) #EXHELP Install controller and dependencies onto the kind cluster.
$(KUSTOMIZE) build $(KUSTOMIZE_BUILD_DIR) > operator-controller.yaml
envsubst '$$CATALOGD_VERSION,$$CERT_MGR_VERSION,$$RUKPAK_VERSION,$$MANIFEST' < scripts/install.tpl.sh | bash -s
envsubst '$$CATALOGD_VERSION,$$CERT_MGR_VERSION,$$KAPP_VERSION,$$RUKPAK_VERSION,$$MANIFEST' < scripts/install.tpl.sh | bash -s

.PHONY: kind-cluster
kind-cluster: $(KIND) #EXHELP Standup a kind cluster.
Expand Down
9 changes: 8 additions & 1 deletion scripts/install.tpl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ fi
catalogd_version=$CATALOGD_VERSION
cert_mgr_version=$CERT_MGR_VERSION
rukpak_version=$RUKPAK_VERSION
kapp_version=$KAPP_VERSION

if [[ -z "$catalogd_version" || -z "$cert_mgr_version" || -z "$rukpak_version" ]]; then
if [[ -z "$catalogd_version" || -z "$cert_mgr_version" || -z "$rukpak_version" || -z "$kapp_version" ]]; then
err="Error: Missing component version(s) for: "
if [[ -z "$catalogd_version" ]]; then
err+="catalogd "
Expand All @@ -24,6 +25,9 @@ if [[ -z "$catalogd_version" || -z "$cert_mgr_version" || -z "$rukpak_version" ]
if [[ -z "$rukpak_version" ]]; then
err+="rukpak "
fi
if [[ -z "$kapp_version" ]]; then
err+="kapp "
fi
echo "$err"
exit 1
fi
Expand All @@ -39,6 +43,9 @@ function kubectl_wait() {
kubectl apply -f "https://github.com/cert-manager/cert-manager/releases/download/${cert_mgr_version}/cert-manager.yaml"
kubectl_wait "cert-manager" "deployment/cert-manager-webhook" "60s"

kubectl apply -f "https://github.com/carvel-dev/kapp-controller/releases/download/${kapp_version}/release.yml"
kubectl_wait "kapp-controller" "deployment.apps/kapp-controller" 60s

kubectl apply -f "https://github.com/operator-framework/rukpak/releases/download/${rukpak_version}/rukpak.yaml"
kubectl_wait "rukpak-system" "deployment/core" "60s"
kubectl_wait "rukpak-system" "deployment/helm-provisioner" "60s"
Expand Down

0 comments on commit 493365f

Please sign in to comment.