Skip to content

Commit c419c51

Browse files
authored
Merge pull request #163 from tv2-oss/feature/move-blueprints-to-separa-folders
Move blueprints to separate folders. Add testing information for aws-crossplane blueprint
2 parents b999b48 + 17be41a commit c419c51

10 files changed

+136
-72
lines changed

Makefile.local

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ deploy-aws-load-balancer-controller-crds:
157157

158158
.PHONY: deploy-aws-load-balancer-controller
159159
deploy-aws-load-balancer-controller:
160-
cat test-data/aws-load-balancer-controller-values.yaml_tpl | envsubst > aws-load-balancer-controller-values.yaml
160+
cat test-data/aws-load-balancer-controller-values.yaml_tpl | AWS_LOAD_BALANCER_CONTROLLER_IAM_ROLE_ARN=${AWS_LOAD_BALANCER_CONTROLLER_IAM_ROLE_ARN} envsubst > aws-load-balancer-controller-values.yaml
161161
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
162162

163163
.PHONY: undeploy-aws-load-balancer-controller

blueprints/README.md

Lines changed: 2 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -1,73 +1,4 @@
11
# Example GatewayClassBlueprints
22

3-
This document describe the example `GatewayClassBlueprint` definitions
4-
that are provided as part of the *bifrost-gateway-controller*. Sample
5-
`GatewayClass` definitions are also provided that reference the
6-
blueprints.
7-
8-
## Contour and Istio
9-
10-
This blueprint builds a data-path that consists of the following
11-
Kubernetes resources:
12-
13-
- A 'child' `Gateway` using the *istio* `GatewayClass`. This creates
14-
an Istio ingress gateway.
15-
- An `Ingress` resource, which serves to 'simulate' a
16-
load-balancer. The `Ingress` resource use the ingress-class
17-
`contour` and forwards traffic to the Istio ingress gateway.
18-
- A `Certificate` resource (a [cert-manager](https://cert-manager.io/)
19-
CRD) to allow termination of HTTPS through the ingress.
20-
21-
This definition is provided in the following files:
22-
23-
[`gatewayclassblueprint-contour-istio-cert.yaml`](gatewayclassblueprint-contour-istio-cert.yaml)
24-
(with attached TLS certificate).
25-
[`gatewayclassblueprint-contour-istio.yaml`](gatewayclassblueprint-contour-istio.yaml)
26-
(without attached TLS certificate) and in
27-
[`gatewayclassblueprint-contour-istio-values.yaml`](../charts/bifrost-gateway-controller/ci/gatewayclassblueprint-contour-istio-values.yaml)
28-
(RBAC for *bifrost-gateway-controller* Helm deployment suited for the `contour-istio` blueprint).
29-
30-
## AWS ALB and Istio Using Crossplane
31-
32-
This blueprint builds a data-path that consists of the following AWS
33-
infrastructure:
34-
35-
- Application load balancer (ALB).
36-
- Security group for ALB, together with ingress and egress rules (for
37-
both data and healthchecks).
38-
- ALB target group and listener definitions.
39-
40-
This definition also includes the following Kubernetes infrastructure:
41-
42-
- A 'child' `Gateway` using the *istio* `GatewayClass`. This creates
43-
an Istio ingress gateway.
44-
- `TargetGroupBinding` (an [AWS load balancer controller
45-
CRD](https://github.com/kubernetes-sigs/aws-load-balancer-controller/)
46-
for propagating Kubernetes endpoints for the Istio ingress gateway
47-
to the AWS ALB target group. This links the Kubernetes internal and
48-
AWS infrastructure.
49-
50-
**Note** the ALB terminates TLS and forwards traffic un-encrypted to
51-
the Istio ingress gateway.
52-
53-
This definition is provided in the following files:
54-
55-
- [`gatewayclassblueprint-aws-alb-crossplane.yaml`](gatewayclassblueprint-aws-alb-crossplane.yaml) blueprint for infrastructure implementation
56-
- [`gatewayclass-aws-alb-crossplane.yaml`](gatewayclass-aws-alb-crossplane.yaml) definitions of `GatewayClass`es referencing the above `GatewayClassBlueprint`. Two `GatewayClass`es are created, one that is intended for internet exposed gateways, and one for non internet exposed gateways.
57-
- [`gatewayclassconfig-aws-alb-crossplane-dev-env.yaml`](../test-data/gatewayclassconfig-aws-alb-crossplane-dev-env.yaml) example settings for the two `GatewayClass`es defined in `gatewayclass-aws-alb-crossplane.yaml`, i.e. with different subnet settings for the internet-exposed and non internet-exposed `GatewayClass'es.
58-
- [`gatewayclassblueprint-crossplane-aws-alb-values.yaml`](../charts/bifrost-gateway-controller/ci/gatewayclassblueprint-crossplane-aws-alb-values.yaml)
59-
RBAC for bifrost-gateway-controller Helm deployment suited for the `aws-alb-crossplane` blueprint.
60-
61-
### Compatibility
62-
63-
This blueprint use AWS Crossplane resources through the [Upbound AWS
64-
Provider](https://marketplace.upbound.io/providers/upbound/provider-aws). The
65-
following compatibility between this blueprint, Crossplane, Crossplane
66-
Upbound AWS provider and Istio versions has been verified:
67-
68-
| Blueprint | AWS Provider | Crossplane | Istio | Status |
69-
| ------------- | ------------- |
70-
| `0.0.18` | `v0.28.0` | `v1.11.0` | `1.16.1` | :heavy_check_mark: |
71-
| `0.0.18` | `v0.32.1` | `v1.11.0` | `1.16.1` | :x: |
72-
| `0.0.18` | `v0.33.0` | `v1.11.0` | `1.16.1` | :heavy_check_mark: |
73-
| `0.0.19` | `v0.33.0` | `v1.11.0` | `1.16.1` | :heavy_check_mark: |
3+
- [Contour and Istio](contour-istio/README.md)
4+
- [AWS ALB and Istio Using Crossplane](aws-alb-crossplane/README.md)
Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
# AWS ALB and Istio Using Crossplane
2+
3+
This blueprint builds a data-path that consists of the following AWS
4+
infrastructure:
5+
6+
- Application load balancer (ALB).
7+
- Security group for ALB, together with ingress and egress rules (for
8+
both data and healthchecks).
9+
- ALB target group and listener definitions.
10+
11+
This definition also includes the following Kubernetes infrastructure:
12+
13+
- A 'child' `Gateway` using the *istio* `GatewayClass`. This creates
14+
an Istio ingress gateway.
15+
- `TargetGroupBinding` (an [AWS load balancer controller
16+
CRD](https://github.com/kubernetes-sigs/aws-load-balancer-controller/)
17+
for propagating Kubernetes endpoints for the Istio ingress gateway
18+
to the AWS ALB target group. This links the Kubernetes internal and
19+
AWS infrastructure.
20+
21+
**Note** the ALB terminates TLS and forwards traffic un-encrypted to
22+
the Istio ingress gateway.
23+
24+
This definition is provided in the following files:
25+
26+
- [`gatewayclassblueprint-aws-alb-crossplane.yaml`](gatewayclassblueprint-aws-alb-crossplane.yaml) blueprint for infrastructure implementation
27+
- [`gatewayclass-aws-alb-crossplane.yaml`](gatewayclass-aws-alb-crossplane.yaml) definitions of `GatewayClass`es referencing the above `GatewayClassBlueprint`. Two `GatewayClass`es are created, one that is intended for internet exposed gateways, and one for non internet exposed gateways.
28+
- [`gatewayclassconfig-aws-alb-crossplane-dev-env.yaml`](../../test-data/gatewayclassconfig-aws-alb-crossplane-dev-env.yaml) example settings for the two `GatewayClass`es defined in `gatewayclass-aws-alb-crossplane.yaml`, i.e. with different subnet settings for the internet-exposed and non internet-exposed `GatewayClass'es.
29+
- [`gatewayclassblueprint-crossplane-aws-alb-values.yaml`](../../charts/bifrost-gateway-controller/ci/gatewayclassblueprint-crossplane-aws-alb-values.yaml)
30+
RBAC for bifrost-gateway-controller Helm deployment suited for the `aws-alb-crossplane` blueprint.
31+
32+
## Compatibility
33+
34+
This blueprint use AWS Crossplane resources through the [Upbound AWS
35+
Provider](https://marketplace.upbound.io/providers/upbound/provider-aws). The
36+
following compatibility between this blueprint, Crossplane, Crossplane
37+
Upbound AWS provider and Istio versions has been verified:
38+
39+
| Blueprint | AWS Provider | Crossplane | Istio | Status |
40+
| --------- | ------------ | ---------- | ----- | ------ |
41+
| `0.0.18` | `v0.28.0` | `v1.11.0` | `1.16.1` | :heavy_check_mark: |
42+
| `0.0.18` | `v0.32.1` | `v1.11.0` | `1.16.1` | :x: |
43+
| `0.0.18` | `v0.33.0` | `v1.11.0` | `1.16.1` | :heavy_check_mark: |
44+
| `0.0.19` | `v0.33.0` | `v1.11.0` | `1.16.1` | :heavy_check_mark: |
45+
46+
## Testing AWS/Crossplane/Istio Blueprint
47+
48+
This section describes how to test the blueprint using different
49+
version of the dependencies.
50+
51+
### Prerequisite
52+
53+
- A Kubernetes cluster.
54+
- IAM roles for Crossplane to interact with AWS (see make target `deploy-crossplane-aws-provider`).
55+
- IAM role for AWS load balancer controller (see make target `deploy-aws-load-balancer-controller`)
56+
- A TLS certificate and associated domain name (see below).
57+
58+
### Deploying Dependencies
59+
60+
Deploy dependencies with the make targets shown below. Version information can be left out to use default versions:
61+
62+
```bash
63+
make deploy-gateway-api
64+
make deploy-aws-load-balancer-controller-crds
65+
AWS_LOAD_BALANCER_CONTROLLER_CHART_VERSION=v1.4.6 make deploy-aws-load-balancer-controller
66+
CROSSPLANE_VERSION=v1.11.0 make deploy-crossplane
67+
CROSSPLANE_AWS_PROVIDER_VERSION=v0.28.0 make deploy-crossplane-aws-provider
68+
ISTIO_VERSION=1.16.1 make deploy-istio
69+
```
70+
71+
Deploy controller and blueprint:
72+
73+
```
74+
BIFROST_VERSION=0.1.6 make deploy-controller-aws-helm
75+
BIFROST_BLUEPRINTS_VERSION=0.0.18 make deploy-aws-istio-blueprint
76+
```
77+
78+
Note, there is also a `deploy-aws-istio-blueprint-local` make target to deploy
79+
local repository blueprint version which is useful when developing
80+
blueprints.
81+
82+
A `GatewayClassConfig` is also needed - because it is very environment
83+
specific, this guide does not describe how to prepare it. Additionally,
84+
a namespace-default `GatewayClassConfig` may be needed:
85+
86+
```bash
87+
CERTIFICATE_ARN=some-arn-for-foo.example.com make deploy-namespace-gatewayclassconfig
88+
```
89+
90+
Deploy the getting-started use-case:
91+
92+
```bash
93+
GATEWAY_CLASS_NAME=aws-alb-crossplane-public DOMAIN=foo.example.com make deploy-getting-started-usecase
94+
```
95+
96+
Test the deployed data-path when resources are ready:
97+
98+
```bash
99+
hack/demo/curl.sh $DOMAIN # Where DOMAIN is as defined above
100+
```
101+
102+
## Undeploying
103+
104+
```
105+
make undeploy-getting-started-usecase
106+
make undeploy-aws-istio-blueprint
107+
make undeploy-controller
108+
make undeploy-aws-load-balancer-controller
109+
make undeploy-crossplane-aws-provider
110+
make undeploy-crossplane
111+
make undeploy-istio
112+
```

blueprints/gatewayclass-aws-alb-crossplane.yaml renamed to blueprints/aws-alb-crossplane/gatewayclass-aws-alb-crossplane.yaml

File renamed without changes.

blueprints/gatewayclassblueprint-aws-alb-crossplane.yaml renamed to blueprints/aws-alb-crossplane/gatewayclassblueprint-aws-alb-crossplane.yaml

File renamed without changes.

blueprints/contour-istio/README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Contour and Istio
2+
3+
This blueprint builds a data-path that consists of the following
4+
Kubernetes resources:
5+
6+
- A 'child' `Gateway` using the *istio* `GatewayClass`. This creates
7+
an Istio ingress gateway.
8+
- An `Ingress` resource, which serves to 'simulate' a
9+
load-balancer. The `Ingress` resource use the ingress-class
10+
`contour` and forwards traffic to the Istio ingress gateway.
11+
- A `Certificate` resource (a [cert-manager](https://cert-manager.io/)
12+
CRD) to allow termination of HTTPS through the ingress.
13+
14+
This definition is provided in the following files:
15+
16+
[`gatewayclassblueprint-contour-istio-cert.yaml`](gatewayclassblueprint-contour-istio-cert.yaml)
17+
(with attached TLS certificate).
18+
[`gatewayclassblueprint-contour-istio.yaml`](gatewayclassblueprint-contour-istio.yaml)
19+
(without attached TLS certificate) and in
20+
[`gatewayclassblueprint-contour-istio-values.yaml`](../../charts/bifrost-gateway-controller/ci/gatewayclassblueprint-contour-istio-values.yaml)
21+
(RBAC for *bifrost-gateway-controller* Helm deployment suited for the `contour-istio` blueprint).

blueprints/gatewayclass-contour-istio-cert.yaml renamed to blueprints/contour-istio/gatewayclass-contour-istio-cert.yaml

File renamed without changes.
File renamed without changes.

blueprints/gatewayclassblueprint-contour-istio-cert.yaml renamed to blueprints/contour-istio/gatewayclassblueprint-contour-istio-cert.yaml

File renamed without changes.

blueprints/gatewayclassblueprint-contour-istio.yaml renamed to blueprints/contour-istio/gatewayclassblueprint-contour-istio.yaml

File renamed without changes.

0 commit comments

Comments
 (0)