Skip to content

Commit 5e2d718

Browse files
authored
Add docs for infrastructure field (#3455)
* Add docs for infrastructure field * correct link markdown * pretty formatting
1 parent 33d5ab2 commit 5e2d718

File tree

2 files changed

+46
-0
lines changed

2 files changed

+46
-0
lines changed

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ nav:
104104
- gRPC Routing: guides/grpc-routing.md
105105
- Migrating from Ingress: guides/migrating-from-ingress.md
106106
- Backend Protocol Selection: guides/backend-protocol.md
107+
- Infrastructure attributes: guides/infrastructure.md
107108
- API Design: guides/api-design.md
108109
- CRD Management: guides/crd-management.md
109110
- Implementer's Guide: guides/implementers.md

site-src/guides/infrastructure.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Gateway infrastructure labels and annotations
2+
3+
??? success "Standard Channel since v1.2.0"
4+
5+
The `infrastructure` field is GA and has been part of the Standard Channel since
6+
`v1.2.0`. For more information on release channels, refer to our [versioning
7+
guide](/concepts/versioning).
8+
9+
Gateway API implementations are responsible for creating the backing
10+
infrastructure needed to make each Gateway work. For example, implementations
11+
running in a Kubernetes cluster often create [Services][service] and
12+
[Deployments][deployment], while cloud-based implementations may create cloud
13+
load balancer resources. In many cases, it can be helpful to be able to
14+
propagate labels or annotations to these generated resources.
15+
16+
17+
The [`infrastructure` field][infrastructure] on a Gateway allows you to specify
18+
labels and annotations for the infrastructure created by the Gateway API controller.
19+
For example, if your Gateway infrastructure is running in-cluster, you can specify
20+
both Linkerd and Istio injection using the following Gateway configuration, making
21+
it simpler for the infrastructure to be incorporated into whichever service mesh
22+
you've installed.
23+
24+
```yaml
25+
apiVersion: gateway.networking.k8s.io/v1
26+
kind: Gateway
27+
metadata:
28+
name: meshed-gateway
29+
namespace: incoming
30+
spec:
31+
gatewayClassName: meshed-gateway-class
32+
listeners:
33+
- name: http-listener
34+
protocol: HTTP
35+
port: 80
36+
infrastructure:
37+
labels:
38+
istio-injection: enabled
39+
annotations:
40+
linkerd.io/inject: enabled
41+
```
42+
43+
[infrastructure]: /reference/spec/#gateway.networking.k8s.io/v1.GatewayInfrastructure
44+
[service]: https://kubernetes.io/docs/concepts/services-networking/service/
45+
[deployment]: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/

0 commit comments

Comments
 (0)