feat: allow westside-ai-assistant to reach keycloak #238
No reviewers
Labels
No labels
domain:backend
domain:devops
domain:frontend
status:approved
status:in-progress
status:needs-fix
status:qa
type:bug
type:devops
type:feature
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
forgejo_admin/pal-e-platform!238
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "3-westside-ai-assistant-netpol"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Add
westside-ai-assistantnamespace to the keycloak NetworkPolicy ingress allowlist so the AI assistant pod can authenticate via client credentials flow.Changes
terraform/network-policies.tf-- addedwestside-ai-assistantnamespaceSelector entry tonetpol_keycloakingress list, following the existingbasketball-apipatterntofu plan Output
Test Plan
tofu validatepassestofu plan -lock=false -target=kubernetes_manifest.netpol_keycloakshows single resource update (1 to change)network-policies.tfmodified (1 line added)Review Checklist
tofu fmtruntofu validatepassestofu planoutput includedRelated Notes
Closes forgejo_admin/westside-ai-assistant#3
QA Review
Diff: 1 file changed, 1 insertion, 0 deletions
Acceptance Criteria (from westside-ai-assistant#3)
westside-ai-assistantnamespace listed in keycloak NetworkPolicy namespaceSelectortofu planshows only the keycloak NetworkPolicy change (0 to add, 1 to change, 0 to destroy)SOP Compliance
tofu fmtruntofu validatepassestofu plan -lock=falseoutput included in PR body3-westside-ai-assistant-netpolCloseskeyword references parent issuePattern Verification
The added line follows the exact same namespaceSelector pattern as the existing
basketball-apientry. Insertion position (betweenbasketball-apiandmonitoring) is correct.VERDICT: APPROVED
PR #238 Review
DOMAIN REVIEW
Tech stack: Terraform (OpenTofu) / Kubernetes NetworkPolicy
network-policies.tf (line 150) -- Single line added to
netpol_keycloakingress list:Terraform/k8s checklist:
basketball-apiandmonitoringentries in indentation and structure. Passes.netpol_keycloak), 0 add, 1 change, 0 destroy. Clean.kubernetes_manifest. No state-breaking changes. No migration needed.westside-ai-assistantnamespace to thekeycloaknamespace. This is the minimum-privilege change needed for client credentials flow (Keycloak token endpoint). The namespace selector uses the standardkubernetes.io/metadata.namelabel which is immutable and set by k8s itself -- correct and not spoofable.basketball-apiandmonitoring, which keeps the list logically grouped (service consumers before infra namespaces). Good.westside-ai-assistantis the actual k8s namespace name, matching the project naming convention. Appropriate to use as a literal here since all other entries follow the same pattern.BLOCKERS
None.
This is a 1-line infrastructure change to an ingress allowlist. The BLOCKER criteria do not apply:
tofu planoutput is the test).NITS
None. The change is minimal, correct, and follows the established pattern precisely.
SOP COMPLIANCE
3-westside-ai-assistant-netpolreferences westside-ai-assistant#3forgejo_admin/westside-ai-assistant#3and notes the westside-ai-assistant projecttofu planoutput included per PR conventionstofu fmtandtofu validateconfirmedCloses forgejo_admin/westside-ai-assistant#3present for auto-closeNote: Branch is in a cross-repo context (issue lives in westside-ai-assistant, PR is in pal-e-platform). The branch prefix
3-refers to the remote issue number, which is documented in the PR body. This is acceptable for cross-repo work.PROCESS OBSERVATIONS
tofu planconfirms no destructive changes. Rollback is trivial (remove the line).VERDICT: APPROVED