feat(helm): enable WebSocket upgrades by default on KGateway - #4080
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughChanged files by top-level folder:
API/CRD surface:
Tests:
Risk hotspots:
README/sample updates:
WalkthroughAdds a Helm template that conditionally renders a kgateway HTTPListenerPolicy enabling WebSocket upgrades on the default data-plane gateway, and updates two sample READMEs to remove the manual WebSocket-enablement step and renumber subsequent steps. ChangesHTTPListenerPolicy Helm template and configuration
Sample README step renumbering
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
Thanks for the contribution @kavix. Here the httpListenerPolicy name ( Shall we mention the instructions in the upgrade documention in a follow up PR (https://github.com/openchoreo/openchoreo.github.io/blob/main/docs/platform-engineer-guide/upgrades.mdx) to either delete or add helm ownership annotations before upgrading OpenChoreo dataplanes? |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@install/helm/openchoreo-data-plane/templates/gateway/httplistenerpolicy.yaml`:
- Line 1: The HTTPListenerPolicy template currently ignores the
gateway.httpListenerPolicy.enabled toggle, so the resource is still rendered
when the flag is false. Update the condition in httplistenerpolicy.yaml to also
check .Values.gateway.httpListenerPolicy.enabled alongside the existing
gateway.enabled and gatewayClassName logic, using the template block that
renders the HTTPListenerPolicy; if this flag is not intended to control
rendering, remove it from the values/schema instead to avoid a dead
configuration knob.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: e6e4885f-5b6a-4956-a148-e72a86d862d8
📒 Files selected for processing (1)
install/helm/openchoreo-data-plane/templates/gateway/httplistenerpolicy.yaml
Add a default HTTPListenerPolicy targeting the default-gateway in the data-plane Helm chart. Enable it by default, gated on gatewayClassName being 'kgateway'. This allows workloads with Websocket endpoints to function correctly out of the box without requiring manual cluster-wide operations. Also, remove the manual HTTPListenerPolicy creation steps from the doclet and echo-websocket-service sample READMEs. Refs openchoreo#4068, openchoreo#3915 Signed-off-by: kavix <[email protected]>
bd6e457 to
09de6c9
Compare
Yes, that makes perfect sense and sounds like the cleanest path forward. I'll open a follow-up PR in the |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@install/helm/openchoreo-data-plane/templates/gateway/httplistenerpolicy.yaml`:
- Line 5: The httplistenerpolicy resource name is hardcoded as a static literal,
which can cause Helm ownership conflicts on upgrade and collisions across
multiple releases. Update the name in the httplistenerpolicy template to use the
chart’s release/fullname helper so it is scoped per deployment, and make sure
the associated labels/annotations remain consistent with the chosen naming
helper. Also document how users should handle an already existing manually
created policy before upgrading, using the existing template symbols for the
gateway policy resource.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: f90e32d5-b275-444c-81a0-039e578acf6c
📒 Files selected for processing (4)
install/helm/openchoreo-data-plane/templates/gateway/httplistenerpolicy.yamlinstall/helm/openchoreo-data-plane/values.yamlsamples/from-image/doclet/README.mdsamples/from-image/echo-websocket-service/README.md
✅ Files skipped from review due to trivial changes (3)
- install/helm/openchoreo-data-plane/values.yaml
- samples/from-image/echo-websocket-service/README.md
- samples/from-image/doclet/README.md
Signed-off-by: kavix <[email protected]>
Purpose
Websocketis a first-class workload endpoint type in OpenChoreo, but connections failed out of the box because KGateway (based on Envoy) disables WebSocket upgrades by default. Enabling upgrades requires anHTTPListenerPolicy(gateway.kgateway.dev/v1alpha1) on the Gateway listener.This PR deploys a default
HTTPListenerPolicyin the data-plane Helm chart so that WebSocket upgrades work out-of-the-box for all users without manual cluster-wide operations.Approach
install/helm/openchoreo-data-plane/templates/gateway/httplistenerpolicy.yamlwhich creates anHTTPListenerPolicytargeting the default gateway (gateway-default) with WebSocket upgrades enabled.gateway.enabledandgateway.gatewayClassName == "kgateway"to align with the KGateway-specific CRD availability and prevent installation failures on non-KGateway configurations.gateway.httpListenerPolicyconfiguration undergatewayinvalues.yamlandvalues.schema.jsonto allow users to toggle the policy.HTTPListenerPolicyfromsamples/from-image/doclet/README.mdandsamples/from-image/echo-websocket-service/README.md.Related Issues
Closes #4069
Refs #3915
Checklist
backport/<release-branch>label if this should be backported (e.g.,backport/release-v1.0)