Skip to content

feat(conformance): Add HTTPRouteMultipleGatewaysDifferentPools test #838

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

Open
wants to merge 91 commits into
base: main
Choose a base branch
from

Conversation

SinaChavoshi
Copy link
Contributor

@SinaChavoshi SinaChavoshi commented May 15, 2025

This PR introduces a new conformance test, HTTPRouteMultipleGatewaysDifferentPools, which validates a scenario where two distinct HTTPRoute resources, parented by different Gateway resources, successfully reference and route traffic to separate InferencePool backends.

local run results: ( Ran on commit 5990c51 )

go test -v ./conformance -args -debug     -gateway-class gke-l7-regional-external-managed     -cleanup-base-resources=false     -run-test HTTPRouteMultipleGatewaysDifferentPools
...
    suite.go:451: 2025-06-09T23:15:14.005553427Z: Sleeping 0s for test isolation
=== RUN   TestConformance/InferencePoolResolvedRefsCondition
    conformance.go:68: Skipping InferencePoolResolvedRefsCondition: test explicitly skipped
--- PASS: TestConformance (65.42s)
    --- SKIP: TestConformance/HTTPRouteInvalidInferencePoolRef (0.00s)
    --- PASS: TestConformance/HTTPRouteMultipleGatewaysDifferentPools (60.48s)
        --- PASS: TestConformance/HTTPRouteMultipleGatewaysDifferentPools/Primary_HTTPRoute,_InferencePool,_and_Gateway_path:_verify_status_and_traffic (56.54s)
        --- PASS: TestConformance/HTTPRouteMultipleGatewaysDifferentPools/Secondary_HTTPRoute,_InferencePool,_and_Gateway_path:_verify_status_and_traffic (0.54s)
    --- SKIP: TestConformance/InferencePoolAccepted (0.00s)
    --- SKIP: TestConformance/HTTPRouteMultipleRulesDifferentPools (0.00s)
    --- SKIP: TestConformance/InferencePoolResolvedRefsCondition (0.00s)
PASS
ok      sigs.k8s.io/gateway-api-inference-extension/conformance 65.623s

Copy link

netlify bot commented May 15, 2025

Deploy Preview for gateway-api-inference-extension ready!

Name Link
🔨 Latest commit 182ee70
🔍 Latest deploy log https://app.netlify.com/projects/gateway-api-inference-extension/deploys/685308ae819abf00081a85b6
😎 Deploy Preview https://deploy-preview-838--gateway-api-inference-extension.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label May 15, 2025
@k8s-ci-robot
Copy link
Contributor

Hi @SinaChavoshi. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels May 15, 2025
@spencerhance
Copy link

/cc

@k8s-ci-robot k8s-ci-robot requested a review from spencerhance May 16, 2025 18:16
Copy link

@spencerhance spencerhance left a comment

Choose a reason for hiding this comment

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

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 16, 2025
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 19, 2025
@spencerhance
Copy link

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 19, 2025
@ahg-g
Copy link
Contributor

ahg-g commented May 20, 2025

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels May 20, 2025
@zetxqx zetxqx mentioned this pull request Jun 12, 2025
12 tasks
@danehans
Copy link
Contributor

/unhold

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 16, 2025
periodSeconds: 5
failureThreshold: 2
env:
- name: POD_NAME
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this var being used? If not, +1 to remove it.

periodSeconds: 5
failureThreshold: 2
env:
- name: POD_NAME
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this var being used? If not, +1 to remove it.

Comment on lines +41 to +56
appBackendNamespace = "gateway-conformance-app-backend"
infraNamespace = "gateway-conformance-infra"
backendAppLabelKey = "app"

primaryGatewayName = "conformance-gateway"
routeForPrimaryGWName = "route-for-primary-gateway"
primaryPoolName = "primary-pool"
primaryBackendLabel = "inference-model-1"
primaryRoutePath = "/test-primary-gateway"

secondaryGatewayName = "conformance-secondary-gateway"
routeForSecondaryGWName = "route-for-secondary-gateway"
secondaryPoolName = "secondary-pool"
secondaryBackendLabel = "inference-model-2"
secondaryRoutePath = "/test-secondary-gateway"
secondaryRouteHostname = "secondary.example.com"
Copy link
Contributor

Choose a reason for hiding this comment

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

conformance/resources/manifests/manifests.yaml defines resources that will be used across the tests, correct? If so, most of these locally defined consts should be public scope in the conformance/resources or conformance/resources/manifests pkg and imported into this test.

Comment on lines +95 to +110
apiVersion: networking.gke.io/v1
kind: HealthCheckPolicy
metadata:
name: primary-pool-health-check
namespace: gateway-conformance-app-backend
spec:
targetRef:
group: "inference.networking.x-k8s.io"
kind: InferencePool
name: primary-pool
default:
config:
type: HTTP
httpHealthCheck:
requestPath: /
port: 3000
Copy link
Contributor

Choose a reason for hiding this comment

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

HealthCheckPolicy is implementation-specific and should not be included in this test.

Comment on lines +112 to +127
apiVersion: networking.gke.io/v1
kind: HealthCheckPolicy
metadata:
name: secondary-pool-health-check
namespace: gateway-conformance-app-backend
spec:
targetRef:
group: "inference.networking.x-k8s.io"
kind: InferencePool
name: secondary-pool
default:
config:
type: HTTP
httpHealthCheck:
requestPath: /
port: 3000
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here

namespace: gateway-conformance-app-backend
spec:
selector:
app: "inference-model-2"
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: quoting is unneeded

@@ -0,0 +1,91 @@
/*
Copy link
Contributor

Choose a reason for hiding this comment

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

This test is part of #834 and should be removed here, correct?

@@ -0,0 +1,183 @@
---
Copy link
Contributor

Choose a reason for hiding this comment

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

This test is part of #834 and should be removed here, correct?

InferencePoolMustHaveConditionTimeout: 300 * time.Second,
InferencePoolMustHaveConditionInterval: 10 * time.Second,
GatewayObjectPollInterval: 5 * time.Second,
HTTPRouteDeletionReconciliationTimeout: 5 * time.Second,
HTTPRouteConditionTimeout: 300 * time.Second,
Copy link
Contributor

Choose a reason for hiding this comment

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

Since this condition timeout is the same as InferencePoolMustHaveConditionTimeout, consider using a single var that represents both resources, i.e. ConditionTimeout.

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 17, 2025
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Jun 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants