Skip to content

Update instructions on external network#2511

Merged
ctauchen merged 2 commits intotigera:mainfrom
song-jiang:song-external-network
Feb 4, 2026
Merged

Update instructions on external network#2511
ctauchen merged 2 commits intotigera:mainfrom
song-jiang:song-external-network

Conversation

@song-jiang
Copy link
Contributor

@song-jiang song-jiang commented Feb 4, 2026

Product Version(s):

Calico Enterprise 3.21, 3.22, 3.23

Issue:

Add "Configure egress interface" section for Calico Enterprise versions 3.21-2 and later, explaining how to use the egressIPHostIfacePattern FelixConfiguration field to set src_valid_mark on host interfaces for proper egress gateway functionality with external networks.

Link to docs preview:

SME review:

  • An SME has approved this change.

DOCS review:

  • A member of the docs team has approved this change.

Additional information:

Merge checklist:

  • Deploy preview inspected wherever changes were made
  • Build completed successfully
  • Test have passed

@song-jiang song-jiang requested a review from a team as a code owner February 4, 2026 14:31
Copilot AI review requested due to automatic review settings February 4, 2026 14:31
@netlify
Copy link

netlify bot commented Feb 4, 2026

Deploy Preview succeeded!

Built without sensitive environment variables

Name Link
🔨 Latest commit a0598c2
🔍 Latest deploy log https://app.netlify.com/projects/tigera/deploys/69836714f27db200081f348f
😎 Deploy Preview https://deploy-preview-2511--tigera.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 68 (no change from production)
Accessibility: 98 (no change from production)
Best Practices: 92 (no change from production)
SEO: 100 (no change from production)
PWA: -
View the detailed breakdown and full score reports

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

@netlify
Copy link

netlify bot commented Feb 4, 2026

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

Name Link
🔨 Latest commit a0598c2
🔍 Latest deploy log https://app.netlify.com/projects/calico-docs-preview-next/deploys/69836714d8a8e60008568e02
😎 Deploy Preview https://deploy-preview-2511--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
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 guidance for configuring the host egress interface selection for external network egress gateway traffic in Calico Enterprise external network documentation.

Changes:

  • Introduces a new “Configure egress interface” section describing egressIPHostIfacePattern usage.
  • Adds a kubectl patch example for setting egressIPHostIfacePattern.
  • Applies the same documentation update to the unversioned Enterprise docs and Enterprise versions 3.21-2, 3.22-2, and 3.23-1.

Reviewed changes

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

File Description
calico-enterprise/networking/egress/external-network.mdx Adds a new section documenting egressIPHostIfacePattern configuration for external network egress.
calico-enterprise_versioned_docs/version-3.21-2/networking/egress/external-network.mdx Backports the same new configuration section to Enterprise 3.21-2 docs.
calico-enterprise_versioned_docs/version-3.22-2/networking/egress/external-network.mdx Backports the same new configuration section to Enterprise 3.22-2 docs.
calico-enterprise_versioned_docs/version-3.23-1/networking/egress/external-network.mdx Backports the same new configuration section to Enterprise 3.23-1 docs.

Comment on lines 74 to 78
### Configure egress interface

To configure which host interfaces should be used for egress traffic and have the `src_valid_mark` set, configure the `egressIPHostIfacePattern` field in the default **FelixConfiguration**. This field accepts a regular expression that matches the names of the host interfaces to be used.

For example, to configure interfaces matching the pattern `ens20` or `ens21` with VLAN IDs 100 or 200:
Copy link

Copilot AI Feb 4, 2026

Choose a reason for hiding this comment

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

egressIPHostIfacePattern is defined as a comma-separated list of interface names/regex patterns, and regex patterns must be wrapped in /.../ (see calico-enterprise/_includes/components/FelixConfig/config-params.json:7842-7857). The current wording says the field “accepts a regular expression” (singular) and doesn’t mention the /.../ requirement; please adjust the text (and consider pluralizing the heading) to match the actual config semantics.

Copilot uses AI. Check for mistakes.
Copy link
Collaborator

Choose a reason for hiding this comment

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

+1


```bash
kubectl patch felixconfiguration default --type='merge' -p \
'{"spec":{"egressIPHostIfacePattern":"^ens2[01][./](100|200)$"}}'
Copy link

Copilot AI Feb 4, 2026

Choose a reason for hiding this comment

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

The patch example sets egressIPHostIfacePattern to a bare regex (^ens2[01][./](100|200)$). Per the Felix config schema, regex patterns must be wrapped in /.../, and including / inside the pattern (via [./]) becomes ambiguous unless escaped. Please update the example so it uses the expected /.../ form and an interface-name pattern that won’t conflict with the delimiter.

Suggested change
'{"spec":{"egressIPHostIfacePattern":"^ens2[01][./](100|200)$"}}'
'{"spec":{"egressIPHostIfacePattern":"/^ens2[01]\\.(100|200)$/"}}'

Copilot uses AI. Check for mistakes.
Copy link
Collaborator

Choose a reason for hiding this comment

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

This comment correctly describes what is in the felixconfig spec. If this is accurate, then either the code or the description needs to be changed.

Comment on lines 74 to 78
### Configure egress interface

To configure which host interfaces should be used for egress traffic and have the `src_valid_mark` set, configure the `egressIPHostIfacePattern` field in the default **FelixConfiguration**. This field accepts a regular expression that matches the names of the host interfaces to be used.

For example, to configure interfaces matching the pattern `ens20` or `ens21` with VLAN IDs 100 or 200:
Copy link

Copilot AI Feb 4, 2026

Choose a reason for hiding this comment

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

egressIPHostIfacePattern is defined as a comma-separated list of interface names/regex patterns, and regex patterns must be wrapped in /.../ (see calico-enterprise_versioned_docs/version-3.23-1/_includes/components/FelixConfig/config-params.json:8006-8022). The current wording says the field “accepts a regular expression” (singular) and doesn’t mention the /.../ requirement; please adjust the text (and consider pluralizing the heading) to match the actual config semantics.

Copilot uses AI. Check for mistakes.
Comment on lines 78 to 82
For example, to configure interfaces matching the pattern `ens20` or `ens21` with VLAN IDs 100 or 200:

```bash
kubectl patch felixconfiguration default --type='merge' -p \
'{"spec":{"egressIPHostIfacePattern":"^ens2[01][./](100|200)$"}}'
Copy link

Copilot AI Feb 4, 2026

Choose a reason for hiding this comment

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

The patch example sets egressIPHostIfacePattern to a bare regex (^ens2[01][./](100|200)$). Per the Felix config schema, regex patterns must be wrapped in /.../, and including / inside the pattern (via [./]) becomes ambiguous unless escaped. Please update the example so it uses the expected /.../ form and an interface-name pattern that won’t conflict with the delimiter.

Suggested change
For example, to configure interfaces matching the pattern `ens20` or `ens21` with VLAN IDs 100 or 200:
```bash
kubectl patch felixconfiguration default --type='merge' -p \
'{"spec":{"egressIPHostIfacePattern":"^ens2[01][./](100|200)$"}}'
For example, to configure interfaces named `ens20.100`, `ens20.200`, `ens21.100`, or `ens21.200`:
```bash
kubectl patch felixconfiguration default --type='merge' -p \
'{"spec":{"egressIPHostIfacePattern":"/^ens2[01]\.(100|200)$/"}}'

Copilot uses AI. Check for mistakes.
'{"spec":{"egressIPHostIfacePattern":"^ens2[01][./](100|200)$"}}'
```

This ensures that Calico sets the `src_valid_mark` on interfaces matching the specified regex pattern, which is required for proper egress gateway functionality with external networks.
Copy link

Copilot AI Feb 4, 2026

Choose a reason for hiding this comment

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

This page consistently refers to the product as $[prodname], but this new sentence says “Calico sets…”. For consistency in Calico Enterprise docs (and to avoid ambiguity), replace “Calico” with $[prodname] (or “Felix” if you specifically mean the Felix agent sets the sysctl).

Copilot uses AI. Check for mistakes.
'{"spec":{"egressIPHostIfacePattern":"^ens2[01][./](100|200)$"}}'
```

This ensures that Calico sets the `src_valid_mark` on interfaces matching the specified regex pattern, which is required for proper egress gateway functionality with external networks.
Copy link

Copilot AI Feb 4, 2026

Choose a reason for hiding this comment

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

This page consistently refers to the product as $[prodname] (for example, lines 13 and 22), but this new sentence says “Calico sets…”. For consistency in Calico Enterprise docs (and to avoid ambiguity), replace “Calico” with $[prodname] (or “Felix” if you specifically mean the Felix agent sets the sysctl).

Copilot uses AI. Check for mistakes.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes, best to s/Calico/$[prodname]


```bash
kubectl patch felixconfiguration default --type='merge' -p \
'{"spec":{"egressIPHostIfacePattern":"^ens2[01][./](100|200)$"}}'
Copy link

Copilot AI Feb 4, 2026

Choose a reason for hiding this comment

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

The patch example sets egressIPHostIfacePattern to a bare regex (^ens2[01][./](100|200)$). Per the Felix config schema, regex patterns must be wrapped in /.../, and including / inside the pattern (via [./]) becomes ambiguous unless escaped. Please update the example so it uses the expected /.../ form and an interface-name pattern that won’t conflict with the delimiter.

Suggested change
'{"spec":{"egressIPHostIfacePattern":"^ens2[01][./](100|200)$"}}'
'{"spec":{"egressIPHostIfacePattern":"/^ens2[01]\.(100|200)$/"}}'

Copilot uses AI. Check for mistakes.
'{"spec":{"egressIPHostIfacePattern":"^ens2[01][./](100|200)$"}}'
```

This ensures that Calico sets the `src_valid_mark` on interfaces matching the specified regex pattern, which is required for proper egress gateway functionality with external networks.
Copy link

Copilot AI Feb 4, 2026

Choose a reason for hiding this comment

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

This page consistently refers to the product as $[prodname], but this new sentence says “Calico sets…”. For consistency in Calico Enterprise docs (and to avoid ambiguity), replace “Calico” with $[prodname] (or “Felix” if you specifically mean the Felix agent sets the sysctl).

Copilot uses AI. Check for mistakes.
Comment on lines 74 to 78
### Configure egress interface

To configure which host interfaces should be used for egress traffic and have the `src_valid_mark` set, configure the `egressIPHostIfacePattern` field in the default **FelixConfiguration**. This field accepts a regular expression that matches the names of the host interfaces to be used.

For example, to configure interfaces matching the pattern `ens20` or `ens21` with VLAN IDs 100 or 200:
Copy link

Copilot AI Feb 4, 2026

Choose a reason for hiding this comment

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

egressIPHostIfacePattern is defined as a comma-separated list of interface names/regex patterns, and regex patterns must be wrapped in /.../ (see calico-enterprise_versioned_docs/version-3.21-2/_includes/components/FelixConfig/config-params.json:7612-7628). The current wording says the field “accepts a regular expression” (singular) and doesn’t mention the /.../ requirement; please adjust the text (and consider pluralizing the heading) to match the actual config semantics.

Copilot uses AI. Check for mistakes.
Comment on lines 78 to 82
For example, to configure interfaces matching the pattern `ens20` or `ens21` with VLAN IDs 100 or 200:

```bash
kubectl patch felixconfiguration default --type='merge' -p \
'{"spec":{"egressIPHostIfacePattern":"^ens2[01][./](100|200)$"}}'
Copy link

Copilot AI Feb 4, 2026

Choose a reason for hiding this comment

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

The patch example sets egressIPHostIfacePattern to a bare regex (^ens2[01][./](100|200)$). Per the Felix config schema, regex patterns must be wrapped in /.../, and including / inside the pattern (via [./]) becomes ambiguous unless escaped. Please update the example so it uses the expected /.../ form and an interface-name pattern that won’t conflict with the delimiter.

Suggested change
For example, to configure interfaces matching the pattern `ens20` or `ens21` with VLAN IDs 100 or 200:
```bash
kubectl patch felixconfiguration default --type='merge' -p \
'{"spec":{"egressIPHostIfacePattern":"^ens2[01][./](100|200)$"}}'
For example, to configure interfaces matching the pattern `ens20` or `ens21` with VLAN IDs 100 or 200 (for example, `ens20.100`, `ens20.200`, `ens21.100`, `ens21.200`):
```bash
kubectl patch felixconfiguration default --type='merge' -p \
'{"spec":{"egressIPHostIfacePattern":"/^ens2[01]\\.(100|200)$/"}}'

Copilot uses AI. Check for mistakes.
Copy link
Collaborator

@ctauchen ctauchen left a comment

Choose a reason for hiding this comment

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

A few comments from Copilot that I think are valid.

Can you copy changes to Calico Cloud 22-2 and next?

With those changes, all good to merge.
@song-jiang


```bash
kubectl patch felixconfiguration default --type='merge' -p \
'{"spec":{"egressIPHostIfacePattern":"^ens2[01][./](100|200)$"}}'
Copy link
Collaborator

Choose a reason for hiding this comment

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

This comment correctly describes what is in the felixconfig spec. If this is accurate, then either the code or the description needs to be changed.

Comment on lines 74 to 78
### Configure egress interface

To configure which host interfaces should be used for egress traffic and have the `src_valid_mark` set, configure the `egressIPHostIfacePattern` field in the default **FelixConfiguration**. This field accepts a regular expression that matches the names of the host interfaces to be used.

For example, to configure interfaces matching the pattern `ens20` or `ens21` with VLAN IDs 100 or 200:
Copy link
Collaborator

Choose a reason for hiding this comment

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

+1

'{"spec":{"egressIPHostIfacePattern":"^ens2[01][./](100|200)$"}}'
```

This ensures that Calico sets the `src_valid_mark` on interfaces matching the specified regex pattern, which is required for proper egress gateway functionality with external networks.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes, best to s/Calico/$[prodname]

Copy link
Collaborator

@ctauchen ctauchen left a comment

Choose a reason for hiding this comment

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

LGTM

@ctauchen ctauchen merged commit d050315 into tigera:main Feb 4, 2026
11 checks passed
@ctauchen
Copy link
Collaborator

ctauchen commented Feb 4, 2026

Can you copy changes to Calico Cloud 22-2 and next?

I missed this before the merge. Presumably this applies?

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