You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Does this enhancement require public documentation?
I have added an Acceptance Criteria item for adding and/or adjusting public documentation (if applicable)
Problem Statement
When using an HTTPRoute with multiple weighted backends, there is no way to set the Host header to the FQDN of each individual service. I need to be able to do this to utilize the Istio mesh's routing rules.
I've been trying to accomplish this through the konghq.com/preserve-host annotation set to false on the HTTPRoute, and konghq.com/host-header set to the FQDN of the service on the K8s Service resource, but I get the following error message from the KIC when attempting to do this:
Service has inconsistent konghq.com/host-header annotation and is used in multi-Service backend httproute.my-namespace.my-kong-httproute.foo.bar.com.0. This annotation must have the same value across all Services in the backend.
And If I set konghq.com/preserve-host to false in the HTTPRoute and omit setting konghq.com/host-header on the backend services, the host header appears to be set to the downstream IP address, which isn't helpful in this case.
Proposed Solution
Ideally I would either be able to:
Set distinct host headers for each backend service referenced in a multi-backend, weighted HTTPRoute
Configure KIC to set the host header to the backend FQDN instead of the downstream IP by default when konghq.com/preserve-host is set to false. This option could be enabled via a CLI flag.
Ideally both proposed solutions would be implemented since (1) would allow for greater flexibility in the HTTPRoute support, and (2) would allow users to leverage convention over configuration better since they wouldn't need to add a konghq.com/host-header annotation to each backend Service resource if they wished to enable this throughout their cluster.
Additional information
Example manifests which demonstrate this problem are as follows:
As a user, I can configure a HTTPRoute with a multi-Service backend to set a distinct host header for each backend Service
As a user, I can configure the KIC to automatically set the host header to the backend Service FQDN if konghq.com/preserve-host is set to false instead of the downstream IP address (nice to have)
New settings are appropriately documented
The text was updated successfully, but these errors were encountered:
Is there an existing issue for this?
Does this enhancement require public documentation?
Problem Statement
When using an HTTPRoute with multiple weighted backends, there is no way to set the Host header to the FQDN of each individual service. I need to be able to do this to utilize the Istio mesh's routing rules.
I've been trying to accomplish this through the
konghq.com/preserve-host
annotation set tofalse
on the HTTPRoute, andkonghq.com/host-header
set to the FQDN of the service on the K8s Service resource, but I get the following error message from the KIC when attempting to do this:And If I set
konghq.com/preserve-host
tofalse
in the HTTPRoute and omit settingkonghq.com/host-header
on the backend services, the host header appears to be set to the downstream IP address, which isn't helpful in this case.Proposed Solution
Ideally I would either be able to:
konghq.com/preserve-host
is set tofalse
. This option could be enabled via a CLI flag.Ideally both proposed solutions would be implemented since (1) would allow for greater flexibility in the HTTPRoute support, and (2) would allow users to leverage convention over configuration better since they wouldn't need to add a
konghq.com/host-header
annotation to each backend Service resource if they wished to enable this throughout their cluster.Additional information
Example manifests which demonstrate this problem are as follows:
Kong HTTPRoute
Mesh HTTPRoute - Service A
Mesh HTTPRoute - Service B
Service A
Service B
Acceptance Criteria
host
header for each backend Servicehost
header to the backend Service FQDN ifkonghq.com/preserve-host
is set tofalse
instead of the downstream IP address (nice to have)The text was updated successfully, but these errors were encountered: