|
1 | | -export KUBEBUILDER_ASSETS ?= ${HOME}/.kubebuilder/bin |
2 | | -export CLUSTER_NAME ?= $(shell kubectl config view --minify -o jsonpath='{.clusters[].name}' | rev | cut -d"/" -f1 | rev | cut -d"." -f1) |
3 | | -export CLUSTER_VPC_ID ?= $(shell aws eks describe-cluster --name $(CLUSTER_NAME) | jq -r ".cluster.resourcesVpcConfig.vpcId") |
4 | | -export AWS_ACCOUNT_ID ?= $(shell aws sts get-caller-identity --query Account --output text) |
5 | | -export REGION ?= $(shell aws configure get region) |
| 1 | +# For all targets except `help` and default target (which is also `help`), export environment variables |
| 2 | +ifneq (,$(filter-out help,$(MAKECMDGOALS))) |
| 3 | + export KUBEBUILDER_ASSETS ?= ${HOME}/.kubebuilder/bin |
| 4 | + export CLUSTER_NAME ?= $(shell kubectl config view --minify -o jsonpath='{.clusters[].name}' | rev | cut -d"/" -f1 | rev | cut -d"." -f1) |
| 5 | + export CLUSTER_VPC_ID ?= $(shell aws eks describe-cluster --name $(CLUSTER_NAME) | jq -r ".cluster.resourcesVpcConfig.vpcId") |
| 6 | + export AWS_ACCOUNT_ID ?= $(shell aws sts get-caller-identity --query Account --output text) |
| 7 | + export REGION ?= $(shell aws configure get region) |
| 8 | +endif |
| 9 | + |
6 | 10 | # Image URL to use all building/pushing image targets |
7 | 11 | IMG ?= controller:latest |
8 | 12 | VERSION ?= $(shell git tag --sort=v:refname | tail -1) |
@@ -115,3 +119,9 @@ e2e-clean: ## Delete eks resources created in the e2e test namespace |
115 | 119 | @kubectl delete namespace $(e2e-test-namespace) > /dev/null 2>&1 |
116 | 120 | @kubectl create namespace $(e2e-test-namespace) > /dev/null 2>&1 |
117 | 121 | @echo "Done!" |
| 122 | + |
| 123 | +.PHONY: api-reference |
| 124 | +api-reference: ## Update documentation in docs/api-reference.md |
| 125 | + @cd docgen && \ |
| 126 | + gen-crd-api-reference-docs -config config.json -api-dir "../pkg/apis/applicationnetworking/v1alpha1/" -out-file docs.html && \ |
| 127 | + cat api-reference-base.md docs.html > ../docs/api-reference.md |
0 commit comments