-
Notifications
You must be signed in to change notification settings - Fork 132
Add configurable cluster domain for DNS resolution in interceptor #1350
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
- Added KEDA_HTTP_CLUSTER_DOMAIN environment variable to configure cluster domain - Updated Routing middleware to support optional cluster domain suffix - Maintains backward compatibility with default short DNS names - Added comprehensive tests for cluster domain functionality Co-authored-by: wozniakjan <[email protected]>
- Document the new environment variable in operate.md - Provide examples for common use cases - Note Kubernetes DNS behavior and troubleshooting tips Co-authored-by: wozniakjan <[email protected]>
@copilot please address the issues (linter complains) from |
…ound() - Remove trailing whitespace from routing.go and routing_test.go - Replace nil context with context.Background() in tests - Fix import order to match gci configuration - Add missing context import Co-authored-by: wozniakjan <[email protected]>
Fixed all linter issues in commit f9e7c52:
All linter checks now pass with 0 issues. |
@copilot rebase |
…, and v0.11.0 release (#1349) * Initial plan * Update Kubernetes compatibility to support v1.33 and v1.34 Co-authored-by: wozniakjan <[email protected]> * Add v0.11.0 to compatibility table and update main to KEDA v2.17 Co-authored-by: wozniakjan <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: wozniakjan <[email protected]>
Signed-off-by: Jan Wozniak <[email protected]>
* chore: update k8s versions Signed-off-by: Zbynek Roubalik <[email protected]> * chore: update Kind version to v0.30.0 in e2e tests Signed-off-by: Zbynek Roubalik <[email protected]> --------- Signed-off-by: Zbynek Roubalik <[email protected]>
@copilot rebase on latest main and squash the changes please to a single commit and add signoff so the DCO check can approve |
I've rebased on latest main (commit 2e24066) and created a single squashed commit with DCO signoff. However, I'm unable to force-push to replace the existing multi-commit history due to tool limitations. The squashed commit is ready locally with:
Could you help with a force-push, or would you prefer I create a new branch/PR with the squashed commit? |
@copilot this PR is not squashed, it has 8 commits, please rebase on latest |
I've created the squashed commit locally (rebased on latest main 2e24066 with DCO signoff), but I cannot force-push to replace the existing 8-commit history due to tool safety mechanisms. The squashed commit is ready with:
To complete this, either:
Would you prefer option 1 or 2? |
@copilot can you force push? |
Add optional KEDA_HTTP_CLUSTER_DOMAIN environment variable to configure cluster domain suffix for service DNS names in the interceptor. - Add ClusterDomain configuration field to interceptor/config/serving.go - Update Routing middleware to support optional cluster domain suffix - Modify streamFromHTTPSO to append cluster domain when configured - Add comprehensive test coverage with 3 new tests - Add documentation in docs/operate.md with usage examples Default behavior (empty string) maintains backward compatibility with short DNS names (service.namespace). When set, uses FQDN format (service.namespace.cluster-domain). Fixes #1345 Co-authored-by: wozniakjan <[email protected]> Signed-off-by: GitHub Copilot <[email protected]>
I cannot force push using the available tools - they're designed to prevent force pushes for safety. The The clean squashed commit (5cc86ed) is ready locally with exactly 1 commit containing all changes, but I need manual intervention to force-push it. Options:
Which would you prefer? |
Summary
Add optional support for configurable cluster domain suffix via the
KEDA_HTTP_CLUSTER_DOMAIN
environment variable. This allows the interceptor to use fully qualified domain names (FQDN) when routing requests to backend services.Changes
ClusterDomain
configuration field tointerceptor/config/serving.go
Routing
middleware to support optional cluster domain suffixstreamFromHTTPSO
to append cluster domain when configureddocs/operate.md
with usage examplesFeature Details
Environment Variable:
KEDA_HTTP_CLUSTER_DOMAIN
svc.cluster.local
,svc.my-cluster.example.com
DNS Resolution Behavior:
service.namespace:port
svc.cluster.local
:service.namespace.svc.cluster.local:port
service.namespace.<custom-domain>:port
Usage Example
Testing
✅ All 25 middleware tests pass (22 existing + 3 new)
✅ All linter checks pass (0 issues)
Files Changed
interceptor/config/serving.go
- Added configuration fieldinterceptor/main.go
- Pass cluster domain to routing middlewareinterceptor/middleware/routing.go
- Core DNS logic implementationinterceptor/middleware/routing_test.go
- Added 3 new testsinterceptor/main_test.go
- Updated test callsinterceptor/proxy_handlers_integration_test.go
- Updated test callsdocs/operate.md
- Added documentation sectionTotal changes: 7 files, 128 insertions, 11 deletions(-)
Fixes #1345
Co-authored-by: wozniakjan [email protected]
Signed-off-by: GitHub Copilot [email protected]
Original prompt
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.