Skip to content

Commit 7f4a62c

Browse files
committed
Clean up makefiles
1 parent 5f7a063 commit 7f4a62c

File tree

3 files changed

+10
-20
lines changed

3 files changed

+10
-20
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,5 +266,5 @@ update-crd-docs: ## Update CRD markdown documentation from YAML definitions
266266
@echo "CRD documentation updated successfully!"
267267

268268
.PHONY: certs
269-
certs:
269+
certs: ## Create just in time TLS certificates needed for tests and examples
270270
make -C hack/tls-cert-gen run

hack/tls-cert-gen/makefile

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,3 @@
11
.PHONY: run
2-
run:
2+
run: ## Create just in time TLS certificates needed for tests and examples
33
go run ./...
4-
5-
.PHONY: extract
6-
extract:
7-
@if [ -z "$@" ]; then \
8-
echo "Usage: make extract <file>"; \
9-
exit 1; \
10-
fi
11-
12-
@echo "dollar at is"
13-
@echo $@
14-
@echo "this was dollar"
15-
16-
@# Extract the TLS certificate from the Kubernetes secret
17-
cat $@ | yq eval '.data["tls.crt"]' - | base64 -d | openssl x509 -text -noout

tests/Makefile

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ clean-venv:
6868

6969

7070
.PHONY: run-local-tests
71-
run-local-tests: ## Run tests
71+
run-local-tests: certs ## Run tests
7272
source $(ROOT_DIR)/tests/venv/bin/activate \
7373
&& pytest \
7474
--image=$(BUILD_IMAGE) \
@@ -84,7 +84,7 @@ run-local-tests: ## Run tests
8484

8585

8686
.PHONY: run-tests
87-
run-tests: ## Run tests
87+
run-tests: certs ## Run tests
8888
docker run --rm -v $(KUBE_CONFIG_FOLDER):/root/.kube \
8989
$(TEST_PREFIX):$(TEST_TAG) \
9090
--context=$(CONTEXT) \
@@ -100,7 +100,7 @@ run-tests: ## Run tests
100100

101101

102102
.PHONY: run-tests-in-kind
103-
run-tests-in-kind: ## Run tests in Kind
103+
run-tests-in-kind: certs ## Run tests in Kind
104104
docker run --network=kind --rm \
105105
-v $(KIND_KUBE_CONFIG_FOLDER):/root/.kube \
106106
-v $(ROOT_DIR)/tests:/workspace/tests \
@@ -142,7 +142,7 @@ image-load: ## Load the image into the Kind K8S cluster
142142

143143

144144
.PHONY: run-tests-in-minikube
145-
run-tests-in-minikube: ## Run tests in Minikube
145+
run-tests-in-minikube: certs ## Run tests in Minikube
146146
docker run --network=minikube --rm \
147147
-v $(MINIKUBE_KUBE_CONFIG_FOLDER):/root/.kube \
148148
-v $(ROOT_DIR)/tests:/workspace/tests \
@@ -192,3 +192,7 @@ upgrade-resources:
192192
## Create and delete resources for upgrade tests e.g. `make upgrade-resources PYTEST_ARGS="create OR delete"`
193193
pip install -r ../tests/requirements.txt --no-deps
194194
pytest -v -s -m $(PYTEST_ARGS)
195+
196+
.PHONY: certs
197+
certs: ## Create just in time TLS certificates needed for tests and examples
198+
make -C $(ROOT_DIR) certs

0 commit comments

Comments
 (0)