Skip to content

Commit

Permalink
fix makefile check
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosedp committed Jan 9, 2025
1 parent d25a0bd commit e55e58c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
15 changes: 6 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -287,14 +287,12 @@ endif

.PHONY: kind
kind: ## Download kind locally if necessary.
ifeq (, $(shell which kind 2>/dev/null))
@{ \
set -e ;\
mkdir -p $(LOCALBIN) ;\
OS=$(shell go env GOOS) && ARCH=$(shell go env GOARCH) && \
GOBIN=$(LOCALBIN) go install sigs.k8s.io/kind@$(KIND_VERSION) ;\
}
endif

# Generate bundle manifests and metadata, then validate generated files.
.PHONY: bundle
Expand Down Expand Up @@ -350,13 +348,12 @@ catalog-push: catalog-build ## Push a catalog image.
olm-validate: bundle-push catalog-push ## Validates the bundle image.
operator-sdk bundle validate -b $(BUILDER) $(BUNDLE_IMG)

.PHONY: testenv-setup
testenv-setup: kind ## Setup the test environment (KIND cluster)
$(KIND) get clusters | grep -q test-operator || $(KIND) create cluster --name test-operator

.PHONY: olm-run
olm-run: olm-validate kind ## Runs the bundle image in a KIND cluster
ifeq ($(shell $(KIND) get clusters > /dev/null 2>&1), test-operator)
@echo "Cluster already running"
else
$(shell $(KIND) create cluster --name test-operator > /dev/null 2>&1)
endif
olm-run: olm-validate testenv-setup ## Runs the bundle image in a KIND cluster
kubectl config use-context kind-test-operator
operator-sdk olm install --version=$(OLM_VERSION) --timeout=5m || true
operator-sdk run bundle $(BUNDLE_IMG) --timeout=5m
Expand All @@ -378,7 +375,7 @@ scorecard-run: ## Runs the scorecard validation (depends on a KIND cluster)

.PHONY: testenv-teardown
testenv-teardown: ## Teardown the test environment (KIND cluster)
kind delete cluster --name test-operator > /dev/null 2>&1
kind delete cluster --name test-operator

.PHONY: dist
dist: check-versions bundle olm-validate podman-crossbuild ## Build manifests and container images, pushing them to the registry
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ metadata:
categories: Networking
certified: "false"
containerImage: quay.io/carlosedp/lbconfig-operator:v0.5.1
createdAt: "2025-01-09T14:09:12Z"
createdAt: "2025-01-09T15:45:28Z"
description: Manage External Load Balancers allowing creation/update for VIPs
and Servers dynamically via API.
k8sMaxVersion: ""
Expand Down

0 comments on commit e55e58c

Please sign in to comment.