Skip to content

Commit 993b464

Browse files
kate-osbornlucacome
authored andcommitted
Add guide for UpstreamSettingsPolicy (#2987)
Problem: As a user, I want an example of how to configure upstream settings for my application. Solution: Add a how-to guide describing how to configure upstream zone size and keepalives for services. Also adds UpstreamSettingsPolicy to the table in the custom policies document and moves the custom policies document closer to the top of the overview page to increase visibility.
1 parent 4661f33 commit 993b464

File tree

11 files changed

+422
-17
lines changed

11 files changed

+422
-17
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
apiVersion: gateway.nginx.org/v1alpha1
2+
kind: UpstreamSettingsPolicy
3+
metadata:
4+
name: 1m-zone-size
5+
spec:
6+
targetRefs:
7+
- group: core
8+
kind: Service
9+
name: tea
10+
- group: core
11+
kind: Service
12+
name: coffee
13+
zoneSize: 1m
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
# UpstreamSettingsPolicy
22

3-
This directory contains example YAMLs for testing the UpstreamSettingsPolicy CRD. Eventually, this will be converted
4-
into a how-to-guide.
3+
This directory contains the YAML files used in the [UpstreamSettingsPolicy](https://docs.nginx.com/nginx-gateway-fabric/how-to/traffic-management/upstream-settings/) guide.

examples/upstream-settings-policy/cafe-routes.yaml renamed to examples/upstream-settings-policy/httproutes.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ spec:
1111
rules:
1212
- matches:
1313
- path:
14-
type: PathPrefix
14+
type: Exact
1515
value: /coffee
1616
backendRefs:
1717
- name: coffee
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,11 @@
11
apiVersion: gateway.nginx.org/v1alpha1
22
kind: UpstreamSettingsPolicy
33
metadata:
4-
name: upstream-settings-policy
4+
name: upstream-keepalives
55
spec:
6-
zoneSize: 512k
76
targetRefs:
87
- group: core
98
kind: Service
109
name: coffee
1110
keepAlive:
1211
connections: 32
13-
requests: 1001
14-
time: 300s
15-
timeout: 60s

site/content/how-to/monitoring/tracing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ To enable tracing, you must configure two resources:
6464

6565
The `NginxProxy` resource contains configuration for the collector, and applies to all Gateways and routes under the GatewayClass. It does not enable tracing, but is a prerequisite to the next piece of configuration.
6666

67-
- `ObservabilityPolicy`: This resource is a [Direct PolicyAttachment](https://gateway-api.sigs.k8s.io/reference/policy-attachment/) that targets HTTPRoutes or GRPCRoutes. It is created by the [application developer](https://gateway-api.sigs.k8s.io/concepts/roles-and-personas/) and enables tracing for a specific route or routes. It requires the `NginxProxy` resource to exist in order to complete the tracing configuration.
67+
- `ObservabilityPolicy`: This resource is a [Direct Policy Attachment](https://gateway-api.sigs.k8s.io/reference/policy-attachment/) that targets HTTPRoutes or GRPCRoutes. It is created by the [application developer](https://gateway-api.sigs.k8s.io/concepts/roles-and-personas/) and enables tracing for a specific route or routes. It requires the `NginxProxy` resource to exist in order to complete the tracing configuration.
6868

6969
For all the possible configuration options for these resources, see the [API reference]({{< relref "reference/api.md" >}}).
7070

site/content/how-to/traffic-management/client-settings.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ The settings in `ClientSettingsPolicy` correspond to the following NGINX directi
1919
- [`keepalive_time`](<https://nginx.org/en/docs/http/ngx_http_core_module.html#keepalive_time>)
2020
- [`keepalive_timeout`](<https://nginx.org/en/docs/http/ngx_http_core_module.html#keepalive_timeout>)
2121

22-
`ClientSettingsPolicy` is an [Inherited PolicyAttachment](https://gateway-api.sigs.k8s.io/reference/policy-attachment/) that can be applied to a Gateway, HTTPRoute, or GRPCRoute in the same namespace as the `ClientSettingsPolicy`.
22+
`ClientSettingsPolicy` is an [Inherited Policy Attachment](https://gateway-api.sigs.k8s.io/reference/policy-attachment/) that can be applied to a Gateway, HTTPRoute, or GRPCRoute in the same namespace as the `ClientSettingsPolicy`.
2323

2424
When applied to a Gateway, the settings specified in the `ClientSettingsPolicy` affect all HTTPRoutes and GRPCRoutes attached to the Gateway. This allows Cluster Operators to set defaults for all applications using the Gateway.
2525

0 commit comments

Comments
 (0)