Skip to content

Commit 9ceac70

Browse files
committed
Test setup working e2e
1 parent e17d914 commit 9ceac70

File tree

4 files changed

+44
-32
lines changed

4 files changed

+44
-32
lines changed

Makefile.local

Lines changed: 41 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -193,46 +193,31 @@ undeploy-crossplane-aws-provider:
193193
kubectl delete -f crossplane-aws-provider.yaml
194194

195195
#################
196-
# See 'doc/getting-started.md'
197-
.PHONY: setup-getting-started
198-
setup-getting-started: setup-getting-started-cluster setup-getting-started-controller setup-getting-started-controller-blueprint setup-getting-started-usecase
199-
200-
.PHONY: setup-getting-started-cluster
201-
setup-getting-started-cluster:
202-
make create-cluster deploy-gateway-api
203-
make deploy-metallb
204-
make deploy-istio
205-
make deploy-contour deploy-contour-provisioner
206-
make setup-external-dns-test
207-
make deploy-cert-manager
208-
209-
.PHONY: setup-getting-started-controller
210-
setup-getting-started-controller:
211-
# Using 'Deploy from Local-build and YAML Artifacts' method
212-
make build
213-
make docker-build
214-
make cluster-load-controller-image
215-
make deploy
216-
217196
BIFROST_VERSION ?= 0.1.6
218197

219-
.PHONY: setup-getting-started-controller-helm
220-
setup-getting-started-controller-helm:
198+
.PHONY: deploy-controller-helm
199+
deploy-controller-helm:
221200
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
222201

223-
.PHONY: setup-getting-started-controller-aws-helm
224-
setup-getting-started-controller-aws-helm:
202+
.PHONY: deploy-controller-aws-helm
203+
deploy-controller-aws-helm:
225204
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
226205

227206
.PHONY: undeploy-controller
228207
undeploy-controller:
229208
helm uninstall -n bifrost-gateway-controller-system bifrost-gateway-controller-helm
230209

231-
.PHONY: setup-getting-started-controller-blueprint
210+
#################
211+
BIFROST_BLUEPRINTS_VERSION ?= 0.0.18
212+
213+
.PHONY: deploy-controller-blueprint
232214
setup-getting-started-controller-blueprint:
233-
kubectl apply -f blueprints/gatewayclassblueprint-contour-istio-cert.yaml -f blueprints/gatewayclass-contour-istio-cert.yaml
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
234217

235-
BIFROST_BLUEPRINTS_VERSION ?= 0.0.18
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
236221

237222
.PHONY: deploy-aws-istio-blueprint
238223
deploy-aws-istio-blueprint:
@@ -252,18 +237,45 @@ deploy-aws-istio-blueprint-local:
252237
undeploy-aws-istio-blueprint-local:
253238
kubectl delete -f blueprints/gatewayclassblueprint-aws-alb-crossplane.yaml -f blueprints/gatewayclass-aws-alb-crossplane.yaml
254239

240+
#################
241+
# See 'doc/getting-started.md'
242+
.PHONY: setup-getting-started
243+
setup-getting-started: setup-getting-started-cluster setup-getting-started-controller setup-getting-started-controller-blueprint setup-getting-started-usecase
244+
245+
.PHONY: setup-getting-started-cluster
246+
setup-getting-started-cluster:
247+
make create-cluster deploy-gateway-api
248+
make deploy-metallb
249+
make deploy-istio
250+
make deploy-contour deploy-contour-provisioner
251+
make setup-external-dns-test
252+
make deploy-cert-manager
253+
254+
.PHONY: setup-getting-started-controller
255+
setup-getting-started-controller:
256+
# Using 'Deploy from Local-build and YAML Artifacts' method
257+
make build
258+
make docker-build
259+
make cluster-load-controller-image
260+
make deploy
261+
255262
GATEWAY_CLASS_NAME ?= contour-istio-cert
263+
DOMAIN ?= foo.example.com
256264

257265
.PHONY: setup-getting-started-usecase
258266
setup-getting-started-usecase:
259267
kubectl apply -f test-data/getting-started/foo-namespaces.yaml
260-
cat test-data/getting-started/foo-gateway.yaml | GATEWAY_CLASS_NAME=${GATEWAY_CLASS_NAME} envsubst | kubectl apply -f -
268+
cat test-data/getting-started/foo-gateway.yaml | GATEWAY_CLASS_NAME=${GATEWAY_CLASS_NAME} DOMAIN=${DOMAIN} envsubst | kubectl apply -f -
261269
kubectl -n foo-site apply -f test-data/getting-started/app-foo-site.yaml
262270
kubectl -n foo-site apply -f test-data/getting-started/foo-site-httproute.yaml
263271
kubectl -n foo-store apply -f test-data/getting-started/app-foo-store-v1.yaml
264272
kubectl -n foo-store apply -f test-data/getting-started/app-foo-store-v2.yaml
265273
kubectl -n foo-store apply -f test-data/getting-started/foo-store-httproute.yaml
266274

275+
.PHONY: deploy-namespace-gatewayclassconfig
276+
deploy-namespace-gatewayclassconfig:
277+
cat hack/demo/namespace-gatewayclassconfig.yaml | CERTIFICATE_ARN=${CERTIFICATE_ARN} envsubst | kubectl apply -f -
278+
267279
.PHONY: wait-ready-getting-started-usecase
268280
wait-ready-getting-started-usecase:
269281
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

doc/getting-started.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ The cluster-operator/SRE also creates the common `Gateway` using the
129129
`GatewayClass` created previously:
130130

131131
```
132-
cat test-data/getting-started/foo-gateway.yaml | GATEWAY_CLASS_NAME=contour-istio-cert envsubst | kubectl apply -f -
132+
cat test-data/getting-started/foo-gateway.yaml | GATEWAY_CLASS_NAME=contour-istio-cert DOMAIN=foo.example.com envsubst | kubectl apply -f -
133133
```
134134

135135
### Developer of 'Site' Application

hack/demo/namespace-gatewayclassconfig.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ metadata:
55
namespace: foo-infra
66
spec:
77
override:
8-
certificateArn: arn:aws:acm:eu-central-1:123456789012:certificate/33ce4a38-aff0-4ad7-bc7c-275fe99556e1
8+
certificateArn: $CERTIFICATE_ARN
99
tags:
1010
tenant: foo-tenant
1111
targetRef:

test-data/getting-started/foo-gateway.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ spec:
99
- name: web
1010
port: 80
1111
protocol: HTTP
12-
hostname: "foo.example.com"
12+
hostname: $DOMAIN
1313
allowedRoutes:
1414
namespaces:
1515
from: Selector

0 commit comments

Comments
 (0)