Support enterprise whisker-backend with Linseed upstream#4861
Open
hjiawei wants to merge 1 commit into
Open
Conversation
e7aac2c to
ed02bd2
Compare
Contributor
There was a problem hiding this comment.
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/ClusterRoleBindingand 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 missingreturnafterSetDegradedin trusted bundle creation. - Wire Manager → Whisker egress and Linseed ← Whisker ingress via new
WhiskerEntityRule/WhiskerSourceEntityRulehelpers; 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.
bc1cc07 to
cfbff08
Compare
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>
cfbff08 to
8bc0e61
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Notes
WHISKER_FEATURESenv var) is intentionally excluded — it will be handled separately once the UI team integrates Whisker as a ui-module in Manager