Closed
Description
Context
Service
and ServiceImport
both have an AppProtocol
field.
Specs:
- Service: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.27/#serviceport-v1-core
- ServiceImport: https://github.com/kubernetes-sigs/mcs-api/blob/6c631f4730d095bdec8f9100f7a7d3732d0abe85/pkg/apis/v1alpha1/serviceimport.go#L91-L106
EG currently parses the AppProtocol
field for Service
resources.
gateway/internal/gatewayapi/route.go
Lines 1459 to 1466 in bfd239b
Problem
During some refactoring in #5451, we found that EG does NOT parse AppProtocol
from ServiceImport
CR. https://github.com/envoyproxy/gateway/pull/5451/files#r1990414195
Ask
Can we apply the same AppProtocol
parsing to ServiceImport
that we currently support on Service
?
I assume we should, as Service and ServiceImport are mostly interchangeable. But should we support the same AppProtocol
values for both resources?
- Value
kubernetes.io/h2c
should definitely be supported, as it is explicitly listed in the spec forServiceImport.AppProtocol
. - Though EG supports
AppProtocol = "grpc"
forService
. But where did this special value come from? It is not part of RFC-6335 or in https://kubernetes.io/docs/concepts/services-networking/service/#application-protocol. Is it OK to add support for this special value inServiceImport.AppProtocol
?