Skip to content

document h2c_upstream k8s ingress annotation - #2361

Merged
wasaga merged 1 commit into
mainfrom
wasaga/docs-h2c-upstream
Sep 9, 2026
Merged

document h2c_upstream k8s ingress annotation#2361
wasaga merged 1 commit into
mainfrom
wasaga/docs-h2c-upstream

Conversation

@wasaga

@wasaga wasaga commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Summary

Documents the new ingress.pomerium.io/h2c_upstream Ingress annotation introduced in pomerium/ingress-controller#1516.

  • Adds an h2c_upstream row to the Ingress annotations reference table.
  • Adds an HTTP/2 Cleartext Upstreams section under Services, next to the existing Upstream mutual TLS section, linking to the h2c:// scheme docs in the route to reference.
  • Notes that h2c_upstream cannot be combined with secure_upstream (or the ssh/tcp/udp upstream annotations).

Related

Adds the new ingress.pomerium.io/h2c_upstream annotation to the Ingress
annotations reference and a short HTTP/2 Cleartext Upstreams section under
Services, noting it cannot be combined with secure_upstream.

Companion to pomerium/ingress-controller#1516.
@netlify

netlify Bot commented Sep 9, 2026

Copy link
Copy Markdown

Deploy Preview for pomerium-docs ready!

Name Link
🔨 Latest commit 58b7472
🔍 Latest deploy log https://app.netlify.com/projects/pomerium-docs/deploys/6aa15cd22bfb3a00083bce43
😎 Deploy Preview https://deploy-preview-2361--pomerium-docs.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.

@wasaga
wasaga marked this pull request as ready for review September 9, 2026 13:23
@wasaga
wasaga requested a review from a team as a code owner September 9, 2026 13:23
@wasaga
wasaga requested review from kenjenkins and removed request for a team September 9, 2026 13:23
@greptile-apps

greptile-apps Bot commented Sep 9, 2026

Copy link
Copy Markdown

Greptile Summary

This PR documents the new Kubernetes Ingress annotation for cleartext HTTP/2 upstream connections.

  • Adds ingress.pomerium.io/h2c_upstream to the annotation reference.
  • Adds configuration guidance for insecure HTTP/2 and gRPC services.
  • Documents mutually exclusive upstream-mode annotations, although the table provides an incomplete version of that constraint.

Confidence Score: 4/5

The documentation is safe to merge after a non-blocking consistency fix to list every incompatible upstream annotation in the reference row.

The new section and links are sound, but the annotation table incompletely summarizes the controller constraint and can mislead readers who use it as a standalone reference.

Files Needing Attention: content/docs/deploy/k8s/ingress.md

Important Files Changed

Filename Overview
content/docs/deploy/k8s/ingress.md Adds the h2c annotation reference and usage guidance; the reference row omits three conflicts documented later on the same page.

Fix all with Greploop Fix All in Claude Code Fix All in Codex

Reviews (1): Last reviewed commit: "document h2c_upstream k8s ingress annota..." | Re-trigger Greptile


| Annotation | Description |
| --- | --- |
| `ingress.pomerium.io/h2c_upstream` | When set to `"true"`, use cleartext HTTP/2 (`h2c`) when connecting to the upstream endpoint. See the [example below](#http2-cleartext-upstreams) for more information. Cannot be combined with `secure_upstream`. |

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Incomplete incompatibility list

The annotation reference says h2c_upstream cannot be combined only with secure_upstream, while the detailed section also lists ssh_upstream, tcp_upstream, and udp_upstream. Someone relying on the table can therefore configure a combination that the documented controller behavior rejects instead of creating the route.

This red test demonstrates the incomplete table entry:

import assert from 'node:assert/strict';
import fs from 'node:fs';
import test from 'node:test';

test('h2c annotation row lists every incompatible upstream mode', () => {
  const markdown = fs.readFileSync('content/docs/deploy/k8s/ingress.md', 'utf8');
  const row = markdown
    .split('\n')
    .find((line) => line.startsWith('| `ingress.pomerium.io/h2c_upstream`'));

  for (const annotation of [
    'secure_upstream',
    'ssh_upstream',
    'tcp_upstream',
    'udp_upstream',
  ]) {
    assert.match(row, new RegExp(`\\`${annotation}\\``));
  }
});

It fails on the current row at the ssh_upstream assertion, while the detailed section establishes that all four annotations are incompatible.

Suggested change
| `ingress.pomerium.io/h2c_upstream` | When set to `"true"`, use cleartext HTTP/2 (`h2c`) when connecting to the upstream endpoint. See the [example below](#http2-cleartext-upstreams) for more information. Cannot be combined with `secure_upstream`. |
| `ingress.pomerium.io/h2c_upstream` | When set to `"true"`, use cleartext HTTP/2 (`h2c`) when connecting to the upstream endpoint. See the [example below](#http2-cleartext-upstreams) for more information. Cannot be combined with `secure_upstream`, `ssh_upstream`, `tcp_upstream`, or `udp_upstream`. |

Fix in Claude Code Fix in Codex

wasaga added a commit to pomerium/ingress-controller that referenced this pull request Sep 9, 2026
## Summary

Pomerium core supports plaintext HTTP/2 upstreams via the `h2c://`
scheme in route `to` URLs, but Ingress resources had no way to request
it: the controller builds `to` URLs from Service/Endpoints and picks the
scheme itself.

- Add an `ingress.pomerium.io/h2c_upstream: "true"` annotation, modeled
on `secure_upstream`, that emits `h2c://` upstream URLs.
- Reject `h2c_upstream` when combined with `secure_upstream` (or
`ssh_upstream` / `tcp_upstream` / `udp_upstream`), since the schemes are
mutually exclusive per route and core would otherwise silently degrade
mixed lists to HTTP/1.1.
- Consolidate the scheme-annotation list into a single ordered table
shared by scheme selection and validation. Existing precedence among the
older annotations is unchanged.

## Example

```yaml
metadata:
  annotations:
    ingress.pomerium.io/h2c_upstream: "true"
```

Combining it with `secure_upstream` fails with:

```
annotations: ingress.pomerium.io/h2c_upstream and ingress.pomerium.io/secure_upstream are mutually exclusive
```

## Test plan

- [x] `make test` (envtest + `pomerium/ctrl`) passes
- [x] `golangci-lint run ./...` clean
- [x] New table cases in `TestEndpointsHTTPS` for `h2c://` endpoint URLs
- [x] New `TestH2CUpstreamConflicts` covering all four conflicting
annotation pairs

Documentation PR: pomerium/documentation#2361
@wasaga
wasaga merged commit 696380b into main Sep 9, 2026
10 checks passed
@wasaga
wasaga deleted the wasaga/docs-h2c-upstream branch September 9, 2026 15:06
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