Skip to content

Support enterprise whisker-backend with Linseed upstream#4861

Open
hjiawei wants to merge 1 commit into
tigera:masterfrom
hjiawei:hjiawei/whisker-commercial-flow-logs
Open

Support enterprise whisker-backend with Linseed upstream#4861
hjiawei wants to merge 1 commit into
tigera:masterfrom
hjiawei:hjiawei/whisker-commercial-flow-logs

Conversation

@hjiawei

@hjiawei hjiawei commented May 26, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Enable whisker-backend for Calico Enterprise by configuring it to use Linseed as the flow data source instead of Goldmane
  • Add RBAC (ClusterRole/ClusterRoleBinding) for Linseed flows, TokenReview, and SubjectAccessReview so whisker-backend can authenticate users and filter flows by RBAC
  • Wire up network policies: Linseed egress, kube-apiserver egress, Manager ingress for whisker; Linseed ingress from whisker; Manager egress to whisker
  • Add mTLS client certs and cluster ID support for Linseed communication

Notes

  • Whisker frontend enterprise deployment (enterprise image, WHISKER_FEATURES env var) is intentionally excluded — it will be handled separately once the UI team integrates Whisker as a ui-module in Manager
  • This PR only covers the whisker-backend container changes needed for enterprise Linseed integration

@marvin-tigera marvin-tigera added this to the v1.43.0 milestone May 26, 2026
@hjiawei hjiawei force-pushed the hjiawei/whisker-commercial-flow-logs branch 2 times, most recently from e7aac2c to ed02bd2 Compare May 26, 2026 02:39
@hjiawei hjiawei marked this pull request as ready for review May 26, 2026 21:22
@hjiawei hjiawei requested a review from a team as a code owner May 26, 2026 21:22
@hjiawei hjiawei requested a review from Copilot May 26, 2026 21:23

Copilot AI left a comment

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.

Pull request overview

Adds enterprise support to the whisker-backend by wiring it to Linseed (instead of Goldmane) for flow data, including RBAC, mTLS, and network policy plumbing for enterprise variants. Non-enterprise (Calico) paths still render Goldmane env/policy as before.

Changes:

  • Render enterprise Whisker ClusterRole/ClusterRoleBinding and Linseed-specific env vars (LINSEED_URL, LINSEED_CA_PATH, LINSEED_TOKEN_PATH, LINSEED_CLUSTER_ID, LINSEED_CLIENT_CERT/KEY_PATH); split network policy into enterprise (Manager ingress + Linseed/kube-apiserver egress) vs Calico (Goldmane egress).
  • Controller: skip Goldmane CR requirement for enterprise, watch TigeraLinseedSecret, switch trusted bundle source to Linseed for enterprise, and add a missing return after SetDegraded in trusted bundle creation.
  • Wire Manager → Whisker egress and Linseed ← Whisker ingress via new WhiskerEntityRule/WhiskerSourceEntityRule helpers; update expected policy JSON fixtures and Manager test egress count.

Reviewed changes

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

Show a summary per file
File Description
pkg/render/whisker/component.go Adds enterprise constants, RBAC objects, Linseed env vars, ingress/egress rules in network policy
pkg/render/whisker/component_test.go Adds enterprise object count, deployment, RBAC, and network policy test cases
pkg/render/manager.go Adds Manager egress rule to Whisker
pkg/render/manager_test.go Updates expected egress rule count from 11 to 12
pkg/render/logstorage/linseed/linseed.go Adds Whisker as ingress source to Linseed
pkg/render/common/networkpolicy/networkpolicy.go Adds WhiskerEntityRule and WhiskerSourceEntityRule helpers
pkg/controller/whisker/controller.go Skips Goldmane CR requirement for enterprise, watches Linseed secret, switches trusted bundle source, adds missing return on error
pkg/render/testutils/expected_policies/manager.json Adds Manager→Whisker egress entry
pkg/render/testutils/expected_policies/manager_ocp.json Adds Manager→Whisker egress entry
pkg/render/testutils/expected_policies/linseed.json Adds Whisker ingress entry
pkg/render/testutils/expected_policies/linseed_ocp.json Adds Whisker ingress entry
pkg/render/testutils/expected_policies/linseed_dpi_enabled.json Adds Whisker ingress entry
pkg/render/testutils/expected_policies/linseed_ocp_dpi_enabled.json Adds Whisker ingress entry

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

@hjiawei hjiawei force-pushed the hjiawei/whisker-commercial-flow-logs branch 3 times, most recently from bc1cc07 to cfbff08 Compare June 1, 2026 22:17
Enable whisker-backend for Calico Enterprise by configuring it to use
Linseed as the flow data source instead of Goldmane. The Whisker UI (SPA)
is managed separately; for enterprise only the whisker-backend container
is rendered. This includes:

- Controller: watch Linseed secret, skip Goldmane prereq for enterprise,
  use Linseed trusted bundle
- RBAC: ClusterRole/ClusterRoleBinding for linseed.tigera.io/flows,
  authentication.k8s.io/tokenreviews, authorization.k8s.io/subjectaccessreviews
- whisker-backend container: Linseed env vars and mTLS client certs
- Deployment: render only the whisker-backend for enterprise (no Whisker UI
  container, nginx ConfigMap, or Service)
- Network policies: whisker egress to Linseed and kube-apiserver; Linseed
  ingress from whisker

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@hjiawei hjiawei force-pushed the hjiawei/whisker-commercial-flow-logs branch from cfbff08 to 8bc0e61 Compare June 3, 2026 05:56
@radTuti radTuti modified the milestones: v1.43.0, v1.44.0 Jun 12, 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