Open Ressetkk opened 5 months ago
This proposal accepts headers at Spec
level, hence I'm assuming it should be set to all routes in the VirtualService created by the APIRule.
However, istio supports headers at route level
Should something like this be supported too:
kind: APIRule
metadata:
name: rule
spec:
headers:
request:
set:
MY-HEADER: "header-applied-to-all-request-routes"
gateway: kyma-gateway
host: httpbinbeta.local.kyma.dev
rules:
- path: /status
accessStrategies:
- handler: no_auth
methods:
- GET
service:
name: service
port: 8000
headers:
request:
set:
STATUS-HEADER : "header-applied-only-to-status-route"
...
Where in a request to /status
both headers should be set (MY-HEADER
and STATUS-HEADER
).
An request to another route (not showed here), only MY-HEADER
will be set?
Support setting up custom headers in APIRule
Status
Proposed
Context
Users request feature for APIRule to support setting up custom headers in the CR based on the VirtualService Headers section. Users use application configuration where upstream connectivity requires some values to be passed as headers in a request. See discussion in https://github.com/kyma-project/api-gateway/issues/808#issuecomment-1959121650
Decision
headers
section.APIRule extension
The
APIRuleSpec
struct is extended with a variable of typeHeadersConfig
:Consequences