Skip to content

PMREQ-821: Whisker access via Calico Ingress Gateway - #5146

Draft
vara2504 wants to merge 6 commits into
tigera:masterfrom
vara2504:vara-PMREQ-821-cig-whisker
Draft

PMREQ-821: Whisker access via Calico Ingress Gateway#5146
vara2504 wants to merge 6 commits into
tigera:masterfrom
vara2504:vara-PMREQ-821-cig-whisker

Conversation

@vara2504

@vara2504 vara2504 commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Description

New feature: expose the Whisker UI (Calico OSS) through Calico Ingress Gateway, following the same flow #5032 added for Manager.

  • Adds spec.ingressGateway to the Whisker CR. When set, the Whisker controller renders a Gateway, HTTPRoute, Backend, and ReferenceGrant, mints a gateway TLS secret, and reports Degraded until the Gateway is programmed.
  • Extracts the controller-side gateway logic shared with Manager into pkg/controller/uigateway (label-driven cleanup, health read-back, namespace provisioning, class resolution, watch setup). No Manager behavior change.
  • The HTTPRoute sets a 0s request timeout so SSE flow-log streams stay open; the whisker NetworkPolicy admits only this Gateway's Envoy proxy pods on 8443; the gateway re-originates TLS to Whisker's HTTPS port validated against the trusted CA bundle.
  • Renders the gateway proxy NetworkPolicy on both variants (calico-system has a default-deny on Calico too) and creates the operator-secrets RoleBinding in gateway namespaces on both variants.

Testing: UTs and FVs pass; verified end-to-end on two Calico clusters (AWS + GKE-based): render, LB HTTPS 200, port-forward HTTPS 200, Degraded-to-Available status flow, and cleanup on spec removal.

Depends on the Gateway API RBAC being added to the OSS operator ClusterRole (projectcalico/calico PR to follow) and the updated Whisker CRD in OSS manifests.

Release Note

The Whisker UI can be exposed through Calico Ingress Gateway by setting spec.ingressGateway on the Whisker resource.

vara2504 and others added 4 commits August 6, 2026 16:36
Move the gateway helper logic out of the manager controller into a
shared package so the Whisker controller can reuse it: label-driven
namespace listing and cleanup, gateway/route health read-back,
namespace provisioning, class resolution, and watch setup.

The manager controller now delegates to uigateway.Config; manager-only
logic (multi-tenant guard, managerDomain host check) stays in place.
No behavior change.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…on both variants

The GatewayAPI controller previously created the tigera-operator-secrets
RoleBinding in custom gateway namespaces only on Enterprise. The operator
needs secret CRUD there on Calico too, to place the Whisker gateway TLS
secret. WAF resources stay Enterprise-only.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Add spec.ingressGateway to the Whisker CR. When set, the Whisker
controller renders a Gateway, HTTPRoute, Backend, and ReferenceGrant
(mirroring the Manager flow via the shared uigateway helper), mints a
gateway TLS secret, and follows Pattern B degraded status until the
Gateway is programmed.

The HTTPRoute sets a 0s request timeout so SSE flow-log streams are not
cut off, and the whisker NetworkPolicy gains an ingress rule admitting
only the Envoy proxy pods of this Gateway on 8443. The gateway
re-originates TLS to Whisker's HTTPS port, validated against the
trusted CA bundle.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
calico-system carries an operator-managed default-deny on Calico too.
With the proxy NetworkPolicy gated to Enterprise, the OSS Envoy proxy
pod could not reach its xDS control plane (port 18000), never became
ready, and the Gateway was never programmed. Render the policy on both
variants; the proxy SA and RoleBinding stay Enterprise-only.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@vara2504
vara2504 requested review from a team and marvin-tigera as code owners August 6, 2026 23:49
@marvin-tigera marvin-tigera added this to the v1.44.0 milestone Aug 6, 2026
@vara2504
vara2504 marked this pull request as draft August 6, 2026 23:52
vara2504 and others added 2 commits August 7, 2026 17:15
Add controller tests for the Whisker gateway reconcile flow and direct
unit tests for the shared uigateway cleanup helpers (Namespaces,
MoveCleanup, Teardown); move the EnsureNamespace specs into the
uigateway package.

Cleanups: make EnsureNamespace a package function instead of building
a throwaway Config, regroup the whisker key-pair constants, and fix
stale 'sets a warning' wording in the shared IngressGatewaySpec docs
(CRDs regenerated).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Give the gateway-watch errors a descriptive message and ':' separator
to match the surrounding style, and update the
reconcileGatewayNamespaceResources comment now that the operator-secrets
RoleBinding is written on both variants.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.

2 participants