@@ -43,9 +43,7 @@ wait-ready-external-dns-test:
4343 until kubectl wait pods -l app.kubernetes.io/instance=external-dns --for condition=Ready --timeout=120s ; do echo "."; sleep 1; done
4444
4545#################
46- ifeq ($(GATEWAY_API_VERSION),)
47- GATEWAY_API_VERSION=v0.6.0
48- endif
46+ GATEWAY_API_VERSION ?= v0.6.0
4947
5048.PHONY: gateway-api-upstream-get
5149gateway-api-upstream-get:
@@ -72,10 +70,16 @@ delete-cluster:
7270 kind delete cluster --name kind-gwc-dev-cluster
7371
7472#################
73+ ISTIO_VERSION ?= 1.16.1
74+
7575.PHONY: deploy-istio
7676deploy-istio:
77- helm upgrade -i --repo https://istio-release.storage.googleapis.com/charts base base --version 1.16.1 -n istio-system --create-namespace
78- helm upgrade -i --repo https://istio-release.storage.googleapis.com/charts istiod istiod --version 1.16.1 -n istio-system
77+ helm upgrade -i --repo https://istio-release.storage.googleapis.com/charts base base --version ${ISTIO_VERSION} -n istio-system --create-namespace
78+ helm upgrade -i --repo https://istio-release.storage.googleapis.com/charts istiod istiod --version ${ISTIO_VERSION} -n istio-system
79+
80+ .PHONY: undeploy-istio
81+ undeploy-istio:
82+ helm uninstall -n istio-system istiod
7983
8084#################
8185.PHONY: cluster-load-controller-image
@@ -143,25 +147,55 @@ ca-cert-secret-create:
143147 kubectl -n cert-manager create secret tls ca-key-pair --cert=foo-example-com.crt --key=foo-example-com.key
144148
145149#################
150+ AWS_LOAD_BALANCER_CONTROLLER_VERSION ?= v2.4.5
151+ AWS_LOAD_BALANCER_CONTROLLER_CHART_VERSION ?= v1.4.6
152+ # Note, template also require CLUSTERNAME and AWS_LOAD_BALANCER_CONTROLLER_IAM_ROLE_ARN
153+
146154.PHONY: deploy-aws-load-balancer-controller-crds
147155deploy-aws-load-balancer-controller-crds:
148- kubectl apply -f https://raw.githubusercontent.com/kubernetes-sigs/aws-load-balancer-controller/v2.4.5/helm/aws-load-balancer-controller/crds/crds.yaml
156+ kubectl apply -f https://raw.githubusercontent.com/kubernetes-sigs/aws-load-balancer-controller/${AWS_LOAD_BALANCER_CONTROLLER_VERSION}/helm/aws-load-balancer-controller/crds/crds.yaml
157+
158+ .PHONY: deploy-aws-load-balancer-controller
159+ deploy-aws-load-balancer-controller:
160+ cat test-data/aws-load-balancer-controller-values.yaml_tpl | envsubst > aws-load-balancer-controller-values.yaml
161+ helm upgrade -i --repo https://aws.github.io/eks-charts aws-load-balancer-controller aws-load-balancer-controller --version ${AWS_LOAD_BALANCER_CONTROLLER_CHART_VERSION} -n kube-system --set installCRDs=false --values aws-load-balancer-controller-values.yaml
162+
163+ .PHONY: undeploy-aws-load-balancer-controller
164+ undeploy-aws-load-balancer-controller:
165+ helm uninstall -n kube-system aws-load-balancer-controller
149166
150167#################
168+ CROSSPLANE_VERSION ?= v1.11.0
169+
151170.PHONY: deploy-crossplane
152171deploy-crossplane:
153- helm upgrade -i --repo https://charts.crossplane.io/stable crossplane crossplane --version v1.11.0 -n crossplane-system --create-namespace
172+ helm upgrade -i --repo https://charts.crossplane.io/stable crossplane crossplane --version ${CROSSPLANE_VERSION} -n crossplane-system --create-namespace
173+
174+ .PHONY: undeploy-crossplane
175+ undeploy-crossplane:
176+ helm uninstall crossplane -n crossplane-system
177+
178+ CROSSPLANE_AWS_PROVIDER_VERSION ?= v0.28.0
179+ # Note, templates also require CROSSPLANE_INITIAL_IAM_ROLE_ARN and CROSSPLANE_IAM_ROLE_ARN
154180
155181.PHONY: deploy-crossplane-aws-provider
156182deploy-crossplane-aws-provider:
157- kubectl apply -f test-data/crossplane-aws-provider.yaml
183+ cat test-data/crossplane-aws-provider.yaml_tpl | CROSSPLANE_AWS_PROVIDER_VERSION=${CROSSPLANE_AWS_PROVIDER_VERSION} CROSSPLANE_INITIAL_IAM_ROLE_ARN=${CROSSPLANE_INITIAL_IAM_ROLE_ARN} envsubst > crossplane-aws-provider.yaml
184+ cat test-data/crossplane-aws-provider-config.yaml_tpl | CROSSPLANE_IAM_ROLE_ARN=${CROSSPLANE_IAM_ROLE_ARN} envsubst > crossplane-aws-provider-config.yaml
185+ kubectl apply -f crossplane-aws-provider.yaml
158186 kubectl wait "providers.pkg.crossplane.io/provider-aws" --for=condition=Installed --timeout=180s
159187 kubectl wait "providers.pkg.crossplane.io/provider-aws" --for=condition=Healthy --timeout=180s
188+ kubectl apply -f crossplane-aws-provider-config.yaml
189+
190+ .PHONY: undeploy-crossplane-aws-provider
191+ undeploy-crossplane-aws-provider:
192+ kubectl delete -f crossplane-aws-provider-config.yaml
193+ kubectl delete -f crossplane-aws-provider.yaml
160194
161195#################
162196# See 'doc/getting-started.md'
163197.PHONY: setup-getting-started
164- setup-getting-started: setup-getting-started-cluster setup-getting-started-controller setup-getting-started-usecase
198+ setup-getting-started: setup-getting-started-cluster setup-getting-started-controller setup-getting-started-controller-blueprint setup-getting-started- usecase
165199
166200.PHONY: setup-getting-started-cluster
167201setup-getting-started-cluster:
@@ -179,17 +213,51 @@ setup-getting-started-controller:
179213 make docker-build
180214 make cluster-load-controller-image
181215 make deploy
182- kubectl apply -f blueprints/gatewayclassblueprint-contour-istio-cert.yaml -f blueprints/gatewayclass-contour-istio-cert.yaml
216+
217+ BIFROST_VERSION ?= 0.1.6
183218
184219.PHONY: setup-getting-started-controller-helm
185220setup-getting-started-controller-helm:
186- helm upgrade -i bifrost-gateway-controller-helm oci://ghcr.io/tv2-oss/bifrost-gateway-controller-helm --version 0.1.6 --values charts/bifrost-gateway-controller/ci/gatewayclassblueprint-contour-istio-values.yaml -n bifrost-gateway-controller-system --create-namespace
221+ helm upgrade -i bifrost-gateway-controller-helm oci://ghcr.io/tv2-oss/bifrost-gateway-controller-helm --version ${BIFROST_VERSION} --values charts/bifrost-gateway-controller/ci/gatewayclassblueprint-contour-istio-values.yaml -n bifrost-gateway-controller-system --create-namespace
222+
223+ .PHONY: setup-getting-started-controller-aws-helm
224+ setup-getting-started-controller-aws-helm:
225+ helm upgrade -i bifrost-gateway-controller-helm oci://ghcr.io/tv2-oss/bifrost-gateway-controller-helm --version ${BIFROST_VERSION} --values charts/bifrost-gateway-controller/ci/gatewayclassblueprint-crossplane-aws-alb-values.yaml -n bifrost-gateway-controller-system --create-namespace
226+
227+ .PHONY: undeploy-controller
228+ undeploy-controller:
229+ helm uninstall -n bifrost-gateway-controller-system bifrost-gateway-controller-helm
230+
231+ .PHONY: setup-getting-started-controller-blueprint
232+ setup-getting-started-controller-blueprint:
187233 kubectl apply -f blueprints/gatewayclassblueprint-contour-istio-cert.yaml -f blueprints/gatewayclass-contour-istio-cert.yaml
188234
235+ BIFROST_BLUEPRINTS_VERSION ?= 0.0.18
236+
237+ .PHONY: deploy-aws-istio-blueprint
238+ deploy-aws-istio-blueprint:
239+ kubectl apply -f https://github.com/tv2-oss/bifrost-gateway-controller/releases/download/${BIFROST_BLUEPRINTS_VERSION}/gatewayclassblueprint-aws-alb-crossplane.yaml
240+ kubectl apply -f https://github.com/tv2-oss/bifrost-gateway-controller/releases/download/${BIFROST_BLUEPRINTS_VERSION}/gatewayclass-aws-alb-crossplane.yaml
241+
242+ .PHONY: undeploy-aws-istio-blueprint
243+ undeploy-aws-istio-blueprint:
244+ kubectl delete -f https://github.com/tv2-oss/bifrost-gateway-controller/releases/download/${BIFROST_BLUEPRINTS_VERSION}/gatewayclassblueprint-aws-alb-crossplane.yaml
245+ kubectl delete -f https://github.com/tv2-oss/bifrost-gateway-controller/releases/download/${BIFROST_BLUEPRINTS_VERSION}/gatewayclass-aws-alb-crossplane.yaml
246+
247+ .PHONY: deploy-aws-istio-blueprint-local
248+ deploy-aws-istio-blueprint-local:
249+ kubectl apply -f blueprints/gatewayclassblueprint-aws-alb-crossplane.yaml -f blueprints/gatewayclass-aws-alb-crossplane.yaml
250+
251+ .PHONY: undeploy-aws-istio-blueprint-local
252+ undeploy-aws-istio-blueprint-local:
253+ kubectl delete -f blueprints/gatewayclassblueprint-aws-alb-crossplane.yaml -f blueprints/gatewayclass-aws-alb-crossplane.yaml
254+
255+ GATEWAY_CLASS_NAME ?= contour-istio-cert
256+
189257.PHONY: setup-getting-started-usecase
190258setup-getting-started-usecase:
191259 kubectl apply -f test-data/getting-started/foo-namespaces.yaml
192- kubectl apply -f test-data/getting-started/foo-gateway.yaml
260+ cat test-data/getting-started/foo-gateway.yaml | GATEWAY_CLASS_NAME=${GATEWAY_CLASS_NAME} envsubst | kubectl apply -f -
193261 kubectl -n foo-site apply -f test-data/getting-started/app-foo-site.yaml
194262 kubectl -n foo-site apply -f test-data/getting-started/foo-site-httproute.yaml
195263 kubectl -n foo-store apply -f test-data/getting-started/app-foo-store-v1.yaml
0 commit comments