Skip to content

Conversation

@salonichf5
Copy link
Contributor

Proposed changes

  • Includes a user guide for session persistence
  • updated upstream settings policy document
  • updates gateway compatibility document
  • updates nginx plus features list
  • updates API reference document

Checklist

Before sharing this pull request, I completed the following checklist:

Footnotes

  1. Potentially sensitive information includes personally identify information (PII), authentication credentials, and live URLs. Refer to the style guide for guidance about placeholder content.

@salonichf5 salonichf5 requested a review from a team as a code owner December 10, 2025 16:41
@github-actions github-actions bot added documentation Improvements or additions to documentation product/ngf Issues related to NGINX Gateway Fabric labels Dec 10, 2025
@salonichf5 salonichf5 requested a review from a team December 10, 2025 16:41
Comment on lines 322 to 334
</tr>
<tr>
<td>
<code>targetRefs</code><br/>
<em>
<a href="https://pkg.go.dev/sigs.k8s.io/gateway-api/apis/v1alpha2#LocalPolicyTargetReference">
[]sigs.k8s.io/gateway-api/apis/v1alpha2.LocalPolicyTargetReference
</a>
</em>
</td>
<td>
<p>TargetRefs identifies the API object(s) to apply the policy to.
Objects must be in the same namespace as the policy.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this document was bit outdated but copy-pasted it from generated docs on my feature branch

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have a task in our release process to update this before each release.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okay good. should remove this change then.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seeing some weird diff for this file, I will squash these commits and remove this file when its all ready to merge

@salonichf5 salonichf5 requested a review from Copilot December 10, 2025 18:42
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds comprehensive documentation for session persistence in NGINX Gateway Fabric, including a new user guide and updates to existing documentation. It explains both NGINX OSS session affinity using ip_hash and NGINX Plus cookie-based session persistence, while also documenting load balancing method configuration through the UpstreamSettingsPolicy resource.

  • Adds a new session persistence user guide with practical examples for NGINX OSS and NGINX Plus
  • Updates UpstreamSettingsPolicy documentation to include load balancing method configuration
  • Updates API reference to reflect new fields and removed obsolete sections
  • Updates Gateway API compatibility and NGINX Plus features documentation

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
content/ngf/traffic-management/upstream-settings.md Added documentation for configuring load balancing methods via UpstreamSettingsPolicy with examples for random two least_time=header and hash consistent methods
content/ngf/traffic-management/session-persistence.md New comprehensive guide covering session persistence configuration for both NGINX OSS (ip_hash) and NGINX Plus (cookie-based), with working examples
content/ngf/reference/api.md Updated API reference to include new load balancing fields, removed ObservabilityPolicy section, and updated Gateway API version references from v1alpha2 to v1
content/ngf/overview/nginx-plus.md Added session persistence and advanced load balancing methods to the list of NGINX Plus features
content/ngf/overview/gateway-api-compatibility.md Updated to reflect that sessionPersistence is now supported for HTTPRoute and GRPCRoute

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 308 to 315
```bash
for i in $(seq 5); do
echo "Request #$i"
curl -s -H "Host: cafe.example.com" \
http://localhost:8080/coffee \
| grep -E 'Server (address|name)'
echo
done
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't remember how we treat scripting like this in the past, because it probably doesn't work on windows. We did it at one point in our docs, not sure if we just left it or changed it.

@ADubhlaoich any ideas?

Copy link
Contributor Author

@salonichf5 salonichf5 Dec 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is not a script to run, this can be run directly on commandLine so bash should be okay. I see how it can be confusing, this should be shell, like other documents


## Before you begin

- [Install]({{< ref "/ngf/install/" >}}) NGINX Gateway Fabric with experimental features enabled.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem we're going to have with this guide is that part of it requires NGINX Plus, while part of it only requires NGINX OSS.

We probably need two different options depending on what users are able to do.

Copy link
Contributor Author

@salonichf5 salonichf5 Dec 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, mixing OSS and NGINX Plus in a single flow can be confusing. That's why I define the different sections on how to configure it for plus and oss. Splitting into two documents didn't make sense to me so that was the only option to convey the message while also showcasing difference in behavior.

I have mentioned that Plus is needed in call out section as well

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This may be affected by @ADubhlaoich's changes to installation guides being split out? May need multiple references, but I'll let him chime in.

@salonichf5 salonichf5 force-pushed the docs/session-persistence branch from 5d35c64 to 946cf7f Compare December 10, 2025 21:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation product/ngf Issues related to NGINX Gateway Fabric

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants