-
Notifications
You must be signed in to change notification settings - Fork 2k
fix(argo-cd): Remove invalid matches from default GRPCRoute #3554
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
|
Hello, |
Signed-off-by: downfa11 <[email protected]>
Signed-off-by: downfa11 <[email protected]>
Signed-off-by: downfa11 <[email protected]>
Signed-off-by: downfa11 <[email protected]>
Signed-off-by: downfa11 <[email protected]>
Signed-off-by: downfa11 <[email protected]>
511a278 to
56af384
Compare
Signed-off-by: downfa11 <[email protected]>
Signed-off-by: downfa11 <[email protected]>
|
@yann-soubeyrand I'm really sorry for the confusion. You're right. Now when |
Signed-off-by: downfa11 <[email protected]>
|
I’m wondering if this GRPCRoute can work at all and if it’s even necessary:
|
|
I confirm that I was able to make GRPC work on the HTTPRoute by adding |
|
@yann-soubeyrand Thank you for checking it. As you mentioned, I also think using HTTPRoute is more practical. But judging from the issue that was raised, there does seem to be some demand.
|
|
I don’t have a strong opinion on whether the chart should provide a GRPCRoute or not, but it should be clearly stated in the doc that only the HTTPRoute must be deployed if one wants to serve HTTP and GRPC on the same domain (as stated in the Gateway API documentation). |
|
Unfortunately, Traefik controller can't handle both HTTP & GRPC requests using just one protocol for some reason. apiVersion: v1
kind: Service
metadata:
annotations:
meta.helm.sh/release-name: argocd
meta.helm.sh/release-namespace: argocd
labels:
app.kubernetes.io/component: server
app.kubernetes.io/instance: argocd
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: argocd-server
app.kubernetes.io/part-of: argocd
name: argocd-server-h2c
namespace: argocd
spec:
ports:
- name: http
port: 80
protocol: TCP
targetPort: 8080
appProtocol: kubernetes.io/h2c
- name: https
port: 443
protocol: TCP
targetPort: 8080
selector:
app.kubernetes.io/instance: argocd
app.kubernetes.io/name: argocd-serverAnd then modifying the httproute to route GRPC requests to that h2c service based on the apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
annotations:
meta.helm.sh/release-name: argocd
meta.helm.sh/release-namespace: argocd
labels:
app.kubernetes.io/component: server
app.kubernetes.io/instance: argocd
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: argocd-server
app.kubernetes.io/part-of: argocd
name: argocd-server
namespace: argocd
spec:
hostnames:
- hostname
parentRefs:
- group: gateway.networking.k8s.io
kind: Gateway
name: traefik-gateway
namespace: default
sectionName: websecure
rules:
- backendRefs:
- name: argocd-server
port: 80
matches:
- path:
type: PathPrefix
value: /
- backendRefs:
- name: argocd-server-h2c
port: 80
matches:
- path:
type: PathPrefix
value: /
headers:
- name: Content-Type
value: application/grpcHowever because the |
|
Wrote on the original issue #3550 (comment) But It almost works, with the helm chart as-is, but requires some updates. Although I'm using Cilium |
|
@yann-soubeyrand Great, that looks promising. Did you test it at some implementation other than Traefik? It would be good to have some sort of confirmation that it really works with multiple implementations. Also perhaps update the description in both values.yaml & README.md to make it clear that those http2 parameters are there to enable gRPC (CLI) access via the (main) HTTPRoute - so that their purpose is clear from the description. |
|
@hostalp no, I tested it with Istio only. I think I won’t be able to test it with other implementations soon. |
|
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Description
Fixes #3550
Fixes the default GRPCRoute configuration to comply with Gateway API specification.
Problem
The current GRPCRoute template generates invalid resources when
server.grpcroute.enabled: trueis set without custom rules.At least one of
serviceormethodmust be a non-empty string inGRPCMethodMatch.The previous default configuration violated this requirement.
Changes
server.grpcroute.rulesdefault value from invalid example to empty array[]invalues.yamlmatchessection entirely from the default rule ingrpcroute.yamltemplatematchesis omitted, Gateway API spec defines that all gRPC traffic is matched, which is the desired default behaviorChecklist: