feat(rhdh): make OKP opt-in and add NetworkPolicies [RHIDP-16949] - #544
maysunfaisal wants to merge 3 commits into
Conversation
Add default-deny ingress protection for OKP and allow only RHDH and router traffic on port 8080. Add conditional RHDH egress for HTTP Ingress and internal Service configurations while reusing the existing HTTPS allowance. Co-authored-by: Codex <noreply@openai.com>
6d05b16 to
d660d27
Compare
|
@rm3l PTAL when you have a chance, thank you |
Disable OKP-backed documentation retrieval by default on OpenShift and Kubernetes while keeping Intelligent Assistant enabled. Require explicit OKP enablement and document the image download impact and platform-specific opt-in steps. Co-authored-by: Codex <noreply@openai.com>
|
@rm3l Covered OKP opt in here with this PR as discussed on Slack. |
|
/agentic_review |
Code Review by Qodo
1. Portal pods allow all egress
|
| matchLabels: | ||
| {{- include "rhdh.intelligentAssistant.okp.selectorLabels" . | nindent 6 }} | ||
| policyTypes: | ||
| - Ingress |
There was a problem hiding this comment.
| - Ingress | |
| - Ingress | |
| - Egress |
Default deny should include both Ingress and Egress by default. Then if needed, you can selectively allow certain destinations like DNS. But I'm curious, does OKP itself need to initiate any outbound connections, given that it's an "Offline Knowledge Portal" serving pre-bundled docs?
There was a problem hiding this comment.
Good point, addressed in latest commit!
Apply default-deny egress to OKP, scope the internal Service fallback to OKP pods, and retain the required HTTP Ingress allowance. Co-authored-by: Codex <noreply@openai.com>
|



Description of the change
Adds NetworkPolicies for the Intelligent Assistant OKP workload when OKP is active:
Makes OKP-backed RHDH documentation retrieval optional and disabled by default on OpenShift and Kubernetes.
lightspeed-stack-no-okp.yaml; no OKP resources, RAG configuration, orOKP_SERVICE_URLare rendered.intelligentAssistant.okp.enabled=true.The chart version is bumped from
2.4.0to2.5.0.Which issue(s) does this PR fix or relate to
https://redhat.atlassian.net/browse/RHIDP-16949
How to test changes / Special notes to the reviewer
Run static validation:
Deploy with Intelligent Assistant enabled using the platform-specific commands in
docs/intelligent-assistant.md, then verify:OKP configuration, Verify these scenarios using
docs/intelligent-assistant.md:OKP_SERVICE_URL.OKP_SERVICE_URLare present.OKP_SERVICE_URLare present.Verified on OpenShift with and without OKP. Helm rendering was verified for OpenShift and Kubernetes with and without OKP. Kind rendered the complete HTTPS opt-in configuration and the OKP endpoint returned HTTP 200.
Network Policies:
OKP_SERVICE_URLand the public OKP Route/Ingress return HTTP 200.Verified on OpenShift and Kind with both HTTP and HTTPS OKP endpoints. A Backstage-labeled test client successfully reached the public OKP Ingress under the generated policies.
Checklist
Chart.yamlaccording to Semantic Versioning.values.yamland added to the corresponding README.md. The pre-commit utility can be used to generate the necessary content. Runpre-commit run --all-filesto run the hooks and then push any resulting changes. The pre-commit Workflow will enforce this and warn you if needed.pre-commithook.ct lintcommand.