@@ -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,100 @@ 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
194+
195+ #################
196+ BIFROST_VERSION ?= 0.1.6
197+
198+ .PHONY: deploy-controller-helm
199+ deploy-controller-helm:
200+ 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
201+
202+ .PHONY: deploy-controller-aws-helm
203+ deploy-controller-aws-helm:
204+ 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
205+
206+ .PHONY: undeploy-controller
207+ undeploy-controller:
208+ helm uninstall -n bifrost-gateway-controller-system bifrost-gateway-controller-helm
209+
210+ #################
211+ BIFROST_BLUEPRINTS_VERSION ?= 0.0.18
212+
213+ .PHONY: deploy-controller-blueprint
214+ setup-getting-started-controller-blueprint:
215+ kubectl apply -f https://github.com/tv2-oss/bifrost-gateway-controller/releases/download/${BIFROST_BLUEPRINTS_VERSION}/gatewayclassblueprint-contour-istio-cert.yaml
216+ kubectl apply -f https://github.com/tv2-oss/bifrost-gateway-controller/releases/download/${BIFROST_BLUEPRINTS_VERSION}/gatewayclass-contour-istio-cert.yaml
217+
218+ .PHONY: deploy-controller-blueprint-local
219+ deploy-controller-blueprint-local:
220+ kubectl apply -f blueprints/gatewayclassblueprint-contour-istio-cert.yaml -f blueprints/gatewayclass-contour-istio-cert.yaml
221+
222+ .PHONY: deploy-aws-istio-blueprint
223+ deploy-aws-istio-blueprint:
224+ kubectl apply -f https://github.com/tv2-oss/bifrost-gateway-controller/releases/download/${BIFROST_BLUEPRINTS_VERSION}/gatewayclassblueprint-aws-alb-crossplane.yaml
225+ kubectl apply -f https://github.com/tv2-oss/bifrost-gateway-controller/releases/download/${BIFROST_BLUEPRINTS_VERSION}/gatewayclass-aws-alb-crossplane.yaml
226+
227+ .PHONY: undeploy-aws-istio-blueprint
228+ undeploy-aws-istio-blueprint:
229+ kubectl delete -f https://github.com/tv2-oss/bifrost-gateway-controller/releases/download/${BIFROST_BLUEPRINTS_VERSION}/gatewayclassblueprint-aws-alb-crossplane.yaml
230+ kubectl delete -f https://github.com/tv2-oss/bifrost-gateway-controller/releases/download/${BIFROST_BLUEPRINTS_VERSION}/gatewayclass-aws-alb-crossplane.yaml
231+
232+ .PHONY: deploy-aws-istio-blueprint-local
233+ deploy-aws-istio-blueprint-local:
234+ kubectl apply -f blueprints/gatewayclassblueprint-aws-alb-crossplane.yaml -f blueprints/gatewayclass-aws-alb-crossplane.yaml
235+
236+ .PHONY: undeploy-aws-istio-blueprint-local
237+ undeploy-aws-istio-blueprint-local:
238+ kubectl delete -f blueprints/gatewayclassblueprint-aws-alb-crossplane.yaml -f blueprints/gatewayclass-aws-alb-crossplane.yaml
160239
161240#################
162241# See 'doc/getting-started.md'
163242.PHONY: setup-getting-started
164- setup-getting-started: setup-getting-started-cluster setup-getting-started-controller setup-getting-started-usecase
243+ setup-getting-started: setup-getting-started-cluster setup-getting-started-controller setup-getting-started-controller-blueprint deploy-getting-started- usecase
165244
166245.PHONY: setup-getting-started-cluster
167246setup-getting-started-cluster:
@@ -179,23 +258,29 @@ setup-getting-started-controller:
179258 make docker-build
180259 make cluster-load-controller-image
181260 make deploy
182- kubectl apply -f blueprints/gatewayclassblueprint-contour-istio-cert.yaml -f blueprints/gatewayclass-contour-istio-cert.yaml
183261
184- .PHONY: setup-getting-started-controller-helm
185- setup-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
187- kubectl apply -f blueprints/gatewayclassblueprint-contour-istio-cert.yaml -f blueprints/gatewayclass-contour-istio-cert.yaml
262+ GATEWAY_CLASS_NAME ?= contour-istio-cert
263+ DOMAIN ?= foo.example.com
188264
189- .PHONY: setup -getting-started-usecase
190- setup -getting-started-usecase:
265+ .PHONY: deploy -getting-started-usecase
266+ deploy -getting-started-usecase:
191267 kubectl apply -f test-data/getting-started/foo-namespaces.yaml
192- kubectl apply -f test-data/getting-started/foo-gateway.yaml
268+ cat test-data/getting-started/foo-gateway.yaml | GATEWAY_CLASS_NAME=${GATEWAY_CLASS_NAME} DOMAIN=${DOMAIN} envsubst | kubectl apply -f -
193269 kubectl -n foo-site apply -f test-data/getting-started/app-foo-site.yaml
194270 kubectl -n foo-site apply -f test-data/getting-started/foo-site-httproute.yaml
195271 kubectl -n foo-store apply -f test-data/getting-started/app-foo-store-v1.yaml
196272 kubectl -n foo-store apply -f test-data/getting-started/app-foo-store-v2.yaml
197273 kubectl -n foo-store apply -f test-data/getting-started/foo-store-httproute.yaml
198274
275+ .PHONY: undeploy-getting-started-usecase
276+ undeploy-getting-started-usecase:
277+ kubectl delete -f test-data/getting-started/foo-namespaces.yaml
278+
279+ .PHONY: deploy-namespace-gatewayclassconfig
280+ deploy-namespace-gatewayclassconfig:
281+ kubectl apply -f test-data/getting-started/foo-namespaces.yaml
282+ cat hack/demo/namespace-gatewayclassconfig.yaml | CERTIFICATE_ARN=${CERTIFICATE_ARN} envsubst | kubectl apply -f -
283+
199284.PHONY: wait-ready-getting-started-usecase
200285wait-ready-getting-started-usecase:
201286 scripts/waitfor.sh scripts/curl.sh -s --connect-timeout 1 --fail --resolve foo.example.com:80:127.0.0.1 http://foo.example.com/site
0 commit comments