Skip to content

DOCS-3077: Fix inaccuracies on the NetworkPolicy reference - #3114

Merged
ctauchen merged 17 commits into
tigera:mainfrom
ctauchen:DOCS-3077-fact-check-networkpolicy
Oct 19, 2026
Merged

ctauchen merged 17 commits into
tigera:mainfrom
ctauchen:DOCS-3077-fact-check-networkpolicy

Conversation

@ctauchen

@ctauchen ctauchen commented Oct 15, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes statements on the Calico OSS NetworkPolicy reference that do not match the product, in next, 3.33, 3.32 and 3.31. Each fix below was reproduced on a kind cluster running that version's release: v3.33.0 for next and 3.33, v3.32.2 for 3.32, and v3.31.7 for 3.31.

Jira: https://tigera.atlassian.net/browse/DOCS-3077

Reproduced in the product:

  • Spec table: adds the missing tier field, which defaults to default and must exist before you create the policy. In 3.31, a policy in a tier other than default must be named <tier>.<name>.
  • order: applies within the policy's tier. A lower order in one tier does not take precedence over a policy in an earlier tier.
  • types: the unbracketed values Ingress, Egress and Ingress, Egress are rejected. The description now uses list values.
  • metadata.name: names must be lowercase, cannot contain _, and can contain only one ., except names that start with knp.default. or ossg.default.. Not changed in 3.31, where the rule is different.
  • Pass action: skips the rest of the policy's tier and continues with the next tier that has policies for the endpoint, not straight to the profiles.
  • EntityRule: does not match on protocol. Protocol belongs to the Rule.
  • namespaceSelector: also matches namespaced network sets.
  • notSelector: in a NetworkPolicy, or with a namespaceSelector, it matches only in-scope endpoints and network sets.
  • Selector performance: || is optimized when every branch requires the same label.
  • Selector example: the bracketed example had unbalanced parentheses and was rejected.
  • HTTPMatch: removes the claim that an http clause makes a rule match only HTTP traffic. A rule with an http clause allowed plain TCP.
  • HTTPMatch exact: matches the path after normalization, not as written. For example, /foo//bar, /foo/x/../bar and /foo/%62ar match exact: /foo/bar. Not changed in 3.31.
  • HTTPMatch prefix: matches at a path-segment boundary, so /keys matches /keys/1 but not /keystore. Not changed in 3.31.

The HTTPMatch exact and prefix fixes were reproduced on kind using the Istio and Dikastes setup from the application layer policy page, on v3.33.0 and v3.32.2, with Envoy path normalization both on and off. They are not changed in 3.31: in v3.31.7, Dikastes registers no policy check, so it denies every request and HTTPMatch cannot be observed. That is a separate problem with the 3.31 application layer policy page, for the docs team to follow up.

The shared partials also change the GlobalNetworkPolicy, staged policy, IPPool, BGPPeer and KubeControllersConfiguration pages.

Previews:

Next and 3.33 were verified in both API server mode and native v3 CRD mode.

Not changed:

  • The page says empty values are typically dropped when stored. With native v3 CRDs, kubectl keeps nets: [] and selector: "". Not verified in the original run, so not changed.

Copilot AI lite review requested due to automatic review settings October 15, 2026 15:36
@netlify

netlify Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

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

Name Link
🔨 Latest commit f4704b8
🔍 Latest deploy log https://app.netlify.com/projects/calico-docs-preview-next/deploys/6ad642a11c3847d66225907b
😎 Deploy Preview https://deploy-preview-3114--calico-docs-preview-next.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

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

@netlify

netlify Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview succeeded!

Built without sensitive environment variables

Name Link
🔨 Latest commit f4704b8
🔍 Latest deploy log https://app.netlify.com/projects/tigera/deploys/6ad642a14c3db0b435ee5039
😎 Deploy Preview https://deploy-preview-3114--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: 73 (🔴 down 3 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
🤖 Make changes Run an agent on this branch

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

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.

🟡 Changes recommended

One or more issues must be addressed before approval.

1 open finding
What changed in this PR

Updates Calico OSS 3.33 NetworkPolicy documentation to reflect validated product behavior.

Changes:

  • Corrects metadata name and spec.types guidance.
  • Clarifies selector scope, namespace network sets, performance, and syntax examples.
  • Updates shared selector/entity-rule content used by related resource pages.
File Description
calico_versioned_docs/​version-3.33/​reference/​resources/​networkpolicy.mdx Updated as part of this pull request.
calico_versioned_docs/​version-3.33/​_includes/​content/​_selectors.mdx Updated as part of this pull request.
calico_versioned_docs/​version-3.33/​_includes/​content/​_entityrule.mdx Updated as part of this pull request.

🧠 Review effort: Lite


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

| order | Controls the order of precedence. $[prodname] applies the policy with the lowest value first. | | float | |
| selector | Selects the endpoints to which this policy applies. | | [selector](#selectors) | all() |
| types | Applies the policy based on the direction of the traffic. To apply the policy to inbound traffic, set to `Ingress`. To apply the policy to outbound traffic, set to `Egress`. To apply the policy to both, set to `Ingress, Egress`. | `Ingress`, `Egress` | List of strings | Depends on presence of ingress/egress rules\* |
| types | Applies the policy based on the direction of the traffic. To apply the policy to inbound traffic, set to `[Ingress]`. To apply the policy to outbound traffic, set to `[Egress]`. To apply the policy to both, set to `[Ingress, Egress]`. | `Ingress`, `Egress` | List of strings | Depends on presence of ingress/egress rules\* |
The exact match compares the path after normalization, not the path as
written. The prefix match works on whole path segments, so /keys does
not match /keystore. Reproduced on kind with Istio and Dikastes on
v3.33.0 and v3.32.2, with Envoy path normalization on and off.
Every version says the name is lowercase alphanumeric with optional hyphens and at most one period.
@ctauchen
ctauchen force-pushed the DOCS-3077-fact-check-networkpolicy branch from 62cfa30 to f4704b8 Compare October 19, 2026 16:17
@ctauchen
ctauchen merged commit 7b7d935 into tigera:main Oct 19, 2026
8 of 10 checks passed
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