Skip to content

Add allowedSourcePrefixes annotation documentation#2613

Draft
tomastigera wants to merge 1 commit intotigera:mainfrom
tomastigera:worktree-allowed-source-prefixes
Draft

Add allowedSourcePrefixes annotation documentation#2613
tomastigera wants to merge 1 commit intotigera:mainfrom
tomastigera:worktree-allowed-source-prefixes

Conversation

@tomastigera
Copy link
Copy Markdown
Contributor

Summary

  • Add new allowed-source-prefixes.mdx page under networking/configuring/ for all three products (Calico, Calico Enterprise, Calico Cloud)
  • Documents the cni.projectcalico.org/allowedSourcePrefixes pod annotation, which allows pods to send egress traffic with source IPs outside their own address
  • Includes prerequisite workloadSourceSpoofing: Any FelixConfiguration setting and security caution about admission control
  • Add sidebar entries in all three products

Test plan

  • Verify page renders correctly for each product
  • Verify sidebar links work
  • Review content accuracy with engineering

🤖 Generated with Claude Code

Document the cni.projectcalico.org/allowedSourcePrefixes pod annotation
across all three products (Calico, Calico Enterprise, Calico Cloud).
This annotation allows pods to send egress traffic with source IPs
outside their own address, requiring workloadSourceSpoofing: Any in
FelixConfiguration.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings March 27, 2026 19:00
@netlify
Copy link
Copy Markdown

netlify bot commented Mar 27, 2026

Deploy Preview for tigera failed. Why did it fail? →

Built without sensitive environment variables

Name Link
🔨 Latest commit 1ea2b91
🔍 Latest deploy log https://app.netlify.com/projects/tigera/deploys/69c6d3e368692600083f23f1

@netlify
Copy link
Copy Markdown

netlify bot commented Mar 27, 2026

Deploy Preview for calico-docs-preview-next ready!

Name Link
🔨 Latest commit 1ea2b91
🔍 Latest deploy log https://app.netlify.com/projects/calico-docs-preview-next/deploys/69c6d3e32f3179000851022c
😎 Deploy Preview https://deploy-preview-2613--calico-docs-preview-next.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds new documentation pages across Calico OSS, Calico Enterprise, and Calico Cloud describing the cni.projectcalico.org/allowedSourcePrefixes pod annotation and links them into each product’s “Configure networking” sidebar.

Changes:

  • Added allowed-source-prefixes.mdx under networking/configuring/ for Calico, Enterprise, and Cloud.
  • Documented the required FelixConfiguration setting (workloadSourceSpoofing: Any) and included a security caution about admission control.
  • Added sidebar entries in all three products so the new page is discoverable.

Reviewed changes

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

Show a summary per file
File Description
sidebars-calico.js Adds the new “allowed-source-prefixes” page to the Calico OSS networking/configuring sidebar.
sidebars-calico-enterprise.js Adds the new page to the Calico Enterprise networking/configuring sidebar.
sidebars-calico-cloud.js Adds the new page to the Calico Cloud networking/configuring sidebar.
calico/networking/configuring/allowed-source-prefixes.mdx New OSS doc page for the allowedSourcePrefixes annotation and Felix prerequisite.
calico-enterprise/networking/configuring/allowed-source-prefixes.mdx New Enterprise doc page for the allowedSourcePrefixes annotation and Felix prerequisite.
calico-cloud/networking/configuring/allowed-source-prefixes.mdx New Cloud doc page for the allowedSourcePrefixes annotation and Felix prerequisite.

Comment on lines +27 to +28
Enable `workloadSourceSpoofing` in the FelixConfiguration resource:

Copy link

Copilot AI Mar 27, 2026

Choose a reason for hiding this comment

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

This page documents a Calico CNI pod annotation, but the prerequisites don’t mention that the cluster must be using Calico CNI (as is done in other annotation docs in this section). Add that prerequisite (and optionally link to the CNI plugin configuration page) before the FelixConfiguration step.

Suggested change
Enable `workloadSourceSpoofing` in the FelixConfiguration resource:
Ensure the following prerequisites are met:
- Your cluster is configured to use the Calico CNI plugin.
- `workloadSourceSpoofing` is enabled in the FelixConfiguration resource:

Copilot uses AI. Check for mistakes.
Enable `workloadSourceSpoofing` in the FelixConfiguration resource:

```yaml
apiVersion: crd.projectcalico.org/v1
Copy link

Copilot AI Mar 27, 2026

Choose a reason for hiding this comment

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

The FelixConfiguration YAML example uses apiVersion: crd.projectcalico.org/v1, but other docs in this product use projectcalico.org/v3 for FelixConfiguration. Please align the apiVersion here (or explicitly call out when each apiVersion applies) to avoid users applying the wrong manifest.

Suggested change
apiVersion: crd.projectcalico.org/v1
apiVersion: projectcalico.org/v3

Copilot uses AI. Check for mistakes.
Because allowing non-pod source IPs is a security-sensitive operation, Felix disables support for the annotation by default. You must explicitly opt in by setting `workloadSourceSpoofing: Any` in the FelixConfiguration resource before the annotation takes effect.

## Before you begin...

Copy link

Copilot AI Mar 27, 2026

Choose a reason for hiding this comment

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

This page documents a Calico CNI pod annotation, but the prerequisites don’t mention that the cluster must be using Calico CNI (as is done in other annotation docs in this section). Add that prerequisite (and optionally link to the CNI plugin configuration page) before the FelixConfiguration step.

Suggested change
Ensure your Kubernetes cluster is using the Calico CNI plugin.

Copilot uses AI. Check for mistakes.
Enable `workloadSourceSpoofing` in the FelixConfiguration resource:

```yaml
apiVersion: crd.projectcalico.org/v1
Copy link

Copilot AI Mar 27, 2026

Choose a reason for hiding this comment

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

The FelixConfiguration YAML example uses apiVersion: crd.projectcalico.org/v1, but other docs in this product use projectcalico.org/v3 for FelixConfiguration. Please align the apiVersion here (or explicitly call out when each apiVersion applies) to avoid users applying the wrong manifest.

Suggested change
apiVersion: crd.projectcalico.org/v1
apiVersion: projectcalico.org/v3

Copilot uses AI. Check for mistakes.
Because allowing non-pod source IPs is a security-sensitive operation, Felix disables support for the annotation by default. You must explicitly opt in by setting `workloadSourceSpoofing: Any` in the FelixConfiguration resource before the annotation takes effect.

## Before you begin...

Copy link

Copilot AI Mar 27, 2026

Choose a reason for hiding this comment

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

This page documents a Calico CNI pod annotation, but the prerequisites don’t mention that the cluster must be using Calico CNI (as is done in other annotation docs in this section). Add that prerequisite (and optionally link to the CNI plugin configuration page) before the FelixConfiguration step.

Suggested change
Ensure your cluster is configured to use the Calico CNI plugin.

Copilot uses AI. Check for mistakes.
Enable `workloadSourceSpoofing` in the FelixConfiguration resource:

```yaml
apiVersion: crd.projectcalico.org/v1
Copy link

Copilot AI Mar 27, 2026

Choose a reason for hiding this comment

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

The FelixConfiguration YAML example uses apiVersion: crd.projectcalico.org/v1, but other docs in this product use projectcalico.org/v3 for FelixConfiguration. Please align the apiVersion here (or explicitly call out when each apiVersion applies) to avoid users applying the wrong manifest.

Suggested change
apiVersion: crd.projectcalico.org/v1
apiVersion: projectcalico.org/v3

Copilot uses AI. Check for mistakes.
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