Skip to content

feat(operator): document Service annotations added in 2.2.0#5544

Open
sandromodarelli wants to merge 5 commits into
mainfrom
operator/annotations-reference-and-how-to
Open

feat(operator): document Service annotations added in 2.2.0#5544
sandromodarelli wants to merge 5 commits into
mainfrom
operator/annotations-reference-and-how-to

Conversation

@sandromodarelli

@sandromodarelli sandromodarelli commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Description

Documents the 11 konghq.com/* Service annotations added in Kong Operator 2.2.0 (changelog: Hybridgateway: add support for...). No equivalent existed in operator docs.

New pages:

  • app/operator/dataplanes/reference/service-annotations.md — reference listing all 11 annotations under Gateway Deployment > Advanced Usage
  • app/_how-tos/operator/operator-dataplane-service-timeouts-retries.md — set connect/read/write timeouts and retries on a Service
  • app/_how-tos/operator/operator-dataplane-service-host-header.md — override the Host header sent upstream
  • app/_how-tos/operator/operator-dataplane-service-upstream-policy.md — consistent-hashing load balancing via KongUpstreamPolicy
  • app/_includes/prereqs/operator/httpbin-service-route.md — shared prereq include (httpbin + HTTPRoute) reused by two how-tos

Preview Links

Checklist

  • Tested how-to docs. If not, note why here.
  • All pages contain metadata.
  • Any new docs link to existing docs.
  • All autogenerated instructions render correctly (API, decK, Konnect, Kong Manager).
  • Style guide (capitalized gateway entities, placeholder URLs) implemented correctly.
  • Every page has a description entry in frontmatter.
  • Add new pages to the product documentation index (if applicable).

Documents the 11 konghq.com/* Service annotations added in operator
2.2.0, under the Gateway Deployment > Advanced Usage section.
Three practical guides showing how to use the Service annotations added
in operator 2.2.0:
- Set timeouts and retries (connect/read/write-timeout, retries)
- Set the Host header sent upstream (host-header)
- Configure load balancing with KongUpstreamPolicy (upstream-policy)
@sandromodarelli sandromodarelli requested a review from a team as a code owner June 11, 2026 11:28
@netlify

netlify Bot commented Jun 11, 2026

Copy link
Copy Markdown

Deploy Preview for kongdeveloper ready!

Name Link
🔨 Latest commit b871d9c
🔍 Latest deploy log https://app.netlify.com/projects/kongdeveloper/deploys/6a2aba50e72b17000824d7e8
😎 Deploy Preview https://deploy-preview-5544--kongdeveloper.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@lmilan lmilan self-assigned this Jun 11, 2026
@lmilan lmilan self-requested a review June 11, 2026 13:53
}
}
```

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
{:.no-copy-code}

}
}
```

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
{:.no-copy-code}

Running on Pod echo-6d8f4c9b7-xk2vt.
Running on Pod echo-6d8f4c9b7-xk2vt.
```

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
{:.no-copy-code}

Comment on lines +62 to +67
| Annotation | Value | Effect |
|---|---|---|
| `konghq.com/connect-timeout` | `3000` | {{site.base_gateway}} waits up to 3 seconds to establish a TCP connection |
| `konghq.com/read-timeout` | `5000` | {{site.base_gateway}} waits up to 5 seconds for the upstream to send a response |
| `konghq.com/write-timeout` | `5000` | {{site.base_gateway}} waits up to 5 seconds when sending data upstream |
| `konghq.com/retries` | `3` | Failed requests are retried up to 3 times before returning an error |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
| Annotation | Value | Effect |
|---|---|---|
| `konghq.com/connect-timeout` | `3000` | {{site.base_gateway}} waits up to 3 seconds to establish a TCP connection |
| `konghq.com/read-timeout` | `5000` | {{site.base_gateway}} waits up to 5 seconds for the upstream to send a response |
| `konghq.com/write-timeout` | `5000` | {{site.base_gateway}} waits up to 5 seconds when sending data upstream |
| `konghq.com/retries` | `3` | Failed requests are retried up to 3 times before returning an error |
{% table %}
columns:
- title: "Annotation"
key: "annotation"
- title: "Value"
key: "value"
- title: "Effect"
key: "effect"
rows:
- annotation: "`konghq.com/connect-timeout`"
value: "`3000`"
effect: "{{site.base_gateway}} waits up to 3 seconds to establish a TCP connection"
- annotation: "`konghq.com/read-timeout`"
value: "`5000`"
effect: "{{site.base_gateway}} waits up to 5 seconds for the upstream to send a response"
- annotation: "`konghq.com/write-timeout`"
value: "`5000`"
effect: "{{site.base_gateway}} waits up to 5 seconds when sending data upstream"
- annotation: "`konghq.com/retries`"
value: "`3`"
effect: "Failed requests are retried up to 3 times before returning an error"
{% endtable %}

url: /operator/dataplanes/reference/service-annotations/
---

By default, {{site.base_gateway}} sets the `Host` header to the IP address of the individual Pod it is forwarding the request to. Some upstream services perform host-based virtual hosting or access control and require a specific `Host` header value. You can override this behavior using the `konghq.com/host-header` annotation.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
By default, {{site.base_gateway}} sets the `Host` header to the IP address of the individual Pod it is forwarding the request to. Some upstream services perform host-based virtual hosting or access control and require a specific `Host` header value. You can override this behavior using the `konghq.com/host-header` annotation.
By default, {{site.base_gateway}} sets the `Host` header to the IP address of the individual Pod it forwards the request to. Some upstream services perform host-based virtual hosting or access control and require a specific `Host` header value. You can override this behavior using the `konghq.com/host-header` annotation.

done
```

Requests for `user-bob` consistently hit a different Pod than requests for `user-alice`.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I tried it a few times but I still get the same Pod with both headers values.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants