"No routes configured" when using `grpcRoutes`
FredrikAugust opened this issue ยท 10 comments
Checklist:
- I've included steps to reproduce the bug.
- I've included the version of argo rollouts.
- I've included the version of the gateway API plugin
- I've included my Rollout Spec (anonymized if needed)
Describe the bug
We've configured the plugin to work with our two GRPCRoute
resources, but the grpcRoutes
do not seem to be detected by the plugin.
To Reproduce
We're also using linkerd, but using the http
/grpc
-route
CRDs from Traefik.
trafficRouting:
plugins:
argoproj-labs/gatewayAPI:
grpcRoutes:
- name: portfolio-grpc-route-query
useHeaderRoutes: "false"
- name: portfolio-grpc-route-command
useHeaderRoutes: "false"
namespace: init
apiVersion: gateway.networking.k8s.io/v1alpha2
kind: GRPCRoute
metadata:
annotations:
retry.linkerd.io/grpc: cancelled,deadline-exceeded,resource-exhausted,unavailable,internal
retry.linkerd.io/limit: "3"
retry.linkerd.io/timeout: 300ms
creationTimestamp: "2024-08-29T12:28:25Z"
generation: 2
name: portfolio-grpc-route-query
namespace: init
resourceVersion: "411135265"
uid: 009c9614-0785-44d6-bee1-fdc289f7cccb
spec:
parentRefs:
- group: ""
kind: Service
name: portfolio
port: 80
rules:
- backendRefs:
- group: ""
kind: Service
name: portfolio
port: 80
weight: 1
- group: ""
kind: Service
name: portfolio-canary
port: 80
weight: 1
matches:
- method:
method: query
service: service.Service
type: Exact
Expected behavior
It should detect the grpc routes just fine. We also use the httpRoutes
property for other services and they seem to work just fine.
Version
plugin version: v0.3.0
argo rollouts version: v1.7.2
Logs
time="2024-08-29T16:34:42Z" level=info msg="Started syncing rollout" generation=192 namespace=init resourceVersion=411135467 rollout=init-portfolio
time="2024-08-29T16:34:42Z" level=info msg="delaying service switch from 6bbddc77cd to 59d5fd686: ReplicaSet has zero availability" namespace=init rollout=init-portfolio service=portfolio-canary
time="2024-08-29T16:34:42Z" level=info msg="Found 1 TrafficRouting Reconcilers" namespace=init rollout=init-portfolio
time="2024-08-29T16:34:42Z" level=info msg="Reconciling TrafficRouting with type 'GatewayAPI'" namespace=init rollout=init-portfolio
time="2024-08-29T16:34:42Z" level=warning msg="failed to set weight via plugin: No routes configured. One of 'tcpRoutes', 'httpRoutes', 'tcpRoute' or 'httpRoute' should be set" event_reason=TrafficRoutingError namespace=init rollout=init-portfol
time="2024-08-29T16:34:42Z" level=error msg="roCtx.reconcile err failed to set weight via plugin: No routes configured. One of 'tcpRoutes', 'httpRoutes', 'tcpRoute' or 'httpRoute' should be set" generation=192 namespace=init resourceVersion=4111
time="2024-08-29T16:34:42Z" level=info msg="Reconciliation completed" generation=192 namespace=init resourceVersion=411135467 rollout=init-portfolio time_ms=4.668302
time="2024-08-29T16:34:42Z" level=error msg="rollout syncHandler error: failed to set weight via plugin: No routes configured. One of 'tcpRoutes', 'httpRoutes', 'tcpRoute' or 'httpRoute' should be set" namespace=init rollout=init-portfolio
time="2024-08-29T16:34:42Z" level=info msg="rollout syncHandler queue retries: 551 : key \"init/init-portfolio\"" namespace=init rollout=init-portfolio
time="2024-08-29T16:34:42Z" level=info msg="Event(v1.ObjectReference{Kind:\"Rollout\", Namespace:\"init\", Name:\"init-portfolio\", UID:\"a1bd68e2-b291-4e55-af1b-4b50da01e5d0\", APIVersion:\"argoproj.io/v1alpha1\", ResourceVersion:\"411135467\",
Message from the maintainers:
Impacted by this bug? Give it a ๐. We prioritize the issues with the most ๐.
Just tried with grpcRoute
(singular) and it also didn't seem to work.
Hi @FredrikAugust ! Thank you for created issue. Have you compiled plugin from master ? We haven't done release yet that support grpcRoute(the reason is written in doc). You need to compile from master to test it.
Write in the root "make release" it will build releases for all platforms
Aha, well that would probably explain it ๐ Thanks, @Philipp-Plotnikov! I was reading through the source code, running E2E tests and couldn't for the life of me understand why it wasn't working. One small thing that could help would perhaps be to update the error string to say "grpcRoutes, ..., grcpRoute" in the main branch: https://github.com/argoproj-labs/rollouts-plugin-trafficrouter-gatewayapi/blob/main/pkg/plugin/errors.go#L5
If that would have been different then I likely would have sniffed out that something was wrong earlier, and it might help others if they end up the same rabbit hole. I will try your suggestion tomorrow when I get back to work.
Also, are you referring to
We tested grpc support only by looking at resources state as traffic providers didn't support grpc well at the moment of development but it would be great if you contribute a real example
If so, perhaps it would be possible to make it clearer that it's not released in the latest version?
Also, if it would not be too much hassle, would it be possible to draft a "draft release" or "pre-release" or whatever GitHub calls them so I could pull the image from this repo instead of having to host it myself? It would simplify the workflow a little ๐
I agree about the doc, it is not clear. About the release I think we can make it, but not now as we are on holiday and not near the computers
@FredrikAugust, it will be great if you will add to the doc notion, it is not released but it is in master so to test, it needs compile from master for now. I will approve.
@FredrikAugust write about the status of GRPCRoute (how it works when you will test it), please. It also will be very helpful for others if you will make additional PR that will contain your example(examples folder) of use GRPCRoute (if it will work well). Thank you for contribution!!
Absolutely, happy to be of help. I'll close this issue, and create a new issue to track the experience.