Skip to content

feat(networkpolicies): simplify Stack ingress isolation - #553

Merged
flemzord merged 2 commits into
mainfrom
feat/review-operator-network-policies
Oct 14, 2026
Merged

flemzord merged 2 commits into
mainfrom
feat/review-operator-network-policies

Conversation

@flemzord

Copy link
Copy Markdown
Member

Replace per-module Stack ingress exceptions with two policies: allow all pod traffic within the Stack namespace, and allow cross-namespace/external traffic to the Gateway on TCP 8080. Direct access to other Stack pods remains blocked; these policies do not restrict egress.

Reconciliation installs the replacements before removing the six obsolete policies and updates the existing Gateway policy. The setting remains disabled by default. Unrelated policies, including policies managed by the delegated Ledger Operator, remain unchanged.

Updated the documentation, unit/controller tests, and Chainsaw fixtures. Gateway admin/metrics port 3080 is now accessible only from within the namespace unless another policy allows it. Cross-Stack calls through the destination Gateway remain possible, subject to authentication.

Validation:

  • go test ./internal/resources/... ./api/... passed.
  • KUBEBUILDER_ASSETS=<local envtest assets> go test ./internal/tests -ginkgo.focus=NetworkPolicyController -ginkgo.no-color passed.
  • git diff --check passed.
  • Unit tests cover upgrade cleanup, disable cleanup, idempotency, and preservation of unrelated policies.
  • Controller tests cover exact policies, ownership, wildcard settings, disabling, and setting deletion.

Network enforcement and Chainsaw tests have not been run on Sandbox; local controller tests use envtest without a CNI.

@flemzord
flemzord requested a review from a team as a code owner October 14, 2026 15:28
@NumaryBot NumaryBot added risk: medium NumaryBot classified this pull request as medium risk. bot-reviewed review-approved The NumaryBot review gate is satisfied for the current head. labels Oct 14, 2026
NumaryBot
NumaryBot previously approved these changes Oct 14, 2026

@NumaryBot NumaryBot 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.

The required automated review completed with no remaining findings.

@NumaryBot NumaryBot added review-approved The NumaryBot review gate is satisfied for the current head. and removed review-approved The NumaryBot review gate is satisfied for the current head. labels Oct 14, 2026

@NumaryBot NumaryBot 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.

The required automated review completed with no remaining findings.

@flemzord
flemzord merged commit 7e57e8f into main Oct 14, 2026
14 of 23 checks passed
@flemzord
flemzord deleted the feat/review-operator-network-policies branch October 14, 2026 18:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bot-reviewed review-approved The NumaryBot review gate is satisfied for the current head. risk: medium NumaryBot classified this pull request as medium risk.

Development

Successfully merging this pull request may close these issues.

2 participants