Skip to content

fix(p5): select app Pods by tenant label in the RAG Service (DRF-71) - #80

Merged
EurusDevSec merged 1 commit into
mainfrom
hoang/drf-71-svc-tenant-selector
Nov 25, 2026
Merged

EurusDevSec merged 1 commit into
mainfrom
hoang/drf-71-svc-tenant-selector

Conversation

@EurusDevSec

Copy link
Copy Markdown
Owner

Found during window P5-L3-20261125-01. window.sh probe sandbox failed /readyz and /query through the Service (timeout) for both tenants; secret, DB, vector query and bucket passed.

Cause (checked on the cluster with diagnostic Jobs in tenant-a, removed after):

From a tenant-a Job Result
app Pod IP:8080 OPEN
original Service rag-docs-qa TIMEOUT
extra Service, same selector plus rag.zero-drift.io/tenant OPEN, and its ClusterIP appeared in the egress PolicyEndpoint

The VPC CNI checks egress before the Service IP is translated. Its controller adds a ClusterIP to the egress PolicyEndpoint only when the Service selector holds the NetworkPolicy peer labels. allow-app-same-tenant peers on rag.zero-drift.io/tenant; the Service selected only app.kubernetes.io/name and rag.zero-drift.io/sandbox. kind never showed this (different CNI).

Change: add rag.zero-drift.io/tenant: ${schema.metadata.namespace} to the Service selector in gitops/platform/rgd/rag-sandbox.yaml. The app Pod template already carries this label (Kyverno zdr-tenant-label).

Checks: gitops/check.sh PASS; check_guards.sh 77 cases PASS; kubectl apply --dry-run=server on the window cluster accepted the RGD. kyverno test runs in CI (Docker was off locally).

Second in-window fix, a deviation from A16 approved by the owner. Codex review is due after the window (RGD change).

🤖 Generated with Claude Code

Found in window P5-L3-20261125-01: /readyz and /query through the Service
timed out under allow-app-same-tenant. The VPC CNI checks egress before the
Service IP is translated, and its controller adds a ClusterIP to the egress
PolicyEndpoint only when the Service selector holds the peer podSelector
labels. The Service selected by name and sandbox only. A diagnostic Service
with the tenant label added was reachable and its ClusterIP was allowed.

Second in-window fix (deviation from A16, owner approved). Codex review
after the window.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings November 25, 2026 04:41

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

@EurusDevSec
EurusDevSec merged commit 5b56624 into main Nov 25, 2026
3 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