-
Notifications
You must be signed in to change notification settings - Fork 2
fix: backendRefUnknownKind test case #133
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
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -307,14 +307,18 @@ func (t *Translator) translateEndpointSlice(portName *string, weight int, endpoi | |||||||||||||
| return nodes | ||||||||||||||
| } | ||||||||||||||
|
|
||||||||||||||
| func (t *Translator) translateBackendRef(tctx *provider.TranslateContext, ref gatewayv1.BackendRef) adctypes.UpstreamNodes { | ||||||||||||||
| func (t *Translator) translateBackendRef(tctx *provider.TranslateContext, ref gatewayv1.BackendRef) (adctypes.UpstreamNodes, error) { | ||||||||||||||
| if ref.Kind != nil && *ref.Kind != "Service" { | ||||||||||||||
| return adctypes.UpstreamNodes{}, fmt.Errorf("kind %s is not supported", *ref.Kind) | ||||||||||||||
|
||||||||||||||
| return adctypes.UpstreamNodes{}, fmt.Errorf("kind %s is not supported", *ref.Kind) | |
| key := types.NamespacedName{ | |
| Namespace: string(*ref.Namespace), | |
| Name: string(ref.Name), | |
| } | |
| return adctypes.UpstreamNodes{}, fmt.Errorf("kind %s is not supported for backend reference %s", *ref.Kind, key) |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -37,11 +37,8 @@ var skippedTestsForTraditionalRoutes = []string{ | |||||
| tests.HTTPRouteHostnameIntersection.ShortName, | ||||||
| tests.HTTPRouteListenerHostnameMatching.ShortName, | ||||||
|
|
||||||
| // tests.HTTPRouteMatching.ShortName, | ||||||
| // tests.HTTPRouteMatchingAcrossRoutes.ShortName, | ||||||
|
|
||||||
| tests.GatewayInvalidTLSConfiguration.ShortName, | ||||||
| tests.HTTPRouteInvalidBackendRefUnknownKind.ShortName, | ||||||
| // tests.HTTPRouteInvalidBackendRefUnknownKind.ShortName, | ||||||
|
||||||
| // tests.HTTPRouteInvalidBackendRefUnknownKind.ShortName, | |
| // tests.HTTPRouteInvalidBackendRefUnknownKind.ShortName, // Commented out because this test is not applicable to the current implementation. See issue tracker for details. |
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.
[nitpick] Consider adding logging for the backend reference error (httpRouteErr) before setting the resolveRefStatus so that the issue is more easily traceable in production environments.