Skip to content

[v3.23] fix(gatewayapi): mount the trust bundle on envoy-proxy at Envoy Gateway's system CA path - #5392

Merged
rene-dekker merged 4 commits into
tigera:release-v1.42from
electricjesus:seth/envoy-proxy-ca-mount-v1.42
Nov 9, 2026
Merged

rene-dekker merged 4 commits into
tigera:release-v1.42from
electricjesus:seth/envoy-proxy-ca-mount-v1.42

Conversation

@electricjesus

@electricjesus electricjesus commented Nov 9, 2026 •

Copy link
Copy Markdown
Member

Description

Cherry-pick of #4796 plus https://github.com/tigera/calico-private/pull/15309 (operator/ commits, still in review on master) for Calico Enterprise v3.23.

Bug fix. A BackendTLSPolicy with wellKnownCACertificates: System fails on Calico Ingress Gateway. Envoy logs Secret rejected: Invalid path: /etc/ssl/certs/ca-certificates.crt. Envoy Gateway hard-codes that path, and the envoy-proxy image has no CA bundle.

release-v1.42 never mounted the operator trust bundle on the gateway pods, so this brings in #4796 first. Then the three commits from calico-private 15309:

  • Mount the bundle's ca-bundle.crt (public roots) at /etc/ssl/certs/ca-certificates.crt on envoy-proxy.
  • Give each bundle mount its own volume. Envoy Gateway merges the envoy container's volumeMounts by volume name, so mounts that share tigera-ca-bundle collapse to the last one.
  • Put the bundle hash annotations on the envoy-proxy pod template, so a bundle change rolls the proxy pods. subPath mounts never refresh in place.

Backport notes:

Testing:

  • go test ./pkg/render/gatewayapi/ ./pkg/controller/gatewayapi/ passes on this branch. The render test checks that every bundle mount has its own volume, that all three paths are present, and that the proxy pod carries the hash annotations.
  • Live on a master-based cluster with an operator built from calico-private 15309: BackendTLSPolicy System to a public HTTPS backend returns 200, and a wrong policy hostname returns 503. The proxy pod has all three bundle paths. Rotating the Calico CA changed the proxy's hash annotation and rolled the proxy pods.
  • Live on v3.23: an ez cluster on hashrelease 2026-11-07-v3-23-comfort (v3.23.4 dev-48, Envoy Gateway 1.9.1, Gateway API v1.6.1), on Kubernetes v1.32.11. The test operator is this branch, with every component pinned to that hashrelease, so it differs from the hashrelease operator only by these commits. Same Gateway -> public HTTPS backend -> BackendTLSPolicy System:
    • stock hashrelease operator: 503, and Envoy logs Secret rejected: Invalid path: /etc/ssl/certs/ca-certificates.crt.
    • this branch: 200, and no Secret rejected lines. A wrong policy hostname gives 503.
    • The proxy has all three bundle paths on their own volumes, and its hash annotations match the envoy-gateway controller's. Rotating the Calico CA changed the proxy's hash in 33s and rolled it. All tigerastatus stayed Available.

Refs CI-2088

This PR was written in part with the assistance of generative AI.

Release Note

Fixed BackendTLSPolicy `wellKnownCACertificates: System` on Calico Ingress Gateway. The envoy-proxy pods now mount the trusted CA bundle at the path Envoy Gateway expects, and restart when the bundle changes.

For PR author

  • Tests for change.
  • If changing pkg/apis/, run make gen-files (N/A, no pkg/apis changes)
  • If changing versions, run make gen-versions (N/A, no version changes)

For PR reviewers

A note for code reviewers - all pull requests must have the following:

  • Milestone set according to targeted release.
  • Appropriate labels:
    • kind/bug if this is a bugfix.
    • kind/enhancement if this is a a new feature.
    • enterprise if this PR applies to Calico Enterprise only.

…bundle

feat(gatewayapi): mount operator trust bundle on envoy-gateway and envoy-proxy

[v1.42: release branch names the installation spec "installation", not "installationSpec".]

(cherry picked from commit e6ae3b3)
Envoy Gateway reads the system CA bundle for BackendTLSPolicy
wellKnownCACertificates: System from /etc/ssl/certs/ca-certificates.crt.
The envoy-proxy pods already mount the operator's trust bundle, but only
under /etc/pki/tls, so System validation failed with "Secret rejected:
Invalid path".

Also mount the bundle's system roots file at that path.

Refs CI-2088
…roxy

Envoy Gateway merges the envoy container's volumeMounts by volume name.
All the trust bundle mounts used the same volume, tigera-ca-bundle, so
only the last one reached the pod. The /etc/pki/tls/certs mount was
already being dropped, and the new /etc/ssl/certs mount dropped
/etc/pki/tls/cert.pem.

Give each mount its own volume over the same ConfigMap.

Refs CI-2088
The bundle hash annotations were only set on the envoy-gateway
controller. subPath mounts never refresh in place, so a bundle change
never reached running proxy pods. Set the annotations on the proxy pod
template too.

Refs CI-2088
@rene-dekker
rene-dekker merged commit f569828 into tigera:release-v1.42 Nov 9, 2026
5 checks passed
@danudey danudey added the kind/bug Something isn't working label Nov 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants