Skip to content

Conversation

@bjee19
Copy link
Contributor

@bjee19 bjee19 commented Oct 16, 2025

When setting inference pool statuses, it loops through all the inference pools and checks if there are any nginx gateways that have parentRefs in the statuses. If there are AND the infernece pool is not referenced (not connected to the graph), it will remove that parentRef.

@bjee19 bjee19 requested a review from a team as a code owner October 16, 2025 18:35
@github-actions github-actions bot added the tests Pull requests that update tests label Oct 16, 2025
@bjee19
Copy link
Contributor Author

bjee19 commented Oct 16, 2025

@salonichf5

can you test for a scenario that if you re-apply a InferencePool(without deleting it), how does the status look ?

I re-applied the base yamls from the conformance test and each time this was the status:

kubectl describe inferencepools.inference.networking.k8s.io -A
Name:         primary-inference-pool
Namespace:    gateway-conformance-app-backend
Labels:       <none>
Annotations:  <none>
API Version:  inference.networking.k8s.io/v1
Kind:         InferencePool
Metadata:
  Creation Timestamp:  2025-10-16T18:19:45Z
  Generation:          1
  Resource Version:    129825
  UID:                 d5600a8d-8c0e-4cd3-b45a-6332792692cb
Spec:
  Endpoint Picker Ref:
    Failure Mode:  FailClose
    Group:
    Kind:          Service
    Name:          primary-endpoint-picker-svc
    Port:
      Number:  9002
  Selector:
    Match Labels:
      App:  primary-inference-model-server
  Target Ports:
    Number:  3000
Status:
  Parents:
    Conditions:
      Last Transition Time:  2025-10-16T18:20:38Z
      Message:               InferencePool is accepted by the Gateway.
      Observed Generation:   1
      Reason:                Accepted
      Status:                True
      Type:                  Accepted
      Last Transition Time:  2025-10-16T18:20:38Z
      Message:               Inference pool references a valid ExtensionRef.
      Observed Generation:   1
      Reason:                ResolvedRefs
      Status:                True
      Type:                  ResolvedRefs
    Parent Ref:
      Group:      gateway.networking.k8s.io
      Kind:       Gateway
      Name:       conformance-primary
      Namespace:  gateway-conformance-infra
    Conditions:
      Last Transition Time:  2025-10-16T18:20:38Z
      Message:               InferencePool is accepted by the Gateway.
      Observed Generation:   1
      Reason:                Accepted
      Status:                True
      Type:                  Accepted
      Last Transition Time:  2025-10-16T18:20:38Z
      Message:               Inference pool references a valid ExtensionRef.
      Observed Generation:   1
      Reason:                ResolvedRefs
      Status:                True
      Type:                  ResolvedRefs
    Parent Ref:
      Group:      gateway.networking.k8s.io
      Kind:       Gateway
      Name:       conformance-secondary
      Namespace:  gateway-conformance-infra
Events:           <none>

Which is correct since these have two different ParentRef Gateways. My fix shouldn't have solved any issues.

@salonichf5
Copy link
Contributor

@salonichf5

can you test for a scenario that if you re-apply a InferencePool(without deleting it), how does the status look ?

I re-applied the base yamls from the conformance test and each time this was the status:

kubectl describe inferencepools.inference.networking.k8s.io -A
Name:         primary-inference-pool
Namespace:    gateway-conformance-app-backend
Labels:       <none>
Annotations:  <none>
API Version:  inference.networking.k8s.io/v1
Kind:         InferencePool
Metadata:
  Creation Timestamp:  2025-10-16T18:19:45Z
  Generation:          1
  Resource Version:    129825
  UID:                 d5600a8d-8c0e-4cd3-b45a-6332792692cb
Spec:
  Endpoint Picker Ref:
    Failure Mode:  FailClose
    Group:
    Kind:          Service
    Name:          primary-endpoint-picker-svc
    Port:
      Number:  9002
  Selector:
    Match Labels:
      App:  primary-inference-model-server
  Target Ports:
    Number:  3000
Status:
  Parents:
    Conditions:
      Last Transition Time:  2025-10-16T18:20:38Z
      Message:               InferencePool is accepted by the Gateway.
      Observed Generation:   1
      Reason:                Accepted
      Status:                True
      Type:                  Accepted
      Last Transition Time:  2025-10-16T18:20:38Z
      Message:               Inference pool references a valid ExtensionRef.
      Observed Generation:   1
      Reason:                ResolvedRefs
      Status:                True
      Type:                  ResolvedRefs
    Parent Ref:
      Group:      gateway.networking.k8s.io
      Kind:       Gateway
      Name:       conformance-primary
      Namespace:  gateway-conformance-infra
    Conditions:
      Last Transition Time:  2025-10-16T18:20:38Z
      Message:               InferencePool is accepted by the Gateway.
      Observed Generation:   1
      Reason:                Accepted
      Status:                True
      Type:                  Accepted
      Last Transition Time:  2025-10-16T18:20:38Z
      Message:               Inference pool references a valid ExtensionRef.
      Observed Generation:   1
      Reason:                ResolvedRefs
      Status:                True
      Type:                  ResolvedRefs
    Parent Ref:
      Group:      gateway.networking.k8s.io
      Kind:       Gateway
      Name:       conformance-secondary
      Namespace:  gateway-conformance-infra
Events:           <none>

Which is correct since these have two different ParentRef Gateways. My fix shouldn't have solved any issues.

no like reply any of the inference pools yaml and see if the status gets repeated instead of overwritten

@bjee19
Copy link
Contributor Author

bjee19 commented Oct 16, 2025

no like reply any of the inference pools yaml and see if the status gets repeated instead of overwritten

Are you asking specifically for me to test on a failing/unaccepted status? Because what I described above was me re-applying the inference-pool yaml, and the status does not get repeated on the default accepted and resolved statuses.

@salonichf5
Copy link
Contributor

no like reply any of the inference pools yaml and see if the status gets repeated instead of overwritten

Are you asking specifically for me to test on a failing/unaccepted status? Because what I described above was me re-applying the inference-pool yaml, and the status does not get repeated on the default accepted and resolved statuses.

Okay just needed to confirm. Thank you Ben

@bjee19 bjee19 merged commit 6013835 into feat/inference-extension Oct 16, 2025
43 of 55 checks passed
@bjee19 bjee19 deleted the tests/fix-inference-pool-status-conformance branch October 16, 2025 19:36
@github-project-automation github-project-automation bot moved this from 🆕 New to ✅ Done in NGINX Gateway Fabric Oct 16, 2025
ciarams87 pushed a commit that referenced this pull request Oct 17, 2025
When setting inference pool statuses, it loops through all the inference pools and checks if there are any nginx gateways that have parentRefs in the statuses. If there are AND the infernece pool is not referenced (not connected to the graph), it will remove that parentRef.
ciarams87 pushed a commit that referenced this pull request Oct 17, 2025
When setting inference pool statuses, it loops through all the inference pools and checks if there are any nginx gateways that have parentRefs in the statuses. If there are AND the infernece pool is not referenced (not connected to the graph), it will remove that parentRef.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tests Pull requests that update tests

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants