I try to manage my AWS HTTP API gateway and its resources by the controller. I got a confusion due to manipulation by the HTTP header.
I need to overwrite the header Host: my.local.host
.
I use Integration
manifest to manage it:
apiVersion: apigatewayv2.services.k8s.aws/v1alpha1
kind: Integration
metadata:
name: integration-my
namespace: rental-connect
spec:
apiRef:
from:
name: adopt-api-gateway-my
connectionID: id
integrationType: HTTP_PROXY
connectionType: VPC_LINK
integrationURI: arn:aws:elasticloadbalancing:eu-central-1:...
integrationMethod: ANY
payloadFormatVersion: "1.0"
requestParameters: <here I need help>
I suppose requestParameters
can help me. But I have absolutely no idea in what format I can use it.
Any ideas?
I found a solution myself:
apiVersion: apigatewayv2.services.k8s.aws/v1alpha1
kind: Integration
metadata:
name: integration-my
namespace: rental-connect
spec:
apiRef:
from:
name: adopt-api-gateway-my
connectionID: id
integrationType: HTTP_PROXY
connectionType: VPC_LINK
integrationURI: arn:aws:elasticloadbalancing:eu-central-1:...
integrationMethod: ANY
payloadFormatVersion: "1.0"
requestParameters: {"overwrite:header.Host": "my.hostname.com"}