-
Notifications
You must be signed in to change notification settings - Fork 2
feat: apisixupstream subset #172
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
Conversation
…upstream-discovery # Conflicts: # config/crd/bases/apisix.apache.org_apisixupstreams.yaml
conformance test reportapiVersion: gateway.networking.k8s.io/v1
date: "2025-06-23T02:07:59Z"
gatewayAPIChannel: standard
gatewayAPIVersion: v1.2.0
implementation:
contact: null
organization: APISIX
project: apisix-ingress-controller
url: https://github.com/apache/apisix-ingress-controller.git
version: v2.0.0
kind: ConformanceReport
mode: default
profiles:
- core:
failedTests:
- HTTPRouteInvalidBackendRefUnknownKind
result: failure
skippedTests:
- HTTPRouteHTTPSListener
statistics:
Failed: 1
Passed: 31
Skipped: 1
name: GATEWAY-HTTP
summary: Core tests failed with 1 test failures. |
conformance test reportapiVersion: gateway.networking.k8s.io/v1
date: "2025-06-23T02:10:48Z"
gatewayAPIChannel: standard
gatewayAPIVersion: v1.2.0
implementation:
contact: null
organization: APISIX
project: apisix-ingress-controller
url: https://github.com/apache/apisix-ingress-controller.git
version: v2.0.0
kind: ConformanceReport
mode: default
profiles:
- core:
result: partial
skippedTests:
- HTTPRouteHTTPSListener
statistics:
Failed: 0
Passed: 32
Skipped: 1
name: GATEWAY-HTTP
summary: Core tests partially succeeded with 1 test skips. |
…s, RBAC, and e2e tests
…upstream-discovery
…upstream-discovery # Conflicts: # internal/controller/utils.go
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces enhancements for the ApisixUpstream controller by adding health check support, refining upstream schema validations, and adjusting resource RBAC and indexing to support pods. Key changes include:
- Adding health check configurations and validations in CRD definitions and translator code.
- Updating tests to cover upstream health checks and subset matching.
- Including pods into RBAC rules, TranslateContext, and indexers for improved resource tracking.
Reviewed Changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| test/e2e/framework/manifests/ingress.yaml | Added pod resource to RBAC manifest for integration tests |
| test/e2e/apisix/upstream.go | New test file for validating ApisixUpstream error scenarios |
| test/e2e/apisix/route.go | Expanded route tests to cover subsets and health check behaviors |
| internal/utils/k8s.go | Added generic helper functions (AppendFunc, Filter, IsSubsetOf) |
| internal/provider/provider.go | Added Pods field to TranslateContext for tracking pod information |
| internal/provider/adc/translator/apisixupstream.go | Refactored translation functions and added client TLS and health check |
| internal/manager/controllers.go | Updated RBAC annotations to include pods |
| internal/controller/indexer/indexer.go | Enhanced indexing to account for upstream subsets |
| internal/controller/apisixroute_controller.go | Implemented subset filtering in endpoints resolution |
| config/rbac/role.yaml | Updated RBAC role to include pods |
| config/crd/bases/apisix.apache.org_apisixupstreams.yaml | Added detailed validations for upstream properties |
| api/v2/shared_types.go | Declared additional constants for health check types and limits |
| api/v2/apisixupstream_types.go | Updated ApisixUpstreamSpec validations and enums for scheme/passHost |
| api/adc/types.go | Adjusted Nodes field to be optional in the ADC upstream definition |
Comments suppressed due to low confidence (2)
internal/provider/adc/translator/apisixupstream.go:27
- The explicit check for both empty externalNodes and nil discovery has been removed. Please confirm that upstreams without externalNodes, discovery, or subsets are correctly handled by relying solely on CRD XValidation.
)
test/e2e/apisix/route.go:500
- [nitpick] The test case for the upstream health check remains skipped with a FIXME note. Consider tracking this issue and updating the test once the health check synchronization problem is resolved.
PIt("Test Upstream healthcheck", func() {
…ApisixUpstream in standalone mode
Type of change:
What this PR does / why we need it:
Pre-submission checklist: